fansunited-management-components 1.52.1 → 1.53.1
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 +224 -201
- package/index.umd.js +63 -63
- package/package.json +1 -1
- package/src/models/minigames/personalityquizzes/PersonalityQuizRequestBody.d.ts +60 -0
- package/src/models/minigames/personalityquizzes/PersonalityQuizRequestBody.d.ts.map +1 -0
- package/src/services/https/HttpsService.d.ts +4 -0
- package/src/services/https/HttpsService.d.ts.map +1 -1
package/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(C,Me){typeof exports=="object"&&typeof module!="undefined"?module.exports=Me(require("react"),require("fansunited-sdk-esm"),require("react-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-quill"),require("@mui/joy"),require("@mui/icons-material")):typeof define=="function"&&define.amd?define(["react","fansunited-sdk-esm","react-dom","@emotion/styled","@emotion/react","react-quill","@mui/joy","@mui/icons-material"],Me):(C=typeof globalThis!="undefined"?globalThis:C||self,C.FansUnitedComponents=Me(C.React,C.FansUnitedSDK,C.ReactDOM,C.EmotionStyled,C.EmotionReact,C.ReactQuill,C.MaterialUIJoy,C.MaterialUIIcons))})(this,function(C,Me,Re,Mt,pe,yi,b,Oe){"use strict";var kF=Object.defineProperty,_F=Object.defineProperties;var PF=Object.getOwnPropertyDescriptors;var Bs=Object.getOwnPropertySymbols,DF=Object.getPrototypeOf,gb=Object.prototype.hasOwnProperty,mb=Object.prototype.propertyIsEnumerable,OF=Reflect.get;var bi=Math.pow,Bu=(C,Me,Re)=>Me in C?kF(C,Me,{enumerable:!0,configurable:!0,writable:!0,value:Re}):C[Me]=Re,N=(C,Me)=>{for(var Re in Me||(Me={}))gb.call(Me,Re)&&Bu(C,Re,Me[Re]);if(Bs)for(var Re of Bs(Me))mb.call(Me,Re)&&Bu(C,Re,Me[Re]);return C},
|
|
1
|
+
(function(C,Me){typeof exports=="object"&&typeof module!="undefined"?module.exports=Me(require("react"),require("fansunited-sdk-esm"),require("react-dom"),require("@emotion/styled"),require("@emotion/react"),require("react-quill"),require("@mui/joy"),require("@mui/icons-material")):typeof define=="function"&&define.amd?define(["react","fansunited-sdk-esm","react-dom","@emotion/styled","@emotion/react","react-quill","@mui/joy","@mui/icons-material"],Me):(C=typeof globalThis!="undefined"?globalThis:C||self,C.FansUnitedComponents=Me(C.React,C.FansUnitedSDK,C.ReactDOM,C.EmotionStyled,C.EmotionReact,C.ReactQuill,C.MaterialUIJoy,C.MaterialUIIcons))})(this,function(C,Me,Re,Mt,pe,yi,b,Oe){"use strict";var kF=Object.defineProperty,_F=Object.defineProperties;var PF=Object.getOwnPropertyDescriptors;var Bs=Object.getOwnPropertySymbols,DF=Object.getPrototypeOf,gb=Object.prototype.hasOwnProperty,mb=Object.prototype.propertyIsEnumerable,OF=Reflect.get;var bi=Math.pow,Bu=(C,Me,Re)=>Me in C?kF(C,Me,{enumerable:!0,configurable:!0,writable:!0,value:Re}):C[Me]=Re,N=(C,Me)=>{for(var Re in Me||(Me={}))gb.call(Me,Re)&&Bu(C,Re,Me[Re]);if(Bs)for(var Re of Bs(Me))mb.call(Me,Re)&&Bu(C,Re,Me[Re]);return C},q=(C,Me)=>_F(C,PF(Me));var $s=C=>typeof C=="symbol"?C:C+"",We=(C,Me)=>{var Re={};for(var Mt in C)gb.call(C,Mt)&&Me.indexOf(Mt)<0&&(Re[Mt]=C[Mt]);if(C!=null&&Bs)for(var Mt of Bs(C))Me.indexOf(Mt)<0&&mb.call(C,Mt)&&(Re[Mt]=C[Mt]);return Re};var ee=(C,Me,Re)=>Bu(C,typeof Me!="symbol"?Me+"":Me,Re);var Tr=(C,Me,Re)=>OF(DF(C),Re,Me);var k=(C,Me,Re)=>new Promise((Mt,pe)=>{var yi=An=>{try{Oe(Re.next(An))}catch(V){pe(V)}},b=An=>{try{Oe(Re.throw(An))}catch(V){pe(V)}},Oe=An=>An.done?Mt(An.value):Promise.resolve(An.value).then(yi,b);Oe((Re=Re.apply(C,Me)).next())});function An(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const V=An(C);var Bt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $u(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Nu={exports:{}},To={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
97
97
|
* See the License for the specific language governing permissions and
|
|
98
98
|
* limitations under the License.
|
|
99
|
-
*/function pt(){return typeof navigator!="undefined"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Ob(){return typeof window!="undefined"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(pt())}function Yu(){var e;const t=(e=ko())===null||e===void 0?void 0:e.forceEnvironment;if(t==="node")return!0;if(t==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch(n){return!1}}function Rb(){return typeof window!="undefined"||Ku()}function Ku(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function
|
|
99
|
+
*/function pt(){return typeof navigator!="undefined"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Ob(){return typeof window!="undefined"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(pt())}function Yu(){var e;const t=(e=ko())===null||e===void 0?void 0:e.forceEnvironment;if(t==="node")return!0;if(t==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch(n){return!1}}function Rb(){return typeof window!="undefined"||Ku()}function Ku(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function Qu(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function Fs(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function qu(){const e=pt();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function _o(){try{return typeof indexedDB=="object"}catch(e){return!1}}function Lb(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var o;t(((o=i.error)===null||o===void 0?void 0:o.message)||"")}}catch(n){t(n)}})}/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2017 Google LLC
|
|
102
102
|
*
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
217
217
|
* See the License for the specific language governing permissions and
|
|
218
218
|
* limitations under the License.
|
|
219
|
-
*/const js=[];var Be;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Be||(Be={}));const td={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},Hb=Be.INFO,Wb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Gb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Wb[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Us{constructor(t){this.name=t,this._logLevel=Hb,this._logHandler=Gb,this._userLogHandler=null,js.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?td[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}function Yb(e){js.forEach(t=>{t.setLogLevel(e)})}function Kb(e,t){for(const n of js){let r=null;t&&t.level&&(r=td[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const s=a.map(l=>{if(l==null)return null;if(typeof l=="string")return l;if(typeof l=="number"||typeof l=="boolean")return l.toString();if(l instanceof Error)return l.message;try{return JSON.stringify(l)}catch(c){return null}}).filter(l=>l).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Be[o].toLowerCase(),message:s,args:a,type:i.name})}}}const
|
|
219
|
+
*/const js=[];var Be;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Be||(Be={}));const td={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},Hb=Be.INFO,Wb={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},Gb=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=Wb[t];if(i)console[i](`[${r}] ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Us{constructor(t){this.name=t,this._logLevel=Hb,this._logHandler=Gb,this._userLogHandler=null,js.push(this)}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?td[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}function Yb(e){js.forEach(t=>{t.setLogLevel(e)})}function Kb(e,t){for(const n of js){let r=null;t&&t.level&&(r=td[t.level]),e===null?n.userLogHandler=null:n.userLogHandler=(i,o,...a)=>{const s=a.map(l=>{if(l==null)return null;if(typeof l=="string")return l;if(typeof l=="number"||typeof l=="boolean")return l.toString();if(l instanceof Error)return l.message;try{return JSON.stringify(l)}catch(c){return null}}).filter(l=>l).join(" ");o>=(r!=null?r:i.logLevel)&&e({level:Be[o].toLowerCase(),message:s,args:a,type:i.name})}}}const Qb=(e,t)=>t.some(n=>e instanceof n);let nd,rd;function qb(){return nd||(nd=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Jb(){return rd||(rd=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const id=new WeakMap,Vs=new WeakMap,od=new WeakMap,Hs=new WeakMap,Ws=new WeakMap;function Xb(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",a)},o=()=>{n(Gn(e.result)),i()},a=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",a)});return t.then(n=>{n instanceof IDBCursor&&id.set(n,e)}).catch(()=>{}),Ws.set(t,e),t}function Zb(e){if(Vs.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",a),e.removeEventListener("abort",a)},o=()=>{n(),i()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",a),e.addEventListener("abort",a)});Vs.set(e,t)}let Gs={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Vs.get(e);if(t==="objectStoreNames")return e.objectStoreNames||od.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Gn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function e0(e){Gs=e(Gs)}function t0(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Ys(this),t,...n);return od.set(r,t.sort?t.sort():[t]),Gn(r)}:Jb().includes(e)?function(...t){return e.apply(Ys(this),t),Gn(id.get(this))}:function(...t){return Gn(e.apply(Ys(this),t))}}function n0(e){return typeof e=="function"?t0(e):(e instanceof IDBTransaction&&Zb(e),Qb(e,qb())?new Proxy(e,Gs):e)}function Gn(e){if(e instanceof IDBRequest)return Xb(e);if(Hs.has(e))return Hs.get(e);const t=n0(e);return t!==e&&(Hs.set(e,t),Ws.set(t,e)),t}const Ys=e=>Ws.get(e);function r0(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=Gn(a);return r&&a.addEventListener("upgradeneeded",l=>{r(Gn(a.result),l.oldVersion,l.newVersion,Gn(a.transaction),l)}),n&&a.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),s.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),s}const i0=["get","getKey","getAll","getAllKeys","count"],o0=["put","add","delete","clear"],Ks=new Map;function ad(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ks.get(t))return Ks.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=o0.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||i0.includes(n)))return;const o=function(a,...s){return k(this,null,function*(){const l=this.transaction(a,i?"readwrite":"readonly");let c=l.store;return r&&(c=c.index(s.shift())),(yield Promise.all([c[n](...s),i&&l.done]))[0]})};return Ks.set(t,o),o}e0(e=>q(N({},e),{get:(t,n,r)=>ad(t,n)||e.get(t,n,r),has:(t,n)=>!!ad(t,n)||e.has(t,n)}));/**
|
|
220
220
|
* @license
|
|
221
221
|
* Copyright 2019 Google LLC
|
|
222
222
|
*
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
232
232
|
* See the License for the specific language governing permissions and
|
|
233
233
|
* limitations under the License.
|
|
234
|
-
*/class a0{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(s0(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function s0(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const Do="@firebase/app",
|
|
234
|
+
*/class a0{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(s0(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function s0(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const Do="@firebase/app",Qs="0.10.9";/**
|
|
235
235
|
* @license
|
|
236
236
|
* Copyright 2019 Google LLC
|
|
237
237
|
*
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
292
292
|
* See the License for the specific language governing permissions and
|
|
293
293
|
* limitations under the License.
|
|
294
|
-
*/const $0={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},
|
|
294
|
+
*/const $0={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},qt=new sr("app","Firebase",$0);/**
|
|
295
295
|
* @license
|
|
296
296
|
* Copyright 2019 Google LLC
|
|
297
297
|
*
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
307
307
|
* See the License for the specific language governing permissions and
|
|
308
308
|
* limitations under the License.
|
|
309
|
-
*/let cd=class{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Wn("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw
|
|
309
|
+
*/let cd=class{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Wn("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw qt.create("app-deleted",{appName:this._name})}};/**
|
|
310
310
|
* @license
|
|
311
311
|
* Copyright 2023 Google LLC
|
|
312
312
|
*
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
322
322
|
* See the License for the specific language governing permissions and
|
|
323
323
|
* limitations under the License.
|
|
324
|
-
*/class N0 extends cd{constructor(t,n,r,i){const o=n.automaticDataCollectionEnabled!==void 0?n.automaticDataCollectionEnabled:!1,a={name:r,automaticDataCollectionEnabled:o};if(t.apiKey!==void 0)super(t,a,i);else{const s=t;super(s.options,a,i)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:o},n),this._finalizationRegistry=null,typeof FinalizationRegistry!="undefined"&&(this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()})),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,n.releaseOnDeref=void 0,En(Do,
|
|
324
|
+
*/class N0 extends cd{constructor(t,n,r,i){const o=n.automaticDataCollectionEnabled!==void 0?n.automaticDataCollectionEnabled:!1,a={name:r,automaticDataCollectionEnabled:o};if(t.apiKey!==void 0)super(t,a,i);else{const s=t;super(s.options,a,i)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:o},n),this._finalizationRegistry=null,typeof FinalizationRegistry!="undefined"&&(this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()})),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,n.releaseOnDeref=void 0,En(Do,Qs,"serverapp")}toJSON(){}get refCount(){return this._refCount}incRefCount(t){this.isDeleted||(this._refCount++,t!==void 0&&this._finalizationRegistry!==null&&this._finalizationRegistry.register(t,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){Js(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw qt.create("server-app-deleted")}}/**
|
|
325
325
|
* @license
|
|
326
326
|
* Copyright 2019 Google LLC
|
|
327
327
|
*
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
337
337
|
* See the License for the specific language governing permissions and
|
|
338
338
|
* limitations under the License.
|
|
339
|
-
*/const ur=R0;function
|
|
339
|
+
*/const ur=R0;function qs(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Yn,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw qt.create("bad-app-name",{appName:String(i)});if(n||(n=Wu()),!n)throw qt.create("no-options");const o=Kn.get(i);if(o){if(Po(n,o.options)&&Po(r,o.config))return o;throw qt.create("duplicate-app",{appName:i})}const a=new ed(i);for(const l of Pr.values())a.addComponent(l);const s=new cd(n,r,a);return Kn.set(i,s),s}function F0(e,t){if(Rb()&&!Ku())throw qt.create("invalid-server-app-environment");t.automaticDataCollectionEnabled===void 0&&(t.automaticDataCollectionEnabled=!1);let n;ld(e)?n=e.options:n=e;const r=Object.assign(Object.assign({},t),n);r.releaseOnDeref!==void 0&&delete r.releaseOnDeref;const i=c=>[...c].reduce((d,f)=>Math.imul(31,d)+f.charCodeAt(0)|0,0);if(t.releaseOnDeref!==void 0&&typeof FinalizationRegistry=="undefined")throw qt.create("finalization-registry-not-supported",{});const o=""+i(JSON.stringify(r)),a=_r.get(o);if(a)return a.incRefCount(t.releaseOnDeref),a;const s=new ed(o);for(const c of Pr.values())s.addComponent(c);const l=new N0(n,t,o,s);return _r.set(o,l),l}function ud(e=Yn){const t=Kn.get(e);if(!t&&e===Yn&&Wu())return qs();if(!t)throw qt.create("no-app",{appName:e});return t}function z0(){return Array.from(Kn.values())}function Js(e){return k(this,null,function*(){let t=!1;const n=e.name;Kn.has(n)?(t=!0,Kn.delete(n)):_r.has(n)&&e.decRefCount()<=0&&(_r.delete(n),t=!0),t&&(yield Promise.all(e.container.getProviders().map(r=>r.delete())),e.isDeleted=!0)})}function En(e,t,n){var r;let i=(r=L0[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const s=[`Unable to register library "${i}" with version "${t}":`];o&&s.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&s.push("and"),a&&s.push(`version name "${t}" contains illegal characters (whitespace or "/")`),Tn.warn(s.join(" "));return}cr(new Wn(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function dd(e,t){if(e!==null&&typeof e!="function")throw qt.create("invalid-log-argument");Kb(e,t)}function fd(e){Yb(e)}/**
|
|
340
340
|
* @license
|
|
341
341
|
* Copyright 2021 Google LLC
|
|
342
342
|
*
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
352
352
|
* See the License for the specific language governing permissions and
|
|
353
353
|
* limitations under the License.
|
|
354
|
-
*/const j0="firebase-heartbeat-database",U0=1,wi="firebase-heartbeat-store";let Xs=null;function hd(){return Xs||(Xs=r0(j0,U0,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(wi)}catch(n){console.warn(n)}}}}).catch(e=>{throw
|
|
354
|
+
*/const j0="firebase-heartbeat-database",U0=1,wi="firebase-heartbeat-store";let Xs=null;function hd(){return Xs||(Xs=r0(j0,U0,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(wi)}catch(n){console.warn(n)}}}}).catch(e=>{throw qt.create("idb-open",{originalErrorMessage:e.message})})),Xs}function V0(e){return k(this,null,function*(){try{const n=(yield hd()).transaction(wi),r=yield n.objectStore(wi).get(gd(e));return yield n.done,r}catch(t){if(t instanceof $t)Tn.warn(t.message);else{const n=qt.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});Tn.warn(n.message)}}})}function pd(e,t){return k(this,null,function*(){try{const r=(yield hd()).transaction(wi,"readwrite");yield r.objectStore(wi).put(t,gd(e)),yield r.done}catch(n){if(n instanceof $t)Tn.warn(n.message);else{const r=qt.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Tn.warn(r.message)}}})}function gd(e){return`${e.name}!${e.options.appId}`}/**
|
|
355
355
|
* @license
|
|
356
356
|
* Copyright 2021 Google LLC
|
|
357
357
|
*
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
382
382
|
* See the License for the specific language governing permissions and
|
|
383
383
|
* limitations under the License.
|
|
384
|
-
*/function
|
|
384
|
+
*/function Q0(e){cr(new Wn("platform-logger",t=>new a0(t),"PRIVATE")),cr(new Wn("heartbeat",t=>new G0(t),"PRIVATE")),En(Do,Qs,e),En(Do,Qs,"esm2017"),En("fire-js","")}Q0("");const q0=Object.freeze(Object.defineProperty({__proto__:null,FirebaseError:$t,SDK_VERSION:ur,_DEFAULT_ENTRY_NAME:Yn,_addComponent:Ci,_addOrOverwriteComponent:sd,_apps:Kn,_clearComponents:B0,_components:Pr,_getProvider:Oo,_isFirebaseApp:ld,_isFirebaseServerApp:Ge,_registerComponent:cr,_removeServiceInstance:M0,_serverApps:_r,deleteApp:Js,getApp:ud,getApps:z0,initializeApp:qs,initializeServerApp:F0,onLog:dd,registerVersion:En,setLogLevel:fd},Symbol.toStringTag,{value:"Module"}));/**
|
|
385
385
|
* @license
|
|
386
386
|
* Copyright 2020 Google LLC
|
|
387
387
|
*
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
427
427
|
* See the License for the specific language governing permissions and
|
|
428
428
|
* limitations under the License.
|
|
429
|
-
*/function Z0(e){const t={},n={__esModule:!0,initializeApp:o,app:i,registerVersion:En,setLogLevel:fd,onLog:dd,apps:null,SDK_VERSION:ur,INTERNAL:{registerComponent:s,removeApp:r,useAsService:l,modularAPIs:
|
|
429
|
+
*/function Z0(e){const t={},n={__esModule:!0,initializeApp:o,app:i,registerVersion:En,setLogLevel:fd,onLog:dd,apps:null,SDK_VERSION:ur,INTERNAL:{registerComponent:s,removeApp:r,useAsService:l,modularAPIs:q0}};n.default=n,Object.defineProperty(n,"apps",{get:a});function r(c){delete t[c]}function i(c){if(c=c||Yn,!Ju(t,c))throw bd.create("no-app",{appName:c});return t[c]}i.App=e;function o(c,d={}){const f=qs(c,d);if(Ju(t,f.name))return t[f.name];const h=new e(f,n);return t[f.name]=h,h}function a(){return Object.keys(t).map(c=>t[c])}function s(c){const d=c.name,f=d.replace("-compat","");if(cr(c)&&c.type==="PUBLIC"){const h=(p=i())=>{if(typeof p[f]!="function")throw bd.create("invalid-app-argument",{appName:d});return p[f]()};c.serviceProps!==void 0&&Eo(h,c.serviceProps),n[f]=h,e.prototype[f]=function(...p){return this._getService.bind(this,d).apply(this,c.multipleInstances?p:[])}}return c.type==="PUBLIC"?n[f]:null}function l(c,d){return d==="serverAuth"?null:d}return n}/**
|
|
430
430
|
* @license
|
|
431
431
|
* Copyright 2019 Google LLC
|
|
432
432
|
*
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
`);const t=e.firebase.SDK_VERSION;t&&t.indexOf("LITE")>=0&&xd.warn(`
|
|
493
493
|
Warning: You are trying to load Firebase while using Firebase Performance standalone script.
|
|
494
494
|
You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.
|
|
495
|
-
`)}}catch(e){}const
|
|
495
|
+
`)}}catch(e){}const Qn=ey;ry();var iy="firebase",oy="10.13.0";/**
|
|
496
496
|
* @license
|
|
497
497
|
* Copyright 2020 Google LLC
|
|
498
498
|
*
|
|
@@ -507,7 +507,7 @@
|
|
|
507
507
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
508
508
|
* See the License for the specific language governing permissions and
|
|
509
509
|
* limitations under the License.
|
|
510
|
-
*/
|
|
510
|
+
*/Qn.registerVersion(iy,oy,"app-compat");var Zs=function(e,t){return Zs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Zs(e,t)};function ay(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zs(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var At=function(){return At=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},At.apply(this,arguments)};function el(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}typeof SuppressedError=="function"&&SuppressedError;const Ii={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},Dr={EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"};/**
|
|
511
511
|
* @license
|
|
512
512
|
* Copyright 2020 Google LLC
|
|
513
513
|
*
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
583
583
|
* See the License for the specific language governing permissions and
|
|
584
584
|
* limitations under the License.
|
|
585
|
-
*/function dy(){return typeof navigator!="undefined"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(rl()||
|
|
585
|
+
*/function dy(){return typeof navigator!="undefined"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(rl()||Qu()||"connection"in navigator)?navigator.onLine:!0}function fy(){if(typeof navigator=="undefined")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/**
|
|
586
586
|
* @license
|
|
587
587
|
* Copyright 2020 Google LLC
|
|
588
588
|
*
|
|
@@ -822,7 +822,7 @@
|
|
|
822
822
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
823
823
|
* See the License for the specific language governing permissions and
|
|
824
824
|
* limitations under the License.
|
|
825
|
-
*/function
|
|
825
|
+
*/function qn(e,t){oe(typeof e=="string"||typeof e=="undefined","internal-error",{appName:t})}class Pn{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=el(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Sy(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new al(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(t){return k(this,null,function*(){const n=yield _n(this,this.stsTokenManager.getToken(this.auth,t));return oe(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n})}getIdTokenResult(t){return wy(this,t)}reload(){return Ay(this)}_assign(t){this!==t&&(oe(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new Pn(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){oe(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}_updateTokensIfNecessary(t,n=!1){return k(this,null,function*(){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&(yield ki(this)),yield this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)})}delete(){return k(this,null,function*(){if(Ge(this.auth.app))return Promise.reject(bt(this.auth));const t=yield this.getIdToken();return yield _n(this,xy(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>Object.assign({},t)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,n){var r,i,o,a,s,l,c,d;const f=(r=n.displayName)!==null&&r!==void 0?r:void 0,h=(i=n.email)!==null&&i!==void 0?i:void 0,p=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,m=(a=n.photoURL)!==null&&a!==void 0?a:void 0,g=(s=n.tenantId)!==null&&s!==void 0?s:void 0,v=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,S=(c=n.createdAt)!==null&&c!==void 0?c:void 0,I=(d=n.lastLoginAt)!==null&&d!==void 0?d:void 0,{uid:x,emailVerified:w,isAnonymous:y,providerData:A,stsTokenManager:E}=n;oe(x&&E,t,"internal-error");const _=Rr.fromJSON(this.name,E);oe(typeof x=="string",t,"internal-error"),qn(f,t.name),qn(h,t.name),oe(typeof w=="boolean",t,"internal-error"),oe(typeof y=="boolean",t,"internal-error"),qn(p,t.name),qn(m,t.name),qn(g,t.name),qn(v,t.name),qn(S,t.name),qn(I,t.name);const D=new Pn({uid:x,auth:t,email:h,emailVerified:w,displayName:f,isAnonymous:y,photoURL:m,phoneNumber:p,tenantId:g,stsTokenManager:_,createdAt:S,lastLoginAt:I});return A&&Array.isArray(A)&&(D.providerData=A.map(G=>Object.assign({},G))),v&&(D._redirectEventId=v),D}static _fromIdTokenResponse(t,n,r=!1){return k(this,null,function*(){const i=new Rr;i.updateFromServerResponse(n);const o=new Pn({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return yield ki(o),o})}static _fromGetAccountInfoResponse(t,n,r){return k(this,null,function*(){const i=n.users[0];oe(i.localId!==void 0,"internal-error");const o=i.providerUserInfo!==void 0?Dd(i.providerUserInfo):[],a=!(i.email&&i.passwordHash)&&!(o!=null&&o.length),s=new Rr;s.updateFromIdToken(r);const l=new Pn({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:a}),c={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new al(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(o!=null&&o.length)};return Object.assign(l,c),l})}}/**
|
|
826
826
|
* @license
|
|
827
827
|
* Copyright 2020 Google LLC
|
|
828
828
|
*
|
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
883
883
|
* See the License for the specific language governing permissions and
|
|
884
884
|
* limitations under the License.
|
|
885
|
-
*/function Ld(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Nd(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Md(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Fd(t))return"Blackberry";if(zd(t))return"Webos";if(Bd(t))return"Safari";if((t.includes("chrome/")||$d(t))&&!t.includes("edge/"))return"Chrome";if(_i(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Md(e=pt()){return/firefox\//i.test(e)}function Bd(e=pt()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function $d(e=pt()){return/crios\//i.test(e)}function Nd(e=pt()){return/iemobile/i.test(e)}function _i(e=pt()){return/android/i.test(e)}function Fd(e=pt()){return/blackberry/i.test(e)}function zd(e=pt()){return/webos/i.test(e)}function Pi(e=pt()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function _y(e=pt()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)}function Py(e=pt()){var t;return Pi(e)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function Dy(){return
|
|
885
|
+
*/function Ld(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Nd(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Md(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Fd(t))return"Blackberry";if(zd(t))return"Webos";if(Bd(t))return"Safari";if((t.includes("chrome/")||$d(t))&&!t.includes("edge/"))return"Chrome";if(_i(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Md(e=pt()){return/firefox\//i.test(e)}function Bd(e=pt()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function $d(e=pt()){return/crios\//i.test(e)}function Nd(e=pt()){return/iemobile/i.test(e)}function _i(e=pt()){return/android/i.test(e)}function Fd(e=pt()){return/blackberry/i.test(e)}function zd(e=pt()){return/webos/i.test(e)}function Pi(e=pt()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function _y(e=pt()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)}function Py(e=pt()){var t;return Pi(e)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function Dy(){return qu()&&document.documentMode===10}function jd(e=pt()){return Pi(e)||_i(e)||zd(e)||Fd(e)||/windows phone/i.test(e)||Nd(e)}/**
|
|
886
886
|
* @license
|
|
887
887
|
* Copyright 2020 Google LLC
|
|
888
888
|
*
|
|
@@ -957,7 +957,7 @@
|
|
|
957
957
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
958
958
|
* See the License for the specific language governing permissions and
|
|
959
959
|
* limitations under the License.
|
|
960
|
-
*/class By{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Vd(this),this.idTokenSubscription=new Vd(this),this.beforeStateQueue=new Oy(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=wd,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Ut(n)),this._initializationPromise=this.queue(()=>k(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Mr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return k(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return k(this,null,function*(){try{const n=yield _d(this,{idToken:t}),r=yield Pn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return k(this,null,function*(){var n;if(Ge(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(s=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(s,s))}):this.directlySetCurrentUser(null)}const r=yield this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const a=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,s=i==null?void 0:i._redirectEventId,l=yield this.tryRedirectSignIn(t);(!a||a===s)&&(l!=null&&l.user)&&(i=l.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return oe(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return k(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return k(this,null,function*(){try{yield ki(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=fy()}_delete(){return k(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return k(this,null,function*(){if(Ge(this.app))return Promise.reject(bt(this));const n=t?_e(t):null;return n&&oe(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return k(this,null,function*(){if(!this._deleted)return t&&oe(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>k(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return k(this,null,function*(){return Ge(this.app)?Promise.reject(bt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Ge(this.app)?Promise.reject(bt(this)):this.queue(()=>k(this,null,function*(){yield this.assertedPersistence.setPersistence(Ut(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return k(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return k(this,null,function*(){const t=yield Ry(this),n=new My(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new sr("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return k(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield ky(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return k(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return k(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Ut(t)||this._popupRedirectResolver;oe(n,this,"argument-error"),this.redirectPersistenceManager=yield Mr.create(this,[Ut(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return k(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>k(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return k(this,null,function*(){if(t===this.currentUser)return this.queue(()=>k(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(oe(s,this,"internal-error"),s.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const l=t.addObserver(n,r,i);return()=>{a=!0,l()}}else{const l=t.addObserver(n);return()=>{a=!0,l()}}}directlySetCurrentUser(t){return k(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return oe(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Ud(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return k(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return k(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&uy(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function qe(e){return _e(e)}class Vd{constructor(t){this.auth=t,this.observer=null,this.addObserver=Zu(n=>this.observer=n)}get next(){return oe(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
960
|
+
*/class By{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Vd(this),this.idTokenSubscription=new Vd(this),this.beforeStateQueue=new Oy(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=wd,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Ut(n)),this._initializationPromise=this.queue(()=>k(this,null,function*(){var r,i;if(!this._deleted&&(this.persistenceManager=yield Mr.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return k(this,null,function*(){if(this._deleted)return;const t=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(t,!0)}})}initializeCurrentUserFromIdToken(t){return k(this,null,function*(){try{const n=yield _d(this,{idToken:t}),r=yield Pn._fromGetAccountInfoResponse(this,n,t);yield this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(t){return k(this,null,function*(){var n;if(Ge(this.app)){const a=this.app.settings.authIdToken;return a?new Promise(s=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(a).then(s,s))}):this.directlySetCurrentUser(null)}const r=yield this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const a=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,s=i==null?void 0:i._redirectEventId,l=yield this.tryRedirectSignIn(t);(!a||a===s)&&(l!=null&&l.user)&&(i=l.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{yield this.beforeStateQueue.runMiddleware(i)}catch(a){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return oe(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)})}tryRedirectSignIn(t){return k(this,null,function*(){let n=null;try{n=yield this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch(r){yield this._setRedirectUser(null)}return n})}reloadAndSetCurrentUserOrClear(t){return k(this,null,function*(){try{yield ki(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)})}useDeviceLanguage(){this.languageCode=fy()}_delete(){return k(this,null,function*(){this._deleted=!0})}updateCurrentUser(t){return k(this,null,function*(){if(Ge(this.app))return Promise.reject(bt(this));const n=t?_e(t):null;return n&&oe(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))})}_updateCurrentUser(t,n=!1){return k(this,null,function*(){if(!this._deleted)return t&&oe(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||(yield this.beforeStateQueue.runMiddleware(t)),this.queue(()=>k(this,null,function*(){yield this.directlySetCurrentUser(t),this.notifyAuthListeners()}))})}signOut(){return k(this,null,function*(){return Ge(this.app)?Promise.reject(bt(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(t){return Ge(this.app)?Promise.reject(bt(this)):this.queue(()=>k(this,null,function*(){yield this.assertedPersistence.setPersistence(Ut(t))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(t){return k(this,null,function*(){this._getPasswordPolicyInternal()||(yield this._updatePasswordPolicy());const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)})}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return k(this,null,function*(){const t=yield Ry(this),n=new My(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new sr("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}revokeAccessToken(t){return k(this,null,function*(){if(this.currentUser){const n=yield this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),yield ky(this,r)}})}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}_setRedirectUser(t,n){return k(this,null,function*(){const r=yield this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)})}getOrInitRedirectPersistenceManager(t){return k(this,null,function*(){if(!this.redirectPersistenceManager){const n=t&&Ut(t)||this._popupRedirectResolver;oe(n,this,"argument-error"),this.redirectPersistenceManager=yield Mr.create(this,[Ut(n._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(t){return k(this,null,function*(){var n,r;return this._isInitialized&&(yield this.queue(()=>k(this,null,function*(){}))),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null})}_persistUserIfCurrent(t){return k(this,null,function*(){if(t===this.currentUser)return this.queue(()=>k(this,null,function*(){return this.directlySetCurrentUser(t)}))})}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n);let a=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(oe(s,this,"internal-error"),s.then(()=>{a||o(this.currentUser)}),typeof n=="function"){const l=t.addObserver(n,r,i);return()=>{a=!0,l()}}else{const l=t.addObserver(n);return()=>{a=!0,l()}}}directlySetCurrentUser(t){return k(this,null,function*(){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?yield this.assertedPersistence.setCurrentUser(t):yield this.assertedPersistence.removeCurrentUser()})}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return oe(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Ud(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return k(this,null,function*(){var t;const n={"X-Client-Version":this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=yield(t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader();r&&(n["X-Firebase-Client"]=r);const i=yield this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n})}_getAppCheckToken(){return k(this,null,function*(){var t;const n=yield(t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken();return n!=null&&n.error&&uy(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token})}}function Qe(e){return _e(e)}class Vd{constructor(t){this.auth=t,this.observer=null,this.addObserver=Zu(n=>this.observer=n)}get next(){return oe(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
|
|
961
961
|
* @license
|
|
962
962
|
* Copyright 2020 Google LLC
|
|
963
963
|
*
|
|
@@ -972,7 +972,7 @@
|
|
|
972
972
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
973
973
|
* See the License for the specific language governing permissions and
|
|
974
974
|
* limitations under the License.
|
|
975
|
-
*/let Di={loadJS(){return k(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function $y(e){Di=e}function sl(e){return Di.loadJS(e)}function Ny(){return Di.recaptchaV2Script}function Fy(){return Di.recaptchaEnterpriseScript}function zy(){return Di.gapiScript}function Hd(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const jy="recaptcha-enterprise",Uy="NO_RECAPTCHA";class Vy{constructor(t){this.type=jy,this.auth=
|
|
975
|
+
*/let Di={loadJS(){return k(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function $y(e){Di=e}function sl(e){return Di.loadJS(e)}function Ny(){return Di.recaptchaV2Script}function Fy(){return Di.recaptchaEnterpriseScript}function zy(){return Di.gapiScript}function Hd(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const jy="recaptcha-enterprise",Uy="NO_RECAPTCHA";class Vy{constructor(t){this.type=jy,this.auth=Qe(t)}verify(t="verify",n=!1){return k(this,null,function*(){function r(o){return k(this,null,function*(){if(!n){if(o.tenantId==null&&o._agentRecaptchaConfig!=null)return o._agentRecaptchaConfig.siteKey;if(o.tenantId!=null&&o._tenantRecaptchaConfigs[o.tenantId]!==void 0)return o._tenantRecaptchaConfigs[o.tenantId].siteKey}return new Promise((a,s)=>k(this,null,function*(){yy(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(l=>{if(l.recaptchaKey===void 0)s(new Error("recaptcha Enterprise site key undefined"));else{const c=new vy(l);return o.tenantId==null?o._agentRecaptchaConfig=c:o._tenantRecaptchaConfigs[o.tenantId]=c,a(c.siteKey)}}).catch(l=>{s(l)})}))})}function i(o,a,s){const l=window.grecaptcha;kd(l)?l.enterprise.ready(()=>{l.enterprise.execute(o,{action:t}).then(c=>{a(c)}).catch(()=>{a(Uy)})}):s(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((o,a)=>{r(this.auth).then(s=>{if(!n&&kd(window.grecaptcha))i(s,o,a);else{if(typeof window=="undefined"){a(new Error("RecaptchaVerifier is only supported in browser"));return}let l=Fy();l.length!==0&&(l+=s),sl(l).then(()=>{i(s,o,a)}).catch(c=>{a(c)})}}).catch(s=>{a(s)})})})}}function Wd(e,t,n,r=!1){return k(this,null,function*(){const i=new Vy(e);let o;try{o=yield i.verify(n)}catch(s){o=yield i.verify(n,!0)}const a=Object.assign({},t);return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a})}function Oi(e,t,n,r){return k(this,null,function*(){var i;if(!((i=e._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=yield Wd(e,t,n,n==="getOobCode");return r(e,o)}else return r(e,t).catch(o=>k(this,null,function*(){if(o.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const a=yield Wd(e,t,n,n==="getOobCode");return r(e,a)}else return Promise.reject(o)}))})}/**
|
|
976
976
|
* @license
|
|
977
977
|
* Copyright 2020 Google LLC
|
|
978
978
|
*
|
|
@@ -987,7 +987,7 @@
|
|
|
987
987
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
988
988
|
* See the License for the specific language governing permissions and
|
|
989
989
|
* limitations under the License.
|
|
990
|
-
*/function Hy(e,t){const n=Oo(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(Po(o,t!=null?t:{}))return i;vt(i,"already-initialized")}return n.initialize({options:t})}function Wy(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Ut);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function ll(e,t,n){const r=
|
|
990
|
+
*/function Hy(e,t){const n=Oo(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if(Po(o,t!=null?t:{}))return i;vt(i,"already-initialized")}return n.initialize({options:t})}function Wy(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Ut);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function ll(e,t,n){const r=Qe(e);oe(r._canInitEmulator,r,"emulator-config-failed"),oe(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(n!=null&&n.disableWarnings),o=Gd(t),{host:a,port:s}=Gy(t),l=s===null?"":`:${s}`;r.config.emulator={url:`${o}//${a}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:s,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||Yy()}function Gd(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Gy(e){const t=Gd(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const o=i[1];return{host:o,port:Yd(r.substr(o.length+1))}}else{const[o,a]=r.split(":");return{host:o,port:Yd(a)}}}function Yd(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function Yy(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console!="undefined"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window!="undefined"&&typeof document!="undefined"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/**
|
|
991
991
|
* @license
|
|
992
992
|
* Copyright 2020 Google LLC
|
|
993
993
|
*
|
|
@@ -1017,7 +1017,7 @@
|
|
|
1017
1017
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1018
1018
|
* See the License for the specific language governing permissions and
|
|
1019
1019
|
* limitations under the License.
|
|
1020
|
-
*/function Kd(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:resetPassword",Ye(e,t))})}function Ky(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}function
|
|
1020
|
+
*/function Kd(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:resetPassword",Ye(e,t))})}function Ky(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",t)})}function Qy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:signUp",t)})}function qy(e,t){return k(this,null,function*(){return Ke(e,"POST","/v1/accounts:update",Ye(e,t))})}/**
|
|
1021
1021
|
* @license
|
|
1022
1022
|
* Copyright 2020 Google LLC
|
|
1023
1023
|
*
|
|
@@ -1062,7 +1062,7 @@
|
|
|
1062
1062
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1063
1063
|
* See the License for the specific language governing permissions and
|
|
1064
1064
|
* limitations under the License.
|
|
1065
|
-
*/class Ri extends Br{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Ri(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Ri(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}_getIdTokenResponse(t){return k(this,null,function*(){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Oi(t,n,"signInWithPassword",Jy);case"emailLink":return nx(t,{email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_linkToIdToken(t,n){return k(this,null,function*(){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Oi(t,r,"signUpPassword",
|
|
1065
|
+
*/class Ri extends Br{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Ri(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Ri(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}_getIdTokenResponse(t){return k(this,null,function*(){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Oi(t,n,"signInWithPassword",Jy);case"emailLink":return nx(t,{email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_linkToIdToken(t,n){return k(this,null,function*(){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Oi(t,r,"signUpPassword",Qy);case"emailLink":return rx(t,{idToken:n,email:this._email,oobCode:this._password});default:vt(t,"internal-error")}})}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}/**
|
|
1066
1066
|
* @license
|
|
1067
1067
|
* Copyright 2020 Google LLC
|
|
1068
1068
|
*
|
|
@@ -1287,7 +1287,7 @@
|
|
|
1287
1287
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1288
1288
|
* See the License for the specific language governing permissions and
|
|
1289
1289
|
* limitations under the License.
|
|
1290
|
-
*/function
|
|
1290
|
+
*/function Qd(e,t){return k(this,null,function*(){return kn(e,"POST","/v1/accounts:signUp",Ye(e,t))})}/**
|
|
1291
1291
|
* @license
|
|
1292
1292
|
* Copyright 2020 Google LLC
|
|
1293
1293
|
*
|
|
@@ -1302,7 +1302,7 @@
|
|
|
1302
1302
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1303
1303
|
* See the License for the specific language governing permissions and
|
|
1304
1304
|
* limitations under the License.
|
|
1305
|
-
*/class Jt{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,n,r,i=!1){return k(this,null,function*(){const o=yield Pn._fromIdTokenResponse(t,r,i),a=
|
|
1305
|
+
*/class Jt{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static _fromIdTokenResponse(t,n,r,i=!1){return k(this,null,function*(){const o=yield Pn._fromIdTokenResponse(t,r,i),a=qd(r);return new Jt({user:o,providerId:a,_tokenResponse:r,operationType:n})})}static _forOperation(t,n,r){return k(this,null,function*(){yield t._updateTokensIfNecessary(r,!0);const i=qd(r);return new Jt({user:t,providerId:i,_tokenResponse:r,operationType:n})})}}function qd(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
|
|
1306
1306
|
* @license
|
|
1307
1307
|
* Copyright 2020 Google LLC
|
|
1308
1308
|
*
|
|
@@ -1317,7 +1317,7 @@
|
|
|
1317
1317
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1318
1318
|
* See the License for the specific language governing permissions and
|
|
1319
1319
|
* limitations under the License.
|
|
1320
|
-
*/function px(e){return k(this,null,function*(){var t;if(Ge(e.app))return Promise.reject(bt(e));const n=
|
|
1320
|
+
*/function px(e){return k(this,null,function*(){var t;if(Ge(e.app))return Promise.reject(bt(e));const n=Qe(e);if(yield n._initializationPromise,!((t=n.currentUser)===null||t===void 0)&&t.isAnonymous)return new Jt({user:n.currentUser,providerId:null,operationType:"signIn"});const r=yield Qd(n,{returnSecureToken:!0}),i=yield Jt._fromIdTokenResponse(n,"signIn",r,!0);return yield n._updateCurrentUser(i.user),i})}/**
|
|
1321
1321
|
* @license
|
|
1322
1322
|
* Copyright 2020 Google LLC
|
|
1323
1323
|
*
|
|
@@ -1392,7 +1392,7 @@
|
|
|
1392
1392
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1393
1393
|
* See the License for the specific language governing permissions and
|
|
1394
1394
|
* limitations under the License.
|
|
1395
|
-
*/function ef(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r="signIn",i=yield Jd(e,r,t),o=yield Jt._fromIdTokenResponse(e,r,i);return n||(yield e._updateCurrentUser(o.user)),o})}function jo(e,t){return k(this,null,function*(){return ef(
|
|
1395
|
+
*/function ef(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r="signIn",i=yield Jd(e,r,t),o=yield Jt._fromIdTokenResponse(e,r,i);return n||(yield e._updateCurrentUser(o.user)),o})}function jo(e,t){return k(this,null,function*(){return ef(Qe(e),t)})}function tf(e,t){return k(this,null,function*(){const n=_e(e);return yield zo(!1,n,t.providerId),cl(n,t)})}function nf(e,t){return k(this,null,function*(){return Zd(_e(e),t)})}/**
|
|
1396
1396
|
* @license
|
|
1397
1397
|
* Copyright 2020 Google LLC
|
|
1398
1398
|
*
|
|
@@ -1422,7 +1422,7 @@
|
|
|
1422
1422
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1423
1423
|
* See the License for the specific language governing permissions and
|
|
1424
1424
|
* limitations under the License.
|
|
1425
|
-
*/function vx(e,t){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const n=
|
|
1425
|
+
*/function vx(e,t){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const n=Qe(e),r=yield mx(n,{token:t,returnSecureToken:!0}),i=yield Jt._fromIdTokenResponse(n,"signIn",r);return yield n._updateCurrentUser(i.user),i})}/**
|
|
1426
1426
|
* @license
|
|
1427
1427
|
* Copyright 2020 Google LLC
|
|
1428
1428
|
*
|
|
@@ -1467,7 +1467,7 @@
|
|
|
1467
1467
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1468
1468
|
* See the License for the specific language governing permissions and
|
|
1469
1469
|
* limitations under the License.
|
|
1470
|
-
*/function fl(e){return k(this,null,function*(){const t=
|
|
1470
|
+
*/function fl(e){return k(this,null,function*(){const t=Qe(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function bx(e,t,n){return k(this,null,function*(){const r=Qe(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&Uo(r,i,n),yield Oi(r,i,"getOobCode",Zy)})}function yx(e,t,n){return k(this,null,function*(){yield Kd(_e(e),{oobCode:t,newPassword:n}).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&fl(e),r}))})}function xx(e,t){return k(this,null,function*(){yield qy(_e(e),{oobCode:t})})}function rf(e,t){return k(this,null,function*(){const n=_e(e),r=yield Kd(n,{oobCode:t}),i=r.requestType;switch(oe(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":oe(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":oe(r.mfaInfo,n,"internal-error");default:oe(r.email,n,"internal-error")}let o=null;return r.mfaInfo&&(o=Li._fromServerResponse(Qe(n),r.mfaInfo)),{data:{email:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.newEmail:r.email)||null,previousEmail:(r.requestType==="VERIFY_AND_CHANGE_EMAIL"?r.email:r.newEmail)||null,multiFactorInfo:o},operation:i}})}function Cx(e,t){return k(this,null,function*(){const{data:n}=yield rf(_e(e),t);return n.email})}function wx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=Qe(e),a=yield Oi(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Qd).catch(l=>{throw l.code==="auth/password-does-not-meet-requirements"&&fl(e),l}),s=yield Jt._fromIdTokenResponse(r,"signIn",a);return yield r._updateCurrentUser(s.user),s})}function Ix(e,t,n){return Ge(e.app)?Promise.reject(bt(e)):jo(_e(e),Jn.credential(t,n)).catch(r=>k(this,null,function*(){throw r.code==="auth/password-does-not-meet-requirements"&&fl(e),r}))}/**
|
|
1471
1471
|
* @license
|
|
1472
1472
|
* Copyright 2020 Google LLC
|
|
1473
1473
|
*
|
|
@@ -1482,7 +1482,7 @@
|
|
|
1482
1482
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1483
1483
|
* See the License for the specific language governing permissions and
|
|
1484
1484
|
* limitations under the License.
|
|
1485
|
-
*/function Sx(e,t,n){return k(this,null,function*(){const r=
|
|
1485
|
+
*/function Sx(e,t,n){return k(this,null,function*(){const r=Qe(e),i={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};function o(a,s){oe(s.handleCodeInApp,r,"argument-error"),s&&Uo(r,a,s)}o(i,n),yield Oi(r,i,"getOobCode",ex)})}function Ax(e,t){const n=$o.parseLink(t);return(n==null?void 0:n.operation)==="EMAIL_SIGNIN"}function Tx(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=_e(e),i=Jn.credentialWithLink(t,n||Si());return oe(i._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),jo(r,i)})}/**
|
|
1486
1486
|
* @license
|
|
1487
1487
|
* Copyright 2020 Google LLC
|
|
1488
1488
|
*
|
|
@@ -1587,7 +1587,7 @@
|
|
|
1587
1587
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1588
1588
|
* See the License for the specific language governing permissions and
|
|
1589
1589
|
* limitations under the License.
|
|
1590
|
-
*/class hl{constructor(t,n,r){this.session=t,this.hints=n,this.signInResolver=r}static _fromError(t,n){const r=
|
|
1590
|
+
*/class hl{constructor(t,n,r){this.session=t,this.hints=n,this.signInResolver=r}static _fromError(t,n){const r=Qe(t),i=n.customData._serverResponse,o=(i.mfaInfo||[]).map(s=>Li._fromServerResponse(r,s));oe(i.mfaPendingCredential,r,"internal-error");const a=hr._fromMfaPendingCredential(i.mfaPendingCredential);return new hl(a,o,s=>k(this,null,function*(){const l=yield s._process(r,a);delete i.mfaInfo,delete i.mfaPendingCredential;const c=Object.assign(Object.assign({},i),{idToken:l.idToken,refreshToken:l.refreshToken});switch(n.operationType){case"signIn":const d=yield Jt._fromIdTokenResponse(r,n.operationType,c);return yield r._updateCurrentUser(d.user),d;case"reauthenticate":return oe(n.user,r,"internal-error"),Jt._forOperation(n.user,n.operationType,c);default:vt(r,"internal-error")}}))}resolveSignIn(t){return k(this,null,function*(){const n=t;return this.signInResolver(n)})}}function Vx(e,t){var n;const r=_e(e),i=t;return oe(t.customData.operationType,r,"argument-error"),oe((n=i.customData._serverResponse)===null||n===void 0?void 0:n.mfaPendingCredential,r,"argument-error"),hl._fromError(r,i)}/**
|
|
1591
1591
|
* @license
|
|
1592
1592
|
* Copyright 2020 Google LLC
|
|
1593
1593
|
*
|
|
@@ -1632,7 +1632,7 @@
|
|
|
1632
1632
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1633
1633
|
* See the License for the specific language governing permissions and
|
|
1634
1634
|
* limitations under the License.
|
|
1635
|
-
*/const Kx=1e3,
|
|
1635
|
+
*/const Kx=1e3,Qx=10;class jr extends sf{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=jd(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((a,s,l)=>{this.notifyListeners(a,l)});return}const r=t.key;n?this.detachListener():this.stopPolling();const i=()=>{const a=this.storage.getItem(r);!n&&this.localCache[r]===a||this.notifyListeners(r,a)},o=this.storage.getItem(r);Dy()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,Qx):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},Kx)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(t,n){return k(this,null,function*(){yield Tr(jr.prototype,this,"_set").call(this,t,n),this.localCache[t]=JSON.stringify(n)})}_get(t){return k(this,null,function*(){const n=yield Tr(jr.prototype,this,"_get").call(this,t);return this.localCache[t]=JSON.stringify(n),n})}_remove(t){return k(this,null,function*(){yield Tr(jr.prototype,this,"_remove").call(this,t),delete this.localCache[t]})}}jr.type="LOCAL";const Ho=jr;/**
|
|
1636
1636
|
* @license
|
|
1637
1637
|
* Copyright 2020 Google LLC
|
|
1638
1638
|
*
|
|
@@ -1662,7 +1662,7 @@
|
|
|
1662
1662
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1663
1663
|
* See the License for the specific language governing permissions and
|
|
1664
1664
|
* limitations under the License.
|
|
1665
|
-
*/function
|
|
1665
|
+
*/function qx(e){return Promise.all(e.map(t=>k(this,null,function*(){try{return{fulfilled:!0,value:yield t}}catch(n){return{fulfilled:!1,reason:n}}})))}/**
|
|
1666
1666
|
* @license
|
|
1667
1667
|
* Copyright 2019 Google LLC
|
|
1668
1668
|
*
|
|
@@ -1677,7 +1677,7 @@
|
|
|
1677
1677
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1678
1678
|
* See the License for the specific language governing permissions and
|
|
1679
1679
|
* limitations under the License.
|
|
1680
|
-
*/class Wo{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Wo(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return k(this,null,function*(){const n=t,{eventId:r,eventType:i,data:o}=n.data,a=this.handlersMap[i];if(!(a!=null&&a.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const s=Array.from(a).map(c=>k(this,null,function*(){return c(n.origin,o)})),l=yield
|
|
1680
|
+
*/class Wo{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new Wo(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return k(this,null,function*(){const n=t,{eventId:r,eventType:i,data:o}=n.data,a=this.handlersMap[i];if(!(a!=null&&a.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const s=Array.from(a).map(c=>k(this,null,function*(){return c(n.origin,o)})),l=yield qx(s);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:l})})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Wo.receivers=[];/**
|
|
1681
1681
|
* @license
|
|
1682
1682
|
* Copyright 2020 Google LLC
|
|
1683
1683
|
*
|
|
@@ -1812,7 +1812,7 @@
|
|
|
1812
1812
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1813
1813
|
* See the License for the specific language governing permissions and
|
|
1814
1814
|
* limitations under the License.
|
|
1815
|
-
*/const pf="recaptcha",bC={theme:"light",type:"image"};let yC=class{constructor(t,n,r=Object.assign({},bC)){this.parameters=r,this.type=pf,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=
|
|
1815
|
+
*/const pf="recaptcha",bC={theme:"light",type:"image"};let yC=class{constructor(t,n,r=Object.assign({},bC)){this.parameters=r,this.type=pf,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=Qe(t),this.isInvisible=this.parameters.size==="invisible",oe(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment");const i=typeof n=="string"?document.getElementById(n):n;oe(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new vC:new gC,this.validateStartingState()}verify(){return k(this,null,function*(){this.assertNotDestroyed();const t=yield this.render(),n=this.getAssertedRecaptcha(),r=n.getResponse(t);return r||new Promise(i=>{const o=a=>{a&&(this.tokenChangeListeners.delete(o),i(a))};this.tokenChangeListeners.add(o),this.isInvisible&&n.execute(t)})})}render(){try{this.assertNotDestroyed()}catch(t){return Promise.reject(t)}return this.renderPromise?this.renderPromise:(this.renderPromise=this.makeRenderPromise().catch(t=>{throw this.renderPromise=null,t}),this.renderPromise)}_reset(){this.assertNotDestroyed(),this.widgetId!==null&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(t=>{this.container.removeChild(t)})}validateStartingState(){oe(!this.parameters.sitekey,this.auth,"argument-error"),oe(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),oe(typeof document!="undefined",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(t){return n=>{if(this.tokenChangeListeners.forEach(r=>r(n)),typeof t=="function")t(n);else if(typeof t=="string"){const r=ct()[t];typeof r=="function"&&r(n)}}}assertNotDestroyed(){oe(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){return k(this,null,function*(){if(yield this.init(),!this.widgetId){let t=this.container;if(!this.isInvisible){const n=document.createElement("div");t.appendChild(n),t=n}this.widgetId=this.getAssertedRecaptcha().render(t,this.parameters)}return this.widgetId})}init(){return k(this,null,function*(){oe(rl()&&!ml(),this.auth,"internal-error"),yield xC(),this.recaptcha=yield this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const t=yield by(this.auth);oe(t,this.auth,"internal-error"),this.parameters.sitekey=t})}getAssertedRecaptcha(){return oe(this.recaptcha,this.auth,"internal-error"),this.recaptcha}};function xC(){let e=null;return new Promise(t=>{if(document.readyState==="complete"){t();return}e=()=>t(),window.addEventListener("load",e)}).catch(t=>{throw e&&window.removeEventListener("load",e),t})}/**
|
|
1816
1816
|
* @license
|
|
1817
1817
|
* Copyright 2020 Google LLC
|
|
1818
1818
|
*
|
|
@@ -1827,7 +1827,7 @@
|
|
|
1827
1827
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1828
1828
|
* See the License for the specific language governing permissions and
|
|
1829
1829
|
* limitations under the License.
|
|
1830
|
-
*/class yl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=fr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function CC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=
|
|
1830
|
+
*/class yl{constructor(t,n){this.verificationId=t,this.onConfirmation=n}confirm(t){const n=fr._fromVerification(this.verificationId,t);return this.onConfirmation(n)}}function CC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=Qe(e),i=yield Qo(r,t,_e(n));return new yl(i,o=>jo(r,o))})}function wC(e,t,n){return k(this,null,function*(){const r=_e(e);yield zo(!1,r,"phone");const i=yield Qo(r.auth,t,_e(n));return new yl(i,o=>tf(r,o))})}function IC(e,t,n){return k(this,null,function*(){const r=_e(e);if(Ge(r.auth.app))return Promise.reject(bt(r.auth));const i=yield Qo(r.auth,t,_e(n));return new yl(i,o=>nf(r,o))})}function Qo(e,t,n){return k(this,null,function*(){var r;const i=yield n.verify();try{oe(typeof i=="string",e,"argument-error"),oe(n.type===pf,e,"argument-error");let o;if(typeof t=="string"?o={phoneNumber:t}:o=t,"session"in o){const a=o.session;if("phoneNumber"in o)return oe(a.type==="enroll",e,"internal-error"),(yield Hx(e,{idToken:a.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo;{oe(a.type==="signin",e,"internal-error");const s=((r=o.multiFactorHint)===null||r===void 0?void 0:r.uid)||o.multiFactorUid;return oe(s,e,"missing-multi-factor-info"),(yield sC(e,{mfaPendingCredential:a.credential,mfaEnrollmentId:s,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}else{const{sessionInfo:a}=yield ox(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return a}}finally{n._reset()}})}function SC(e,t){return k(this,null,function*(){const n=_e(e);if(Ge(n.auth.app))return Promise.reject(bt(n.auth));yield cl(n,t)})}/**
|
|
1831
1831
|
* @license
|
|
1832
1832
|
* Copyright 2020 Google LLC
|
|
1833
1833
|
*
|
|
@@ -1842,7 +1842,7 @@
|
|
|
1842
1842
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1843
1843
|
* See the License for the specific language governing permissions and
|
|
1844
1844
|
* limitations under the License.
|
|
1845
|
-
*/let pr=class Ns{constructor(t){this.providerId=Ns.PROVIDER_ID,this.auth=
|
|
1845
|
+
*/let pr=class Ns{constructor(t){this.providerId=Ns.PROVIDER_ID,this.auth=Qe(t)}verifyPhoneNumber(t,n){return Qo(this.auth,t,_e(n))}static credential(t,n){return fr._fromVerification(t,n)}static credentialFromResult(t){const n=t;return Ns.credentialFromTaggedObject(n)}static credentialFromError(t){return Ns.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{phoneNumber:n,temporaryProof:r}=t;return n&&r?fr._fromTokenResponse(n,r):null}};pr.PROVIDER_ID="phone",pr.PHONE_SIGN_IN_METHOD="phone";/**
|
|
1846
1846
|
* @license
|
|
1847
1847
|
* Copyright 2021 Google LLC
|
|
1848
1848
|
*
|
|
@@ -1902,7 +1902,7 @@
|
|
|
1902
1902
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1903
1903
|
* See the License for the specific language governing permissions and
|
|
1904
1904
|
* limitations under the License.
|
|
1905
|
-
*/const kC=new Ai(2e3,1e4);function _C(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(gt(e,"operation-not-supported-in-this-environment"));const r=
|
|
1905
|
+
*/const kC=new Ai(2e3,1e4);function _C(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(gt(e,"operation-not-supported-in-this-environment"));const r=Qe(e);Or(e,t,On);const i=gr(r,n);return new Rn(r,"signInViaPopup",t,i).executeNotNull()})}function PC(e,t,n){return k(this,null,function*(){const r=_e(e);if(Ge(r.auth.app))return Promise.reject(gt(r.auth,"operation-not-supported-in-this-environment"));Or(r.auth,t,On);const i=gr(r.auth,n);return new Rn(r.auth,"reauthViaPopup",t,i,r).executeNotNull()})}function DC(e,t,n){return k(this,null,function*(){const r=_e(e);Or(r.auth,t,On);const i=gr(r.auth,n);return new Rn(r.auth,"linkViaPopup",t,i,r).executeNotNull()})}class Rn extends gf{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,Rn.currentPopupAction&&Rn.currentPopupAction.cancel(),Rn.currentPopupAction=this}executeNotNull(){return k(this,null,function*(){const t=yield this.execute();return oe(t,this.auth,"internal-error"),t})}onExecution(){return k(this,null,function*(){an(this.filter.length===1,"Popup operations only handle one event");const t=Mi();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(gt(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(gt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Rn.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(gt(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,kC.get())};t()}}Rn.currentPopupAction=null;/**
|
|
1906
1906
|
* @license
|
|
1907
1907
|
* Copyright 2020 Google LLC
|
|
1908
1908
|
*
|
|
@@ -1932,7 +1932,7 @@
|
|
|
1932
1932
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1933
1933
|
* See the License for the specific language governing permissions and
|
|
1934
1934
|
* limitations under the License.
|
|
1935
|
-
*/function MC(e,t,n){return BC(e,t,n)}function BC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=
|
|
1935
|
+
*/function MC(e,t,n){return BC(e,t,n)}function BC(e,t,n){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=Qe(e);Or(e,t,On),yield r._initializationPromise;const i=gr(r,n);return yield Cl(i,r),i._openRedirect(r,t,"signInViaRedirect")})}function $C(e,t,n){return NC(e,t,n)}function NC(e,t,n){return k(this,null,function*(){const r=_e(e);if(Or(r.auth,t,On),Ge(r.auth.app))return Promise.reject(bt(r.auth));yield r.auth._initializationPromise;const i=gr(r.auth,n);yield Cl(i,r.auth);const o=yield bf(r);return i._openRedirect(r.auth,t,"reauthViaRedirect",o)})}function FC(e,t,n){return zC(e,t,n)}function zC(e,t,n){return k(this,null,function*(){const r=_e(e);Or(r.auth,t,On),yield r.auth._initializationPromise;const i=gr(r.auth,n);yield zo(!1,r,t.providerId),yield Cl(i,r.auth);const o=yield bf(r);return i._openRedirect(r.auth,t,"linkViaRedirect",o)})}function jC(e,t){return k(this,null,function*(){return yield Qe(e)._initializationPromise,qo(e,t,!1)})}function qo(e,t,n=!1){return k(this,null,function*(){if(Ge(e.app))return Promise.reject(bt(e));const r=Qe(e),i=gr(r,t),a=yield new Ni(r,i,n).execute();return a&&!n&&(delete a.user._redirectEventId,yield r._persistUserIfCurrent(a.user),yield r._setRedirectUser(null,t)),a})}function bf(e){return k(this,null,function*(){const t=Mi(`${e.uid}:::`);return e._redirectEventId=t,yield e.auth._setRedirectUser(e),yield e.auth._persistUserIfCurrent(e),t})}/**
|
|
1936
1936
|
* @license
|
|
1937
1937
|
* Copyright 2020 Google LLC
|
|
1938
1938
|
*
|
|
@@ -1992,7 +1992,7 @@
|
|
|
1992
1992
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1993
1993
|
* See the License for the specific language governing permissions and
|
|
1994
1994
|
* limitations under the License.
|
|
1995
|
-
*/const KC=new Ai(3e4,6e4);function If(){const e=ct().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function
|
|
1995
|
+
*/const KC=new Ai(3e4,6e4);function If(){const e=ct().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function QC(e){return new Promise((t,n)=>{var r,i,o;function a(){If(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{If(),n(gt(e,"network-request-failed"))},timeout:KC.get()})}if(!((i=(r=ct().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)t(gapi.iframes.getContext());else if(!((o=ct().gapi)===null||o===void 0)&&o.load)a();else{const s=Hd("iframefcb");return ct()[s]=()=>{gapi.load?a():n(gt(e,"network-request-failed"))},sl(`${zy()}?onload=${s}`).catch(l=>n(l))}}).catch(t=>{throw Jo=null,t})}let Jo=null;function qC(e){return Jo=Jo||QC(e),Jo}/**
|
|
1996
1996
|
* @license
|
|
1997
1997
|
* Copyright 2020 Google LLC.
|
|
1998
1998
|
*
|
|
@@ -2007,7 +2007,7 @@
|
|
|
2007
2007
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2008
2008
|
* See the License for the specific language governing permissions and
|
|
2009
2009
|
* limitations under the License.
|
|
2010
|
-
*/const JC=new Ai(5e3,15e3),XC="__/auth/iframe",ZC="emulator/auth/iframe",ew={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},tw=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function nw(e){const t=e.config;oe(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?il(t,ZC):`https://${e.config.authDomain}/${XC}`,r={apiKey:t.apiKey,appName:e.name,v:ur},i=tw.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Er(r).slice(1)}`}function rw(e){return k(this,null,function*(){const t=yield
|
|
2010
|
+
*/const JC=new Ai(5e3,15e3),XC="__/auth/iframe",ZC="emulator/auth/iframe",ew={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},tw=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function nw(e){const t=e.config;oe(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?il(t,ZC):`https://${e.config.authDomain}/${XC}`,r={apiKey:t.apiKey,appName:e.name,v:ur},i=tw.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Er(r).slice(1)}`}function rw(e){return k(this,null,function*(){const t=yield qC(e),n=ct().gapi;return oe(n,e,"internal-error"),t.open({where:document.body,url:nw(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ew,dontclear:!0},r=>new Promise((i,o)=>k(this,null,function*(){yield r.restyle({setHideOnLeave:!1});const a=gt(e,"network-request-failed"),s=ct().setTimeout(()=>{o(a)},JC.get());function l(){ct().clearTimeout(s),i(r)}r.ping(l).then(l,()=>{o(a)})})))})}/**
|
|
2011
2011
|
* @license
|
|
2012
2012
|
* Copyright 2020 Google LLC.
|
|
2013
2013
|
*
|
|
@@ -2052,7 +2052,7 @@
|
|
|
2052
2052
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2053
2053
|
* See the License for the specific language governing permissions and
|
|
2054
2054
|
* limitations under the License.
|
|
2055
|
-
*/const Sl="webStorageSupport";class gw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Xn,this._completeRedirectFn=
|
|
2055
|
+
*/const Sl="webStorageSupport";class gw{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Xn,this._completeRedirectFn=qo,this._overrideRedirectResult=wl}_openPopup(t,n,r,i){return k(this,null,function*(){var o;an((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const a=yield Il(t,n,r,Si(),i);return cw(t,a,Mi())})}_openRedirect(t,n,r,i){return k(this,null,function*(){yield this._originValidation(t);const o=yield Il(t,n,r,Si(),i);return Xx(o),new Promise(()=>{})})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(an(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}initAndGetManager(t){return k(this,null,function*(){const n=yield rw(t),r=new yf(t);return n.register("authEvent",i=>(oe(i==null?void 0:i.authEvent,t,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r})}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(Sl,{type:Sl},i=>{var o;const a=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[Sl];a!==void 0&&n(!!a),vt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=GC(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return jd()||Bd()||Pi()}}const Af=gw;class mw{constructor(t){this.factorId=t}_process(t,n,r){switch(n.type){case"enroll":return this._finalizeEnroll(t,n.credential,r);case"signin":return this._finalizeSignIn(t,n.credential);default:return hn("unexpected MultiFactorSessionType")}}}class Al extends mw{constructor(t){super("phone"),this.credential=t}static _fromCredential(t){return new Al(t)}_finalizeEnroll(t,n,r){return Wx(t,{idToken:n,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(t,n){return lC(t,{mfaPendingCredential:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class Tf{constructor(){}static assertion(t){return Al._fromCredential(t)}}Tf.FACTOR_ID="phone";var Ef="@firebase/auth",kf="1.7.7";/**
|
|
2056
2056
|
* @license
|
|
2057
2057
|
* Copyright 2020 Google LLC
|
|
2058
2058
|
*
|
|
@@ -2082,7 +2082,7 @@
|
|
|
2082
2082
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2083
2083
|
* See the License for the specific language governing permissions and
|
|
2084
2084
|
* limitations under the License.
|
|
2085
|
-
*/function bw(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function yw(e){cr(new Wn("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:s}=r.options;oe(a&&!a.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:a,authDomain:s,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ud(e)},c=new By(r,i,o,l);return Wy(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),cr(new Wn("auth-internal",t=>{const n=
|
|
2085
|
+
*/function bw(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function yw(e){cr(new Wn("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:a,authDomain:s}=r.options;oe(a&&!a.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:a,authDomain:s,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ud(e)},c=new By(r,i,o,l);return Wy(c,n),c},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),cr(new Wn("auth-internal",t=>{const n=Qe(t.getProvider("auth").getImmediate());return(r=>new vw(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),En(Ef,kf,bw(e)),En(Ef,kf,"esm2017")}/**
|
|
2086
2086
|
* @license
|
|
2087
2087
|
* Copyright 2021 Google LLC
|
|
2088
2088
|
*
|
|
@@ -2157,7 +2157,7 @@
|
|
|
2157
2157
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2158
2158
|
* See the License for the specific language governing permissions and
|
|
2159
2159
|
* limitations under the License.
|
|
2160
|
-
*/const jw=500;class Uw{constructor(){this._redirectPersistence=Xn,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=
|
|
2160
|
+
*/const jw=500;class Uw{constructor(){this._redirectPersistence=Xn,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=qo,this._overrideRedirectResult=wl}_initialize(t){return k(this,null,function*(){const n=t._key();let r=this.eventManagers.get(n);return r||(r=new Lw(t),this.eventManagers.set(n,r),this.attachCallbackListeners(t,r)),r})}_openPopup(t){vt(t,"operation-not-supported-in-this-environment")}_openRedirect(t,n,r,i){return k(this,null,function*(){Pw(t);const o=yield this._initialize(t);yield o.initialized(),o.resetRedirect(),LC(),yield this._originValidation(t);const a=Mw(t,r,i);yield Bw(t,a);const s=yield Tw(t,a,n),l=yield kw(s);return _w(t,o,l)})}_isIframeWebStorageSupported(t,n){throw new Error("Method not implemented.")}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=Ew(t)),this.originValidationPromises[n]}attachCallbackListeners(t,n){const{universalLinks:r,handleOpenURL:i,BuildInfo:o}=mr(),a=setTimeout(()=>k(this,null,function*(){yield Pf(t),n.onEvent(Df())}),jw),s=d=>k(this,null,function*(){clearTimeout(a);const f=yield Pf(t);let h=null;f&&(d!=null&&d.url)&&(h=$w(f,d.url)),n.onEvent(h||Df())});typeof r!="undefined"&&typeof r.subscribe=="function"&&r.subscribe(null,s);const l=i,c=`${o.packageName.toLowerCase()}://`;mr().handleOpenURL=d=>k(this,null,function*(){if(d.toLowerCase().startsWith(c)&&s({url:d}),typeof l=="function")try{l(d)}catch(f){console.error(f)}})}}const Vw=Uw;function Df(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:gt("no-auth-event")}}/**
|
|
2161
2161
|
* @license
|
|
2162
2162
|
* Copyright 2017 Google LLC
|
|
2163
2163
|
*
|
|
@@ -2172,7 +2172,7 @@
|
|
|
2172
2172
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2173
2173
|
* See the License for the specific language governing permissions and
|
|
2174
2174
|
* limitations under the License.
|
|
2175
|
-
*/function Hw(e,t){
|
|
2175
|
+
*/function Hw(e,t){Qe(e)._logFramework(t)}var Ww="@firebase/auth-compat",Gw="0.5.12";/**
|
|
2176
2176
|
* @license
|
|
2177
2177
|
* Copyright 2020 Google LLC
|
|
2178
2178
|
*
|
|
@@ -2187,7 +2187,7 @@
|
|
|
2187
2187
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2188
2188
|
* See the License for the specific language governing permissions and
|
|
2189
2189
|
* limitations under the License.
|
|
2190
|
-
*/const Yw=1e3;function Fi(){var e;return((e=self==null?void 0:self.location)===null||e===void 0?void 0:e.protocol)||null}function Kw(){return Fi()==="http:"||Fi()==="https:"}function Of(e=pt()){return!!((Fi()==="file:"||Fi()==="ionic:"||Fi()==="capacitor:")&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function
|
|
2190
|
+
*/const Yw=1e3;function Fi(){var e;return((e=self==null?void 0:self.location)===null||e===void 0?void 0:e.protocol)||null}function Kw(){return Fi()==="http:"||Fi()==="https:"}function Of(e=pt()){return!!((Fi()==="file:"||Fi()==="ionic:"||Fi()==="capacitor:")&&e.toLowerCase().match(/iphone|ipad|ipod|android/))}function Qw(){return Fs()||Yu()}function qw(){return qu()&&(document==null?void 0:document.documentMode)===11}function Jw(e=pt()){return/Edge\/\d+/.test(e)}function Xw(e=pt()){return qw()||Jw(e)}function Rf(){try{const e=self.localStorage,t=Mi();if(e)return e.setItem(t,"1"),e.removeItem(t),Xw()?_o():!0}catch(e){return kl()&&_o()}return!1}function kl(){return typeof global!="undefined"&&"WorkerGlobalScope"in global&&"importScripts"in global}function _l(){return(Kw()||Qu()||Of())&&!Qw()&&Rf()&&!kl()}function Lf(){return Of()&&typeof document!="undefined"}function Zw(){return k(this,null,function*(){return Lf()?new Promise(e=>{const t=setTimeout(()=>{e(!1)},Yw);document.addEventListener("deviceready",()=>{clearTimeout(t),e(!0)})}):!1})}function eI(){return typeof window!="undefined"?window:null}/**
|
|
2191
2191
|
* @license
|
|
2192
2192
|
* Copyright 2020 Google LLC
|
|
2193
2193
|
*
|
|
@@ -2217,7 +2217,7 @@
|
|
|
2217
2217
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2218
2218
|
* See the License for the specific language governing permissions and
|
|
2219
2219
|
* limitations under the License.
|
|
2220
|
-
*/const rI=oe;class Zn{constructor(){this.browserResolver=Ut(Af),this.cordovaResolver=Ut(Vw),this.underlyingResolver=null,this._redirectPersistence=Xn,this._completeRedirectFn=
|
|
2220
|
+
*/const rI=oe;class Zn{constructor(){this.browserResolver=Ut(Af),this.cordovaResolver=Ut(Vw),this.underlyingResolver=null,this._redirectPersistence=Xn,this._completeRedirectFn=qo,this._overrideRedirectResult=wl}_initialize(t){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(t)})}_openPopup(t,n,r,i){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(t,n,r,i)})}_openRedirect(t,n,r,i){return k(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openRedirect(t,n,r,i)})}_isIframeWebStorageSupported(t,n){this.assertedUnderlyingResolver._isIframeWebStorageSupported(t,n)}_originValidation(t){return this.assertedUnderlyingResolver._originValidation(t)}get _shouldInitProactively(){return Lf()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return rI(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){return k(this,null,function*(){if(this.underlyingResolver)return;const t=yield Zw();this.underlyingResolver=t?this.cordovaResolver:this.browserResolver})}}/**
|
|
2221
2221
|
* @license
|
|
2222
2222
|
* Copyright 2020 Google LLC
|
|
2223
2223
|
*
|
|
@@ -2262,7 +2262,7 @@
|
|
|
2262
2262
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2263
2263
|
* See the License for the specific language governing permissions and
|
|
2264
2264
|
* limitations under the License.
|
|
2265
|
-
*/class Ln{constructor(t){this._delegate=t,this.multiFactor=Yx(t)}static getOrCreate(t){return Ln.USER_MAP.has(t)||Ln.USER_MAP.set(t,new Ln(t)),Ln.USER_MAP.get(t)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(t){return this._delegate.getIdTokenResult(t)}getIdToken(t){return this._delegate.getIdToken(t)}linkAndRetrieveDataWithCredential(t){return this.linkWithCredential(t)}linkWithCredential(t){return k(this,null,function*(){return Nt(this.auth,tf(this._delegate,t))})}linkWithPhoneNumber(t,n){return k(this,null,function*(){return Dl(this.auth,wC(this._delegate,t,n))})}linkWithPopup(t){return k(this,null,function*(){return Nt(this.auth,DC(this._delegate,t,Zn))})}linkWithRedirect(t){return k(this,null,function*(){return yield Pl(
|
|
2265
|
+
*/class Ln{constructor(t){this._delegate=t,this.multiFactor=Yx(t)}static getOrCreate(t){return Ln.USER_MAP.has(t)||Ln.USER_MAP.set(t,new Ln(t)),Ln.USER_MAP.get(t)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(t){return this._delegate.getIdTokenResult(t)}getIdToken(t){return this._delegate.getIdToken(t)}linkAndRetrieveDataWithCredential(t){return this.linkWithCredential(t)}linkWithCredential(t){return k(this,null,function*(){return Nt(this.auth,tf(this._delegate,t))})}linkWithPhoneNumber(t,n){return k(this,null,function*(){return Dl(this.auth,wC(this._delegate,t,n))})}linkWithPopup(t){return k(this,null,function*(){return Nt(this.auth,DC(this._delegate,t,Zn))})}linkWithRedirect(t){return k(this,null,function*(){return yield Pl(Qe(this.auth)),FC(this._delegate,t,Zn)})}reauthenticateAndRetrieveDataWithCredential(t){return this.reauthenticateWithCredential(t)}reauthenticateWithCredential(t){return k(this,null,function*(){return Nt(this.auth,nf(this._delegate,t))})}reauthenticateWithPhoneNumber(t,n){return Dl(this.auth,IC(this._delegate,t,n))}reauthenticateWithPopup(t){return Nt(this.auth,PC(this._delegate,t,Zn))}reauthenticateWithRedirect(t){return k(this,null,function*(){return yield Pl(Qe(this.auth)),$C(this._delegate,t,Zn)})}sendEmailVerification(t){return _x(this._delegate,t)}unlink(t){return k(this,null,function*(){return yield gx(this._delegate,t),this})}updateEmail(t){return Rx(this._delegate,t)}updatePassword(t){return Lx(this._delegate,t)}updatePhoneNumber(t){return SC(this._delegate,t)}updateProfile(t){return Ox(this._delegate,t)}verifyBeforeUpdateEmail(t,n){return Px(this._delegate,t,n)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}}Ln.USER_MAP=new WeakMap;/**
|
|
2266
2266
|
* @license
|
|
2267
2267
|
* Copyright 2020 Google LLC
|
|
2268
2268
|
*
|
|
@@ -2292,7 +2292,7 @@
|
|
|
2292
2292
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2293
2293
|
* See the License for the specific language governing permissions and
|
|
2294
2294
|
* limitations under the License.
|
|
2295
|
-
*/class Rl{constructor(){this.providerId="phone",this._delegate=new pr($f(
|
|
2295
|
+
*/class Rl{constructor(){this.providerId="phone",this._delegate=new pr($f(Qn.auth()))}static credential(t,n){return pr.credential(t,n)}verifyPhoneNumber(t,n){return this._delegate.verifyPhoneNumber(t,n)}unwrap(){return this._delegate}}Rl.PHONE_SIGN_IN_METHOD=pr.PHONE_SIGN_IN_METHOD,Rl.PROVIDER_ID=pr.PROVIDER_ID;/**
|
|
2296
2296
|
* @license
|
|
2297
2297
|
* Copyright 2020 Google LLC
|
|
2298
2298
|
*
|
|
@@ -2307,7 +2307,7 @@
|
|
|
2307
2307
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2308
2308
|
* See the License for the specific language governing permissions and
|
|
2309
2309
|
* limitations under the License.
|
|
2310
|
-
*/const cI=oe;class uI{constructor(t,n,r=
|
|
2310
|
+
*/const cI=oe;class uI{constructor(t,n,r=Qn.app()){var i;cI((i=r.options)===null||i===void 0?void 0:i.apiKey,"invalid-api-key",{appName:r.name}),this._delegate=new yC(r.auth(),t,n),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}}/**
|
|
2311
2311
|
* @license
|
|
2312
2312
|
* Copyright 2020 Google LLC
|
|
2313
2313
|
*
|
|
@@ -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 dI="auth-compat";function fI(e){e.INTERNAL.registerComponent(new Wn(dI,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:Tf,RecaptchaVerifier:uI,TwitterAuthProvider:bn,Auth:Ol,AuthCredential:Br,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Ww,Gw)}fI(qn);let zf=!1;const Ui=e=>{if(zf)return qn.auth();if(e&&e==="dev"){qn.initializeApp({apiKey:"api_key"});const n=Iw();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 zf=!0,qn.auth()},hI=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class pI{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=hI(this.environment)}}const gI=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",mI=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",vI=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",bI=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",yI=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",xI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",CI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",wI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class II extends pI{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>k(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>k(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>k(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>k(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>k(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r,i)=>k(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=N({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(Q(N({},s),{limit:i.toString()})),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Q(N({},this.mainQueryParams),{limit:r.toString()})),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>k(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>k(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClientFeatures",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features?`,i={key:this.apiKey};return n&&(i.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i))}));te(this,"updateEntityFeatures",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getClassicQuizFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>k(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>k(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>k(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",s=Q(N({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=Q(N({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createPoll",n=>k(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>k(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>k(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=Q(N({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>k(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),l={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(l),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createEitherOr",n=>k(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>k(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>k(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getListById",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>k(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createList",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>k(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>k(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>k(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>k(this,null,function*(){const r="/leads/export?",i=Q(N({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>k(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(N(N({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>k(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(N(N({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>k(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>k(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>k(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>k(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>k(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>k(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));te(this,"unbanUser",(n,r)=>k(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>k(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));te(this,"deleteUserProfile",n=>k(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>k(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>k(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>k(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let l={};if(r.length>0){const c=r.join(",");l=Q(N({},this.mainQueryParams),{post_ids:c,reason:i})}else l=Q(N({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(l),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>k(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>k(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>k(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(N(N({},this.mainQueryParams),n)),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>k(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(N(N({},this.mainQueryParams),n)),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"updateProfilePreferences",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"getClientBadges",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateClientBadges",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));te(this,"getEngagementThroughPredictionsReport",(n,r,i)=>k(this,null,function*(){const o="/predictions/football/engagements?",a=Q(N({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));this.loyaltyBaseUrl=gI(n.environment),this.predictionBaseUrl=mI(n.environment),this.miniGamesApiBaseUrl=vI(n.environment),this.reportingApiBaseUrl=bI(n.environment),this.votingApiBaseUrl=yI(n.environment),this.profileApiBaseUrl=CI(n.environment),this.customResolverUrl=xI(n.environment),this.discussionsApiBaseUrl=wI(n.environment)}}const SI=(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),AI=({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=SI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new II(n,r);return u.jsx(Zo.Provider,{value:{sdk:i,https:o},children:t})},jf=C.createContext(null),TI=({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 Uf={exports:{}},EI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kI=EI,_I=kI;function Vf(){}function Hf(){}Hf.resetWarningCache=Vf;var PI=function(){function e(r,i,o,a,s,l){if(l!==_I){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:Hf,resetWarningCache:Vf};return n.PropTypes=n,n};Uf.exports=PI();var DI=Uf.exports;function OI(e){return typeof e=="string"}function RI(e,t,n){return e===void 0||OI(e)?t:O({},t,{ownerState:O({},t.ownerState,n)})}function Wf(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 LI(e,t,n){return typeof e=="function"?e(t,n):e}function MI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=V.useState(t.toUpperCase()),o=V.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function BI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return V.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{BI(n,t)})},e)}function Gf(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=Gf(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=Gf(e))&&(r&&(r+=" "),r+=t);return r}function Yf(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 $I(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=Yf(r),l=Yf(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 Kf(e){if(V.isValidElement(e)||!er(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Kf(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=>{V.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])?Kf(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 qf={exports:{}},$e={};/**
|
|
2325
|
+
*/const dI="auth-compat";function fI(e){e.INTERNAL.registerComponent(new Wn(dI,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:Tf,RecaptchaVerifier:uI,TwitterAuthProvider:bn,Auth:Ol,AuthCredential:Br,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Ww,Gw)}fI(Qn);let zf=!1;const Ui=e=>{if(zf)return Qn.auth();if(e&&e==="dev"){Qn.initializeApp({apiKey:"api_key"});const n=Iw();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 zf=!0,Qn.auth()},hI=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class pI{constructor(t,n){ee(this,"apiKey","");ee(this,"clientId","");ee(this,"environment","");ee(this,"mainQueryParams",{key:"",client_id:""});ee(this,"headers",{"Content-Type":"application/json"});ee(this,"clientApiBaseUrl","");ee(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");ee(this,"sportal365Config",null);ee(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)})}));ee(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)}));ee(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})}}));ee(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})})}));ee(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})}));ee(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"})}));ee(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)}));ee(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}`);ee(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)});ee(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=hI(this.environment)}}const gI=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",mI=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",vI=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",bI=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",yI=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",xI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",CI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",wI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class II extends pI{constructor(n,r){super(n,r);ee(this,"loyaltyBaseUrl","");ee(this,"predictionBaseUrl","");ee(this,"miniGamesApiBaseUrl","");ee(this,"reportingApiBaseUrl","");ee(this,"votingApiBaseUrl","");ee(this,"profileApiBaseUrl","");ee(this,"customResolverUrl","");ee(this,"discussionsApiBaseUrl","");ee(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})})}));ee(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)})}));ee(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)})}));ee(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"})}));ee(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)})}));ee(this,"exportDetailedLeaderboard",(n,r,i)=>k(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=N({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(q(N({},s),{limit:i.toString()})),{headers:q(N({},this.headers),{Authorization:"Bearer "+a})})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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))}));ee(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))}));ee(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)})}));ee(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))}));ee(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))}));ee(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))}));ee(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)})}));ee(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)})}));ee(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})})}));ee(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"})}));ee(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"})}));ee(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)})}));ee(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})})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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"})}));ee(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})})}));ee(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>k(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),l={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(l),{headers:q(N({},this.headers),{Authorization:"Bearer "+s})})}));ee(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)})}));ee(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)})}));ee(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"})}));ee(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})})}));ee(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})})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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"})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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)})}));ee(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)})}));ee(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})})}));ee(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})})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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)})}));ee(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"})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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)})}));ee(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"})}));ee(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)})}));ee(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"})}));ee(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"})}));ee(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"})}));ee(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"})}));ee(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})})}));ee(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})})}));ee(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)})}));ee(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)})}));ee(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})})}));ee(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)})}));ee(this,"getEngagementThroughPredictionsReport",(n,r,i)=>k(this,null,function*(){const o="/predictions/football/engagements?",a=q(N({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:q(N({},this.headers),{Authorization:"Bearer "+s})})}));ee(this,"createPersonalityQuiz",n=>k(this,null,function*(){const r="/personality-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)})}));ee(this,"updatePersonalityQuiz",(n,r)=>k(this,null,function*(){const i=`/personality-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)})}));ee(this,"deletePersonalityQuiz",n=>k(this,null,function*(){const r=`/personality-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"})}));this.loyaltyBaseUrl=gI(n.environment),this.predictionBaseUrl=mI(n.environment),this.miniGamesApiBaseUrl=vI(n.environment),this.reportingApiBaseUrl=bI(n.environment),this.votingApiBaseUrl=yI(n.environment),this.profileApiBaseUrl=CI(n.environment),this.customResolverUrl=xI(n.environment),this.discussionsApiBaseUrl=wI(n.environment)}}const SI=(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),AI=({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=SI(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new II(n,r);return u.jsx(Zo.Provider,{value:{sdk:i,https:o},children:t})},jf=C.createContext(null),TI=({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 Uf={exports:{}},EI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",kI=EI,_I=kI;function Vf(){}function Hf(){}Hf.resetWarningCache=Vf;var PI=function(){function e(r,i,o,a,s,l){if(l!==_I){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:Hf,resetWarningCache:Vf};return n.PropTypes=n,n};Uf.exports=PI();var DI=Uf.exports;function OI(e){return typeof e=="string"}function RI(e,t,n){return e===void 0||OI(e)?t:O({},t,{ownerState:O({},t.ownerState,n)})}function Wf(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 LI(e,t,n){return typeof e=="function"?e(t,n):e}function MI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=V.useState(t.toUpperCase()),o=V.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function BI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return V.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{BI(n,t)})},e)}function Gf(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=Gf(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=Gf(e))&&(r&&(r+=" "),r+=t);return r}function Yf(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 $I(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=Yf(r),l=Yf(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 Kf(e){if(V.isValidElement(e)||!er(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Kf(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=>{V.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])?Kf(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 Qf={exports:{}},$e={};/**
|
|
2326
2326
|
* @license React
|
|
2327
2327
|
* react-is.production.js
|
|
2328
2328
|
*
|
|
@@ -2330,13 +2330,13 @@
|
|
|
2330
2330
|
*
|
|
2331
2331
|
* This source code is licensed under the MIT license found in the
|
|
2332
2332
|
* LICENSE file in the root directory of this source tree.
|
|
2333
|
-
*/var Ll=Symbol.for("react.transitional.element"),Ml=Symbol.for("react.portal"),ta=Symbol.for("react.fragment"),na=Symbol.for("react.strict_mode"),ra=Symbol.for("react.profiler"),ia=Symbol.for("react.consumer"),oa=Symbol.for("react.context"),aa=Symbol.for("react.forward_ref"),sa=Symbol.for("react.suspense"),la=Symbol.for("react.suspense_list"),ca=Symbol.for("react.memo"),ua=Symbol.for("react.lazy"),NI=Symbol.for("react.offscreen"),FI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ll:switch(e=e.type,e){case ta:case ra:case na:case sa:case la:return e;default:switch(e=e&&e.$$typeof,e){case oa:case aa:case ua:case ca:return e;case ia:return e;default:return t}}case Ml:return t}}}$e.ContextConsumer=ia,$e.ContextProvider=oa,$e.Element=Ll,$e.ForwardRef=aa,$e.Fragment=ta,$e.Lazy=ua,$e.Memo=ca,$e.Portal=Ml,$e.Profiler=ra,$e.StrictMode=na,$e.Suspense=sa,$e.SuspenseList=la,$e.isContextConsumer=function(e){return Xt(e)===ia},$e.isContextProvider=function(e){return Xt(e)===oa},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ll},$e.isForwardRef=function(e){return Xt(e)===aa},$e.isFragment=function(e){return Xt(e)===ta},$e.isLazy=function(e){return Xt(e)===ua},$e.isMemo=function(e){return Xt(e)===ca},$e.isPortal=function(e){return Xt(e)===Ml},$e.isProfiler=function(e){return Xt(e)===ra},$e.isStrictMode=function(e){return Xt(e)===na},$e.isSuspense=function(e){return Xt(e)===sa},$e.isSuspenseList=function(e){return Xt(e)===la},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ta||e===ra||e===na||e===sa||e===la||e===NI||typeof e=="object"&&e!==null&&(e.$$typeof===ua||e.$$typeof===ca||e.$$typeof===oa||e.$$typeof===ia||e.$$typeof===aa||e.$$typeof===FI||e.getModuleId!==void 0)},$e.typeOf=Xt,qf.exports=$e;var Qf=qf.exports;function ye(e){if(typeof e!="string")throw new Error(ea(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Jf(e,t){var n,r;return V.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const zI=typeof window!="undefined"?V.useLayoutEffect:V.useEffect;let Xf=0;function jI(e){const[t,n]=V.useState(e),r=e||t;return V.useEffect(()=>{t==null&&(Xf+=1,n(`mui-${Xf}`))},[t]),r}const Zf=V.useId;function Vi(e){if(Zf!==void 0){const t=Zf();return e!=null?e:t}return jI(e)}function Bl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=V.useRef(e!==void 0),[o,a]=V.useState(t),s=i?e:o,l=V.useCallback(c=>{i||a(c)},[]);return[s,l]}class $l{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new $l}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let da=!0,Nl=!1;const UI=new $l,VI={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function HI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&VI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function WI(e){e.metaKey||e.altKey||e.ctrlKey||(da=!0)}function Fl(){da=!1}function GI(){this.visibilityState==="hidden"&&Nl&&(da=!0)}function YI(e){e.addEventListener("keydown",WI,!0),e.addEventListener("mousedown",Fl,!0),e.addEventListener("pointerdown",Fl,!0),e.addEventListener("touchstart",Fl,!0),e.addEventListener("visibilitychange",GI,!0)}function KI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return da||HI(t)}function eh(){const e=V.useCallback(i=>{i!=null&&YI(i.ownerDocument)},[]),t=V.useRef(!1);function n(){return t.current?(Nl=!0,UI.start(100,()=>{Nl=!1}),t.current=!1,!0):!1}function r(i){return KI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function th(e,t){const n=O({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=O({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=O({},o),Object.keys(i).forEach(a=>{n[r][a]=th(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function ut(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const nh=e=>e,qI=(()=>{let e=nh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=nh}}})(),QI={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function rh(e,t,n="Mui"){const r=QI[t];return r?`${n}-${r}`:`${qI.generate(e)}-${t}`}function JI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=rh(e,i,n)}),r}function zl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:s,rootElementName:l}=e,c=V.useRef(null),[d,f]=V.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=eh(),[v,S]=V.useState(!1);t&&!n&&v&&S(!1),V.useEffect(()=>{h.current=v},[v,h]);const[I,x]=MI({rootElementName:l!=null?l:r||a?"a":void 0,componentName:"Button"}),w=z=>$=>{var B;v&&$.preventDefault(),(B=z.onMouseLeave)==null||B.call(z,$)},y=z=>$=>{var B;m($),h.current===!1&&S(!1),(B=z.onBlur)==null||B.call(z,$)},A=z=>$=>{var B;if(c.current||(c.current=$.currentTarget),p($),h.current===!0){var W;S(!0),(W=z.onFocusVisible)==null||W.call(z,$)}(B=z.onFocus)==null||B.call(z,$)},E=()=>{const z=c.current;return I==="BUTTON"||I==="INPUT"&&["button","submit","reset"].includes(z==null?void 0:z.type)||I==="A"&&(z==null?void 0:z.href)},_=z=>$=>{if(!t){var B;(B=z.onClick)==null||B.call(z,$)}},D=z=>$=>{var B;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(B=z.onMouseDown)==null||B.call(z,$)},G=z=>$=>{var B;if((B=z.onKeyDown)==null||B.call(z,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var W;(W=z.onClick)==null||W.call(z,$),$.preventDefault()}},F=z=>$=>{var B;if($.target===$.currentTarget&&f(!1),(B=z.onKeyUp)==null||B.call(z,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var W;(W=z.onClick)==null||W.call(z,$)}},T=sn(x,i,g,c),j={};return o!==void 0&&(j.tabIndex=o),I==="BUTTON"?(j.type=s!=null?s:"button",n?j["aria-disabled"]=t:j.disabled=t):I==="INPUT"?s&&["button","submit","reset"].includes(s)&&(n?j["aria-disabled"]=t:j.disabled=t):I!==""&&(!r&&!a&&(j.role="button",j.tabIndex=o!=null?o:0),t&&(j["aria-disabled"]=t,j.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(z={})=>{const $=O({},Mn(e),Mn(z)),B=O({type:s},$,j,z,{onBlur:y($),onClick:_($),onFocus:A($),onKeyDown:G($),onKeyUp:F($),onMouseDown:D($),onMouseLeave:w($),ref:T});return delete B.onFocusVisible,B},focusVisible:v,setFocusVisible:S,active:d,rootRef:T}}function XI(e,t){return e===t}const jl={},ih=()=>{};function Ul(e,t){const n=O({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function ZI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,s=V.useRef(n);V.useEffect(()=>{if(a.current===null)return;const l=Ul(s.current,o);Object.keys(t).forEach(c=>{var d;const f=(d=r[c])!=null?d:XI,h=t[c],p=l[c];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var m,g;i==null||i((m=a.current.event)!=null?m:null,c,h,(g=a.current.type)!=null?g:"",t)}}),s.current=t,a.current=null},[s,t,a,i,r,o])}function eS(e){const t=V.useRef(null),{reducer:n,initialState:r,controlledProps:i=jl,stateComparers:o=jl,onStateChange:a=ih,actionContext:s,componentName:l=""}=e;V.useRef(i);const c=V.useCallback((p,m)=>{t.current=m;const g=Ul(p,i);return n(g,m)},[i,n]),[d,f]=V.useReducer(c,r),h=V.useCallback(p=>{f(O({},p,{context:s}))},[s]);return ZI({nextState:d,initialState:r,stateComparers:o!=null?o:jl,onStateChange:a!=null?a:ih,controlledProps:i,lastActionRef:t}),[Ul(d,i),h]}const tS=V.createContext(void 0);function nS(){return V.useContext(tS)}function rS(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:s=!1,value:l,inputRef:c}=e,d=nS();let f,h,p,m,g;if(d){var v,S,I;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(S=d.error)!=null?S:!1,m=(I=d.required)!=null?I:!1,g=d.value}else f=t,h=n,p=r,m=s,g=l;const{current:x}=V.useRef(g!=null),w=V.useCallback(z=>{},[]),y=V.useRef(null),A=sn(y,c,w),[E,_]=V.useState(!1);V.useEffect(()=>{!d&&h&&E&&(_(!1),i==null||i())},[d,h,E,i]);const D=z=>$=>{var B;if(d!=null&&d.disabled){$.stopPropagation();return}if((B=z.onFocus)==null||B.call(z,$),d&&d.onFocus){var W;d==null||(W=d.onFocus)==null||W.call(d)}else _(!0)},G=z=>$=>{var B;(B=z.onBlur)==null||B.call(z,$),d&&d.onBlur?d.onBlur():_(!1)},F=z=>($,...B)=>{var W,q;if(!x&&($.target||y.current)==null)throw new Error(ea(17));d==null||(W=d.onChange)==null||W.call(d,$),(q=z.onChange)==null||q.call(z,$,...B)},T=z=>$=>{var B;y.current&&$.currentTarget===$.target&&y.current.focus(),(B=z.onClick)==null||B.call(z,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(z={})=>{const B=O({},{onBlur:i,onChange:o,onFocus:a},Mn(z)),W=O({},B,{onBlur:G(B),onChange:F(B),onFocus:D(B)});return O({},W,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},z,{ref:A},W)},getRootProps:(z={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),B=O({},$,Mn(z));return O({},z,B,{onClick:T(B)})},inputRef:A,required:m,value:g}}const yt={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",highlightLast:"list:highlightLast",textNavigation:"list:textNavigation",clearSelection:"list:clearSelection"};function iS(e,t,n,r,i,o){if(n.length===0||!r&&n.every((s,l)=>i(s,l)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Dt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:s,itemComparer:l,focusManagement:c}=n,d=c==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(S=>l(S,e));let p,m,g=!a;switch(t){case"reset":if(d===-1)return null;p=0,m="next",g=!1;break;case"start":p=0,m="next",g=!1;break;case"end":p=f,m="previous",g=!1;break;default:{const S=h+t;S<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):S>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=S,m=t>=0?"next":"previous")}}const v=iS(p,m,i,s,o,g);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function oS(e,t,n,r){return n==="none"?[]:n==="single"?r(t[0],e)?t:[e]:t.some(i=>r(i,e))?t.filter(i=>!r(i,e)):[...t,e]}function oh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:s}=t,l=a.findIndex(d=>r(e,d));if(i(e,l))return t;const c=oS(e,s,o,r);return O({},t,{selectedValues:c,highlightedValue:e})}function aS(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return O({},t,{highlightedValue:Dt(r,"start",n)});case"End":return O({},t,{highlightedValue:Dt(r,"end",n)});case"PageUp":return O({},t,{highlightedValue:Dt(r,-o,n)});case"PageDown":return O({},t,{highlightedValue:Dt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return O({},t,{highlightedValue:Dt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return O({},t,{highlightedValue:Dt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return O({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return O({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:oh(t.highlightedValue,t,n)}return t}function sS(e,t){return t.focusManagement==="DOM"?e:O({},e,{highlightedValue:null})}function lS(e,t,n){var r;const i=(r=n(e))==null?void 0:r.trim().toLowerCase();return!i||i.length===0?!1:i.indexOf(t)===0}function cS(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,s=t.length>1;let l=s?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!l||!s&&e.highlightedValue===l)return e;if(lS(l,t,a)&&(!i(l,r.indexOf(l))||o))return O({},e,{highlightedValue:l});l=Dt(l,1,n)}return e}function uS(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let s=null;if(n.highlightedValue!=null){var l;s=(l=e.find(f=>o(f,n.highlightedValue)))!=null?l:null}else a==="DOM"&&t.length===0&&(s=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return O({},n,{highlightedValue:s,selectedValues:d})}function dS(e,t){return O({},e,{highlightedValue:Dt(null,"reset",t)})}function fS(e,t){return O({},e,{highlightedValue:Dt(null,"end",t)})}function hS(e,t){return O({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function ah(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return aS(t.key,e,r);case yt.itemClick:return oh(t.item,e,r);case yt.blur:return sS(e,r);case yt.textNavigation:return cS(e,t.searchString,r);case yt.itemsChange:return uS(t.items,t.previousItems,e,r);case yt.resetHighlight:return dS(e,r);case yt.highlightLast:return fS(e,r);case yt.clearSelection:return hS(e,r);default:return e}}const pS=500;function gS(e){const t=V.useRef({searchString:"",lastTime:null});return V.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>pS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const sh={},mS=()=>{},vS=(e,t)=>e===t,bS=()=>!1,yS=e=>typeof e=="string"?e:String(e),xS=()=>({highlightedValue:null,selectedValues:[]});function CS(e){const{controlledProps:t=sh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=xS,getItemDomElement:a,getItemId:s,isItemDisabled:l=bS,rootRef:c,onStateChange:d=mS,items:f,itemComparer:h=vS,getItemAsString:p=yS,onChange:m,onHighlightChange:g,onItemsChange:v,orientation:S="vertical",pageSize:I=5,reducerActionContext:x=sh,selectionMode:w="single",stateReducer:y,componentName:A="useList"}=e,E=V.useRef(null),_=sn(c,E),D=V.useCallback((ae,X,le)=>{if(g==null||g(ae,X,le),i==="DOM"&&X!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var re;a==null||(re=a(X))==null||re.focus()}},[a,g,i]),G=V.useMemo(()=>({highlightedValue:h,selectedValues:(ae,X)=>Wf(ae,X,h)}),[h]),F=V.useCallback((ae,X,le,re,ge)=>{switch(d==null||d(ae,X,le,re,ge),X){case"highlightedValue":D(ae,le,re);break;case"selectedValues":m==null||m(ae,le,re);break}},[D,m,d]),T=V.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:l,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:D,orientation:S,pageSize:I,selectionMode:w,stateComparers:G}),[n,r,i,l,h,f,p,D,S,I,w,G]),j=o(),Y=y!=null?y:ah,z=V.useMemo(()=>O({},x,T),[x,T]),[$,B]=eS({reducer:Y,actionContext:z,initialState:j,controlledProps:t,stateComparers:G,onStateChange:F,componentName:A}),{highlightedValue:W,selectedValues:q}=$,ee=gS((ae,X)=>B({type:yt.textNavigation,event:X,searchString:ae})),R=V.useRef([]);V.useEffect(()=>{Wf(R.current,f,h)||(B({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,v==null||v(f))},[f,h,B,v]);const M=ae=>X=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,X),X.defaultMuiPrevented)return;const re=["Home","End","PageUp","PageDown"];S==="vertical"?re.push("ArrowUp","ArrowDown"):re.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&re.push(" ","Enter"),re.includes(X.key)&&X.preventDefault(),B({type:yt.keyDown,key:X.key,event:X}),ee(X)},U=ae=>X=>{var le,re;(le=ae.onBlur)==null||le.call(ae,X),!X.defaultMuiPrevented&&((re=E.current)!=null&&re.contains(X.relatedTarget)||B({type:yt.blur,event:X}))},H=(ae={})=>{const X=Mn(ae);return O({},ae,{"aria-activedescendant":i==="activeDescendant"&&W!=null?s(W):void 0,tabIndex:i==="DOM"?-1:0,ref:_},X,{onBlur:U(X),onKeyDown:M(X)})},ne=V.useCallback(ae=>{const X=(q!=null?q:[]).some(ge=>ge!=null&&h(ae,ge)),le=W!=null&&h(ae,W);return{focusable:i==="DOM",highlighted:le,selected:X}},[h,q,W,i]),se=V.useMemo(()=>({dispatch:B,getItemState:ne}),[B,ne]);return V.useDebugValue({state:$}),{contextValue:se,dispatch:B,getRootProps:H,rootRef:_,state:$}}const lh=V.createContext(null);function wS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=V.useContext(lh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:s,focusable:l}=o(n),c=V.useCallback(p=>m=>{var g;(g=p.onClick)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemClick,item:n,event:m})},[i,n]),d=V.useCallback(p=>m=>{var g;(g=p.onMouseOver)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemHover,item:n,event:m})},[i,n]);let f;return l&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return O({},p,{onClick:c(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:s}}const Vl=V.createContext(null);function IS(e){const t=Array.from(e.keys()).map(n=>{const r=e.get(n);return{key:n,subitem:r}});return t.sort((n,r)=>{const i=n.subitem.ref.current,o=r.subitem.ref.current;return i===null||o===null||i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(n=>[n.key,n.subitem]))}function ch(){const[e,t]=V.useState(new Map),n=V.useRef(new Set),r=V.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=V.useCallback(function(c,d){let f;return typeof c=="function"?f=c(n.current):f=c,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=V.useMemo(()=>IS(e),[e]),a=V.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:V.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function uh(e,t){const n=V.useContext(Vl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=V.useState(typeof e=="function"?void 0:e);return zI(()=>{const{id:a,deregister:s}=r(e,t);return o(a),s},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function SS(e,t){return function(r={}){const i=O({},r,e(r));return O({},i,t(i))}}const AS=Math.min,TS=Math.max,fa=Math.round,ha=Math.floor,pa=e=>({x:e,y:e});function ES(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dh(e){return hh(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fh(e){var t;return(t=(hh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hh(e){return e instanceof Node||e instanceof Nn(e).Node}function kS(e){return e instanceof Element||e instanceof Nn(e).Element}function Hl(e){return e instanceof HTMLElement||e instanceof Nn(e).HTMLElement}function ph(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function gh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function _S(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function PS(e){return["html","body","#document"].includes(dh(e))}function Wl(e){return Nn(e).getComputedStyle(e)}function DS(e){if(dh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ph(e)&&e.host||fh(e);return ph(t)?t.host:t}function mh(e){const t=DS(e);return PS(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hl(t)&&gh(t)?t:mh(t)}function ga(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Gl(a);return t.concat(a,a.visualViewport||[],gh(i)?i:[],s&&n?ga(s):[])}return t.concat(i,ga(i,[],n))}function Gl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function OS(e){const t=Wl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Hl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=fa(n)!==o||fa(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Yl(e){return kS(e)?e:e.contextElement}function vh(e){const t=Yl(e);if(!Hl(t))return pa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=OS(t);let a=(o?fa(n.width):n.width)/r,s=(o?fa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const RS=pa(0);function LS(e){const t=Nn(e);return!_S()||!t.visualViewport?RS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function MS(e,t,n){return!1}function bh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=Yl(e);let a=pa(1);t&&(a=vh(e));const s=MS()?LS(o):pa(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=Nn(o),p=r;let m=h,g=Gl(m);for(;g&&r&&p!==m;){const v=vh(g),S=g.getBoundingClientRect(),I=Wl(g),x=S.left+(g.clientLeft+parseFloat(I.paddingLeft))*v.x,w=S.top+(g.clientTop+parseFloat(I.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=x,c+=w,m=Nn(g),g=Gl(m)}}return ES({width:d,height:f,x:l,y:c})}function BS(e,t){let n=null,r;const i=fh(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=ha(d),m=ha(i.clientWidth-(c+f)),g=ha(i.clientHeight-(d+h)),v=ha(c),I={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:TS(0,AS(1,l))||1};let x=!0;function w(y){const A=y[0].intersectionRatio;if(A!==l){if(!x)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,Q(N({},I),{root:i.ownerDocument}))}catch(y){n=new IntersectionObserver(w,I)}n.observe(e)}return a(!0),o}function $S(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Yl(e),d=i||o?[...c?ga(c):[],...ga(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=c&&s?BS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(S=>{let[I]=S;I&&I.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,g=l?bh(e):null;l&&v();function v(){const S=bh(e);g&&(S.x!==g.x||S.y!==g.y||S.width!==g.width||S.height!==g.height)&&n(),g=S,m=requestAnimationFrame(v)}return n(),()=>{var S;d.forEach(I=>{i&&I.removeEventListener("scroll",n),o&&I.removeEventListener("resize",n)}),f==null||f(),(S=p)==null||S.disconnect(),p=null,l&&cancelAnimationFrame(m)}}function NS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:s,readOnly:l,required:c}=e,[d,f]=Bl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=_=>D=>{var G;D.nativeEvent.defaultPrevented||(f(D.target.checked),o==null||o(D),(G=_.onChange)==null||G.call(_,D))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:v}=eh(),[S,I]=V.useState(!1);r&&S&&I(!1),V.useEffect(()=>{p.current=S},[S,p]);const x=V.useRef(null),w=_=>D=>{var G;x.current||(x.current=D.currentTarget),g(D),p.current===!0&&(I(!0),s==null||s(D)),a==null||a(D),(G=_.onFocus)==null||G.call(_,D)},y=_=>D=>{var G;m(D),p.current===!1&&I(!1),i==null||i(D),(G=_.onBlur)==null||G.call(_,D)},A=sn(v,x);return{checked:d,disabled:!!r,focusVisible:S,getInputProps:(_={})=>O({checked:t,defaultChecked:n,disabled:r,readOnly:l,ref:A,required:c,type:"checkbox",role:"switch","aria-checked":t},_,{onChange:h(_),onFocus:w(_),onBlur:y(_)}),inputRef:A,readOnly:!!l}}function FS(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[s,l]=Bl({controlled:t,default:n,name:"Tabs",state:"value"}),c=V.useCallback((v,S)=>{l(S),r==null||r(v,S)},[r,l]),{subitems:d,contextValue:f}=ch(),h=V.useRef(()=>{}),p=V.useCallback(v=>{var S;return(S=d.get(v))==null?void 0:S.id},[d]),m=V.useCallback(v=>h.current(v),[]),g=V.useCallback(v=>{h.current=v},[]);return{contextValue:O({direction:o,getTabId:m,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:s},f)}}const yh=V.createContext(null);function ma(){const e=V.useContext(yh);if(e==null)throw new Error("No TabsContext provided");return e}function zS(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:s,registerTabIdLookup:l,selectionFollowsFocus:c,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=V.useMemo(()=>({getItemIndex:i,registerItem:s,totalSubitemCount:d}),[s,i,d]),g=V.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:l,selectionFollowsFocus:c,value:f}),[r,h,p,o,a,l,c,f]);return u.jsx(Vl.Provider,{value:m,children:u.jsx(yh.Provider,{value:g,children:n})})}function jS(e){return e.size}function US(e){const{value:t,id:n,rootRef:r}=e,i=ma();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,s=Vi(n),l=V.useRef(null),c=sn(l,r),d=V.useMemo(()=>({id:s,ref:l}),[s]),{id:f}=uh(t!=null?t:jS,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(g={})=>O({"aria-labelledby":p!=null?p:void 0,hidden:h,id:s!=null?s:void 0},g,{ref:c}),rootRef:c}}const xh={valueChange:"valueChange"};function VS(e,t){if(t.type===xh.valueChange)return O({},e,{highlightedValue:t.value});const n=ah(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return O({},n,{highlightedValue:n.selectedValues[0]});Dt(null,"reset",t.context)}return r&&n.highlightedValue!=null?O({},n,{selectedValues:[n.highlightedValue]}):n}function HS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:s,selectionFollowsFocus:l}=ma(),{subitems:c,contextValue:d}=ch(),f=V.useCallback(F=>{var T;return(T=c.get(F))==null?void 0:T.id},[c]);s(f);const h=V.useMemo(()=>Array.from(c.keys()),[c]),p=V.useCallback(F=>{var T,j;return F==null?null:(T=(j=c.get(F))==null?void 0:j.ref.current)!=null?T:null},[c]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const v=V.useCallback((F,T)=>{var j;i(F,(j=T[0])!=null?j:null)},[i]),S=V.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),I=V.useCallback(F=>{var T,j;return(T=(j=c.get(F))==null?void 0:j.disabled)!=null?T:!1},[c]),{contextValue:x,dispatch:w,getRootProps:y,state:{highlightedValue:A,selectedValues:E},rootRef:_}=CS({controlledProps:S,disabledItemsFocusable:!l,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:I,items:h,rootRef:n,onChange:v,orientation:g,reducerActionContext:V.useMemo(()=>({selectionFollowsFocus:l||!1}),[l]),selectionMode:"single",stateReducer:VS});V.useEffect(()=>{a!==void 0&&a!=null&&w({type:xh.valueChange,value:a})},[w,a]);const D=(F={})=>O({},F,y(F),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:V.useMemo(()=>O({},d,x),[d,x]),dispatch:w,getRootProps:D,highlightedValue:A,isRtl:m,orientation:o,rootRef:_,selectedValue:(t=E[0])!=null?t:null}}function WS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:s}=t,l=V.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=V.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:s}),[a,i,s]);return u.jsx(Vl.Provider,{value:c,children:u.jsx(lh.Provider,{value:l,children:n})})}function GS(e){return e.size}function YS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=V.useRef(null),a=Vi(i),{value:s,selectionFollowsFocus:l,getTabPanelId:c}=ma(),d=V.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=uh(t!=null?t:GS,d),{getRootProps:m,highlighted:g,selected:v}=wS({item:f}),{getRootProps:S,rootRef:I,active:x,focusVisible:w,setFocusVisible:y}=zl({disabled:r,focusableWhenDisabled:!l,type:"button"}),A=sn(o,n,I),E=f!==void 0?c(f):void 0;return{getRootProps:(D={})=>{const G=Mn(D),F=SS(m,S);return O({},D,F(G),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:A})},active:x,focusVisible:w,highlighted:g,index:h,rootRef:A,selected:v||f===s,setFocusVisible:y,totalTabsCount:p}}const Ch="$$joy";function KS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function qS(e,t){return Mt(e,t)}const QS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},JS=["values","unit","step"],XS=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>O({},n,{[r.key]:r.val}),{})};function wh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,JS),o=XS(t),a=Object.keys(o);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):s(h)}function f(h){const p=a.indexOf(h);return p===0?s(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return O({keys:a,values:o,up:s,down:l,between:c,only:d,not:f,unit:n},i)}const ZS={borderRadius:4};function Hi(e,t){return t?$n(e,t,{clone:!1}):e}const Kl={xs:0,sm:600,md:900,lg:1200,xl:1536},Ih={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Kl[e]}px)`};function Fn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Ih;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Ih;return Object.keys(t).reduce((a,s)=>{if(Object.keys(o.values||Kl).indexOf(s)!==-1){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function eA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function tA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function tr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function va(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=tr(e,n)||r,t&&(i=t(i,r,e)),i}function rt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=tr(l,r)||{};return Fn(a,s,f=>{let h=va(c,i,f);return f===h&&typeof f=="string"&&(h=va(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function nA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const rA={m:"margin",p:"padding"},iA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Sh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},oA=nA(e=>{if(e.length>2)if(Sh[e])e=Sh[e];else return[e];const[t,n]=e.split(""),r=rA[t],i=iA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),ql=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ql=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...ql,...Ql];function Wi(e,t,n,r){var i;const o=(i=tr(e,t,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function Ah(e){return Wi(e,"spacing",8)}function Gi(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function aA(e,t){return n=>e.reduce((r,i)=>(r[i]=Gi(t,n),r),{})}function sA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=oA(n),o=aA(i,r),a=e[n];return Fn(e,a,o)}function Th(e,t){const n=Ah(e.theme);return Object.keys(e).map(r=>sA(e,t,r,n)).reduce(Hi,{})}function Qe(e){return Th(e,ql)}Qe.propTypes={},Qe.filterProps=ql;function Je(e){return Th(e,Ql)}Je.propTypes={},Je.filterProps=Ql;function Eh(e=8){if(e.mui)return e;const t=Ah({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function ba(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Hi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Zt(e){return typeof e!="number"?e:`${e}px solid`}function en(e,t){return rt({prop:e,themeKey:"borders",transform:t})}const lA=en("border",Zt),cA=en("borderTop",Zt),uA=en("borderRight",Zt),dA=en("borderBottom",Zt),fA=en("borderLeft",Zt),hA=en("borderColor"),pA=en("borderTopColor"),gA=en("borderRightColor"),mA=en("borderBottomColor"),vA=en("borderLeftColor"),bA=en("outline",Zt),yA=en("outlineColor"),ya=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Wi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Gi(t,r)});return Fn(e,e.borderRadius,n)}return null};ya.propTypes={},ya.filterProps=["borderRadius"],ba(lA,cA,uA,dA,fA,hA,pA,gA,mA,vA,ya,bA,yA);const xa=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Wi(e.theme,"spacing",8),n=r=>({gap:Gi(t,r)});return Fn(e,e.gap,n)}return null};xa.propTypes={},xa.filterProps=["gap"];const Ca=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Wi(e.theme,"spacing",8),n=r=>({columnGap:Gi(t,r)});return Fn(e,e.columnGap,n)}return null};Ca.propTypes={},Ca.filterProps=["columnGap"];const wa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Wi(e.theme,"spacing",8),n=r=>({rowGap:Gi(t,r)});return Fn(e,e.rowGap,n)}return null};wa.propTypes={},wa.filterProps=["rowGap"];const xA=rt({prop:"gridColumn"}),CA=rt({prop:"gridRow"}),wA=rt({prop:"gridAutoFlow"}),IA=rt({prop:"gridAutoColumns"}),SA=rt({prop:"gridAutoRows"}),AA=rt({prop:"gridTemplateColumns"}),TA=rt({prop:"gridTemplateRows"}),EA=rt({prop:"gridTemplateAreas"}),kA=rt({prop:"gridArea"});ba(xa,Ca,wa,xA,CA,wA,IA,SA,AA,TA,EA,kA);function Vr(e,t){return t==="grey"?t:e}const _A=rt({prop:"color",themeKey:"palette",transform:Vr}),PA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Vr}),DA=rt({prop:"backgroundColor",themeKey:"palette",transform:Vr});ba(_A,PA,DA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const OA=rt({prop:"width",transform:Ht}),Jl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Kl[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ht(n)}};return Fn(e,e.maxWidth,t)}return null};Jl.filterProps=["maxWidth"];const RA=rt({prop:"minWidth",transform:Ht}),LA=rt({prop:"height",transform:Ht}),MA=rt({prop:"maxHeight",transform:Ht}),BA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const $A=rt({prop:"boxSizing"});ba(OA,Jl,RA,LA,MA,BA,$A);const Ia={border:{themeKey:"borders",transform:Zt},borderTop:{themeKey:"borders",transform:Zt},borderRight:{themeKey:"borders",transform:Zt},borderBottom:{themeKey:"borders",transform:Zt},borderLeft:{themeKey:"borders",transform:Zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ya},color:{themeKey:"palette",transform:Vr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Vr},backgroundColor:{themeKey:"palette",transform:Vr},p:{style:Je},pt:{style:Je},pr:{style:Je},pb:{style:Je},pl:{style:Je},px:{style:Je},py:{style:Je},padding:{style:Je},paddingTop:{style:Je},paddingRight:{style:Je},paddingBottom:{style:Je},paddingLeft:{style:Je},paddingX:{style:Je},paddingY:{style:Je},paddingInline:{style:Je},paddingInlineStart:{style:Je},paddingInlineEnd:{style:Je},paddingBlock:{style:Je},paddingBlockStart:{style:Je},paddingBlockEnd:{style:Je},m:{style:Qe},mt:{style:Qe},mr:{style:Qe},mb:{style:Qe},ml:{style:Qe},mx:{style:Qe},my:{style:Qe},margin:{style:Qe},marginTop:{style:Qe},marginRight:{style:Qe},marginBottom:{style:Qe},marginLeft:{style:Qe},marginX:{style:Qe},marginY:{style:Qe},marginInline:{style:Qe},marginInlineStart:{style:Qe},marginInlineEnd:{style:Qe},marginBlock:{style:Qe},marginBlockStart:{style:Qe},marginBlockEnd:{style:Qe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xa},rowGap:{style:wa},columnGap:{style:Ca},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ht},maxWidth:{style:Jl},minWidth:{transform:Ht},height:{transform:Ht},maxHeight:{transform:Ht},minHeight:{transform:Ht},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function NA(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function FA(e,t){return typeof e=="function"?e(t):e}function zA(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=tr(i,c)||{};return f?f(a):Fn(a,r,m=>{let g=va(h,d,m);return m===g&&typeof m=="string"&&(g=va(h,d,`${n}${m==="default"?"":ye(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Ia;function s(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const d=eA(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=FA(c[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Hi(h,e(p,m,o,a));else{const g=Fn({theme:o},m,v=>({[p]:v}));NA(g,m)?h[p]=t({sx:m,theme:o}):h=Hi(h,g)}else h=Hi(h,e(p,m,o,a))}),tA(f,h)}return Array.isArray(i)?i.map(s):s(i)}return t}const Sa=zA();Sa.filterProps=["sx"];function kh(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const jA=["breakpoints","palette","spacing","shape"];function _h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,jA),s=wh(n),l=Eh(i);let c=$n({breakpoints:s,direction:"ltr",components:{},palette:O({mode:"light"},r),spacing:l,shape:O({},ZS,o)},a);return c.applyStyles=kh,c=t.reduce((d,f)=>$n(d,f),c),c.unstable_sxConfig=O({},Ia,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Sa({sx:f,theme:this})},c}function UA(e){return Object.keys(e).length===0}function VA(e=null){const t=V.useContext(pe.ThemeContext);return!t||UA(t)?e:t}const HA=_h();function WA(e=HA){return VA(e)}const GA=["sx"],YA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Ia;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function KA(e){const{sx:t}=e,n=Ae(e,GA),{systemProps:r,otherProps:i}=YA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const s=t(...a);return er(s)?O({},r,s):r}:o=O({},r,t),O({},i,{sx:o})}const qA=["ownerState"],QA=["variants"],JA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function XA(e){return Object.keys(e).length===0}function ZA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const e1=_h(),t1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Aa({defaultTheme:e,theme:t,themeId:n}){return XA(t)?e:t[n]||t}function n1(e){return e?(t,n)=>n[e]:null}function Ta(e,t){let{ownerState:n}=t,r=Ae(t,qA);const i=typeof e=="function"?e(O({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ta(o,O({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let s=Ae(i,QA);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(O({ownerState:n},r,n)):Object.keys(l.props).forEach(d=>{(n==null?void 0:n[d])!==l.props[d]&&r[d]!==l.props[d]&&(c=!1)}),c&&(Array.isArray(s)||(s=[s]),s.push(typeof l.style=="function"?l.style(O({ownerState:n},r,n)):l.style))}),s}return i}function r1(e={}){const{themeId:t,defaultTheme:n=e1,rootShouldForwardProp:r=Xl,slotShouldForwardProp:i=Xl}=e,o=a=>Sa(O({},a,{theme:Aa(O({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,s={})=>{QS(a,y=>y.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=n1(t1(c))}=s,p=Ae(s,JA),m=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,g=f||!1;let v,S=Xl;c==="Root"||c==="root"?S=r:c?S=i:ZA(a)&&(S=void 0);const I=qS(a,O({shouldForwardProp:S,label:v},p)),x=y=>typeof y=="function"&&y.__emotion_real!==y||er(y)?A=>Ta(y,O({},A,{theme:Aa({theme:A.theme,defaultTheme:n,themeId:t})})):y,w=(y,...A)=>{let E=x(y);const _=A?A.map(x):[];l&&h&&_.push(F=>{const T=Aa(O({},F,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[l]||!T.components[l].styleOverrides)return null;const j=T.components[l].styleOverrides,Y={};return Object.entries(j).forEach(([z,$])=>{Y[z]=Ta($,O({},F,{theme:T}))}),h(F,Y)}),l&&!m&&_.push(F=>{var T;const j=Aa(O({},F,{defaultTheme:n,themeId:t})),Y=j==null||(T=j.components)==null||(T=T[l])==null?void 0:T.variants;return Ta({variants:Y},O({},F,{theme:j}))}),g||_.push(o);const D=_.length-A.length;if(Array.isArray(y)&&D>0){const F=new Array(D).fill("");E=[...y,...F],E.raw=[...y.raw,...F]}const G=I(E,..._);return a.muiName&&(G.muiName=a.muiName),G};return I.withConfig&&(w.withConfig=I.withConfig),w}}function i1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:th(t.components[n].defaultProps,r)}function o1({props:e,name:t,defaultTheme:n,themeId:r}){let i=WA(n);return r&&(i=i[r]||i),i1({theme:i,name:t,props:e})}function a1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ph(e){if(e.type)return e;if(e.charAt(0)==="#")return Ph(a1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ea(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(ea(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const vr=e=>{const t=Ph(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Zl(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const Dh=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},s1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},l1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function ec(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return s1(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[d]:l1(s,l)}),Dh(o,s,`var(${d})`,c),Dh(a,s,`var(${d}, ${l})`,c)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function br(e){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(e)}function c1(e,t){if(br(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(br(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tc(e){var t=c1(e,"string");return br(t)=="symbol"?t:t+""}const u1=["colorSchemes","components","defaultColorScheme"];function d1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,u1),{vars:o,css:a,varsWithDefaults:s}=ec(i,t);let l=s;const c={},{[r]:d}=n,f=Ae(n,[r].map(tc));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:v,varsWithDefaults:S}=ec(m,t);l=$n(l,S),c[p]={css:v,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=ec(d,t);l=$n(l,g),c[r]={css:p,vars:m}}return{vars:l,generateCssVars:p=>{var m;if(!p){var g;const S=O({},a);return{css:S,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,S))||":root"}}const v=O({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,v))||":root"}}}}const f1=O({},Ia,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Yi={grey:{50:"#FBFCFE",100:"#F0F4F8",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#171A1C",900:"#0B0D0E"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function h1(e){var t;return!!e[0].match(/^(typography|variants|breakpoints)$/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/^(mode)$/))||e[0]==="focus"&&e[1]!=="thickness"}const it=(e,t)=>rh(e,t,"Mui"),Xe=(e,t)=>JI(e,t,"Mui"),p1=e=>e&&typeof e=="object"&&Object.keys(e).some(t=>{var n;return(n=t.match)==null?void 0:n.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),Oh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},Rh=(e,t,n)=>{const r={};return Object.entries(t||{}).forEach(([i,o])=>{if(i.match(new RegExp(`${e}(color|bg|border)`,"i"))&&o){const a=n?n(i):o;i.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),i.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),i.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),Oh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,s]=o;p1(s)&&typeof s=="object"&&(n=O({},n,{[a]:Rh(e,s,l=>`var(--variant-${l}, ${r(`palette-${a}-${l}`,i[a][l])})`)}))})}return n.context=Rh(e,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},g1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],m1=["colorSchemes"],v1=(e="joy")=>Zl(e);function b1(e){var t,n,r,i,o,a,s,l,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:v,shouldSkipGeneratingVar:S=h1}=f,I=Ae(f,g1),x=v1(h),w={primary:Yi.blue,neutral:Yi.grey,danger:Yi.red,success:Yi.green,warning:Yi.yellow,common:{white:"#FFF",black:"#000"}},y=X=>{var le;const re=X.split("-"),ge=re[1],Se=re[2];return x(X,(le=w[ge])==null?void 0:le[Se])},A=X=>({plainColor:y(`palette-${X}-500`),plainHoverBg:y(`palette-${X}-100`),plainActiveBg:y(`palette-${X}-200`),plainDisabledColor:y("palette-neutral-400"),outlinedColor:y(`palette-${X}-500`),outlinedBorder:y(`palette-${X}-300`),outlinedHoverBg:y(`palette-${X}-100`),outlinedActiveBg:y(`palette-${X}-200`),outlinedDisabledColor:y("palette-neutral-400"),outlinedDisabledBorder:y("palette-neutral-200"),softColor:y(`palette-${X}-700`),softBg:y(`palette-${X}-100`),softHoverBg:y(`palette-${X}-200`),softActiveColor:y(`palette-${X}-800`),softActiveBg:y(`palette-${X}-300`),softDisabledColor:y("palette-neutral-400"),softDisabledBg:y("palette-neutral-50"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-400"),solidDisabledBg:y("palette-neutral-100")}),E=X=>({plainColor:y(`palette-${X}-300`),plainHoverBg:y(`palette-${X}-800`),plainActiveBg:y(`palette-${X}-700`),plainDisabledColor:y("palette-neutral-500"),outlinedColor:y(`palette-${X}-200`),outlinedBorder:y(`palette-${X}-700`),outlinedHoverBg:y(`palette-${X}-800`),outlinedActiveBg:y(`palette-${X}-700`),outlinedDisabledColor:y("palette-neutral-500"),outlinedDisabledBorder:y("palette-neutral-800"),softColor:y(`palette-${X}-200`),softBg:y(`palette-${X}-800`),softHoverBg:y(`palette-${X}-700`),softActiveColor:y(`palette-${X}-100`),softActiveBg:y(`palette-${X}-600`),softDisabledColor:y("palette-neutral-500"),softDisabledBg:y("palette-neutral-800"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-500"),solidDisabledBg:y("palette-neutral-800")}),_={palette:{mode:"light",primary:O({},w.primary,A("primary")),neutral:O({},w.neutral,A("neutral"),{plainColor:y("palette-neutral-700"),plainHoverColor:y("palette-neutral-900"),outlinedColor:y("palette-neutral-700")}),danger:O({},w.danger,A("danger")),success:O({},w.success,A("success")),warning:O({},w.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-800"),secondary:y("palette-neutral-700"),tertiary:y("palette-neutral-600"),icon:y("palette-neutral-500")},background:{body:y("palette-common-white"),surface:y("palette-neutral-50"),popup:y("palette-common-white"),level1:y("palette-neutral-100"),level2:y("palette-neutral-200"),level3:y("palette-neutral-300"),tooltip:y("palette-neutral-500"),backdrop:`rgba(${x("palette-neutral-darkChannel",vr(w.neutral[900]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",vr(w.neutral[500]))} / 0.2)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},D={palette:{mode:"dark",primary:O({},w.primary,E("primary")),neutral:O({},w.neutral,E("neutral"),{plainColor:y("palette-neutral-300"),plainHoverColor:y("palette-neutral-300")}),danger:O({},w.danger,E("danger")),success:O({},w.success,E("success")),warning:O({},w.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-100"),secondary:y("palette-neutral-300"),tertiary:y("palette-neutral-400"),icon:y("palette-neutral-400")},background:{body:y("palette-common-black"),surface:y("palette-neutral-900"),popup:y("palette-common-black"),level1:y("palette-neutral-800"),level2:y("palette-neutral-700"),level3:y("palette-neutral-600"),tooltip:y("palette-neutral-600"),backdrop:`rgba(${x("palette-neutral-darkChannel",vr(w.neutral[50]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",vr(w.neutral[500]))} / 0.16)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',F=O({body:`"Inter", ${x(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${x(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},I.fontFamily),T=O({sm:300,md:500,lg:600,xl:700},I.fontWeight),j=O({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},I.fontSize),Y=O({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},I.lineHeight),z=(t=(n=I.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:_.shadowRing,$=(r=(i=I.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:_.shadowChannel,B=(o=(a=I.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:_.shadowOpacity,W={colorSchemes:{light:_,dark:D},fontSize:j,fontFamily:F,fontWeight:T,focus:{thickness:"2px",selector:`&.${it("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${x("focus-thickness",(s=(l=I.focus)==null?void 0:l.thickness)!=null?s:"2px")})`,outline:`${x("focus-thickness",(c=(d=I.focus)==null?void 0:d.thickness)!=null?c:"2px")} solid ${x("palette-focusVisible",w.primary[500])}`}},lineHeight:Y,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${x("shadowRing",z)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,sm:`${x("shadowRing",z)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 2px 4px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,md:`${x("shadowRing",z)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 6px 12px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,lg:`${x("shadowRing",z)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 12px 16px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,xl:`${x("shadowRing",z)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 20px 24px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl4, ${j.xl4}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},h2:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl3, ${j.xl3}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},h3:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl2, ${j.xl2}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},h4:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl, ${j.xl}`),lineHeight:x(`lineHeight-md, ${Y.md}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},"title-lg":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-lg, ${j.lg}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),color:x(`palette-text-primary, ${_.palette.text.primary}`)},"title-md":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-md, ${j.md}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-primary, ${_.palette.text.primary}`)},"title-sm":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-sm, ${j.sm}`),lineHeight:x(`lineHeight-sm, ${Y.sm}`),color:x(`palette-text-primary, ${_.palette.text.primary}`)},"body-lg":{fontFamily:x(`fontFamily-body, ${F.body}`),fontSize:x(`fontSize-lg, ${j.lg}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-secondary, ${_.palette.text.secondary}`)},"body-md":{fontFamily:x(`fontFamily-body, ${F.body}`),fontSize:x(`fontSize-md, ${j.md}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-secondary, ${_.palette.text.secondary}`)},"body-sm":{fontFamily:x(`fontFamily-body, ${F.body}`),fontSize:x(`fontSize-sm, ${j.sm}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-tertiary, ${_.palette.text.tertiary}`)},"body-xs":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-xs, ${j.xs}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-tertiary, ${_.palette.text.tertiary}`)}}},q=I?$n(W,I):W,{colorSchemes:ee}=q,R=Ae(q,m1),M=O({colorSchemes:ee},R,{breakpoints:wh(p!=null?p:{}),components:$n({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:X,theme:le})=>{var re;const ge=X.instanceFontSize;return O({margin:"var(--Icon-margin)"},X.fontSize&&X.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[X.fontSize]})`},!X.htmlColor&&O({color:`var(--Icon-color, ${M.vars.palette.text.icon})`},X.color&&X.color!=="inherit"&&le.vars.palette[X.color]&&{color:`rgba(${(re=le.vars.palette[X.color])==null?void 0:re.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[ge]})}}}},g),cssVarPrefix:h,getCssVar:x,spacing:Eh(m)});function U(X,le){Object.keys(le).forEach(re=>{const ge={main:"500",light:"200",dark:"700"};X==="dark"&&(ge.main=400),!le[re].mainChannel&&le[re][ge.main]&&(le[re].mainChannel=vr(le[re][ge.main])),!le[re].lightChannel&&le[re][ge.light]&&(le[re].lightChannel=vr(le[re][ge.light])),!le[re].darkChannel&&le[re][ge.dark]&&(le[re].darkChannel=vr(le[re][ge.dark]))})}Object.entries(M.colorSchemes).forEach(([X,le])=>{U(X,le.palette)});const H={prefix:h,shouldSkipGeneratingVar:S},{vars:ne,generateCssVars:se}=d1(O({colorSchemes:ee},R),H);M.vars=ne,M.generateCssVars=se,M.unstable_sxConfig=O({},f1,void 0),M.unstable_sx=function(le){return Sa({sx:le,theme:this})},M.getColorSchemeSelector=X=>X==="light"?"&":`&[data-joy-color-scheme="${X}"], [data-joy-color-scheme="${X}"] &`;const ae={getCssVar:x,palette:M.colorSchemes.light.palette};return M.variants=$n({plain:Tt("plain",ae),plainHover:Tt("plainHover",ae),plainActive:Tt("plainActive",ae),plainDisabled:Tt("plainDisabled",ae),outlined:Tt("outlined",ae),outlinedHover:Tt("outlinedHover",ae),outlinedActive:Tt("outlinedActive",ae),outlinedDisabled:Tt("outlinedDisabled",ae),soft:Tt("soft",ae),softHover:Tt("softHover",ae),softActive:Tt("softActive",ae),softDisabled:Tt("softDisabled",ae),solid:Tt("solid",ae),solidHover:Tt("solidHover",ae),solidActive:Tt("solidActive",ae),solidDisabled:Tt("solidDisabled",ae)},v),M.palette=O({},M.colorSchemes.light.palette,{colorScheme:"light"}),M.shouldSkipGeneratingVar=S,M.applyStyles=kh,M}const Lh=b1(),be=r1({defaultTheme:Lh,themeId:Ch});function dt({props:e,name:t}){return o1({props:e,name:t,defaultTheme:O({},Lh,{components:{}}),themeId:Ch})}function y1(e){return it("MuiAccordion",e)}const x1=Xe("MuiAccordion",["root","expanded","disabled"]),C1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],w1=["component","slots","slotProps"],I1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=Ae(t,C1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,w1),p=d[e]||r,m=LI(f[e],i),g=$I(O({className:n},l,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:v},internalRef:S}=g,I=Ae(g.props,I1),x=sn(S,m==null?void 0:m.ref,t.ref),w=a?a(I):{},y=O({},i,w),A=e==="root"?v||c:v,E=RI(p,O({},e==="root"&&!c&&!d[e]&&s,e!=="root"&&!d[e]&&s,I,A&&{as:A},{ref:x}),y);return Object.keys(w).forEach(_=>{delete E[_]}),[p,E]}const nc=V.createContext({});function S1(e){return it("MuiListItem",e)}const Mh=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ea=V.createContext(!1),rc=V.createContext(!1),Bh=V.createContext(!1),$h=V.createContext(void 0),A1=V.createContext(void 0),Nh=V.createContext(void 0),T1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],E1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${ye(o)}`,i&&`variant${ye(i)}`],startAction:["startAction"],endAction:["endAction"]};return ut(a,S1,{})},ic=be("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},O({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&O({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${Mh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),k1=be(ic,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),_1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),P1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Fh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyListItem"}),i=V.useContext(Nh),o=V.useContext($h),a=V.useContext(rc),s=V.useContext(Bh),l=V.useContext(Ea),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:v,endAction:S,role:I,slots:x={},slotProps:w={}}=r,y=Ae(r,T1),[A,E]=V.useState(""),[_,D]=(o==null?void 0:o.split(":"))||["",""],G=c||(_&&!_.match(/^(ul|ol|menu)$/)?"div":void 0);let F=i==="menu"?"none":void 0;o&&(F={menu:"none",menubar:"none",group:"presentation"}[D]),I&&(F=I);const T=O({},r,{sticky:p,startAction:v,endAction:S,row:a,wrap:s,variant:m,color:g,nesting:l,nested:h,component:G,role:F}),j=E1(T),Y=O({},y,{component:G,slots:x,slotProps:w}),[z,$]=Ie("root",{additionalProps:{role:F},ref:n,className:Bn(j.root,d),elementType:k1,externalForwardedProps:Y,ownerState:T}),[B,W]=Ie("startAction",{className:j.startAction,elementType:_1,externalForwardedProps:Y,ownerState:T}),[q,ee]=Ie("endAction",{className:j.endAction,elementType:P1,externalForwardedProps:Y,ownerState:T});return u.jsx(A1.Provider,{value:E,children:u.jsx(Ea.Provider,{value:h?A||!0:!1,children:u.jsxs(z,O({},$,{children:[v&&u.jsx(B,O({},W,{children:v})),V.Children.map(f,(R,M)=>{var U;return V.isValidElement(R)?V.cloneElement(R,O({},M===0&&{"data-first-child":""},Jf(R,["ListItem"])&&{component:((U=R.props)==null?void 0:U.component)||"div"})):R}),S&&u.jsx(q,O({},ee,{children:S}))]}))})})});Fh.muiName="ListItem";const zh=Fh;function D1(e){return it("MuiAccordionDetails",e)}const yr=Xe("MuiAccordionDetails",["root","content","expanded"]),O1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],R1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${ye(n)}`,t&&`variant${ye(t)}`]};return ut(o,y1,{})},L1=be(ic,{name:"JoyAccordion",slot:"Root",overridesResolver:(e,t)=>t.root})({borderBottom:"var(--Accordion-borderBottom)","&[data-first-child]":{"--ListItem-radius":"var(--unstable_List-childRadius) var(--unstable_List-childRadius) 0 0"},"&[data-last-child]":{"--ListItem-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)",'& [aria-expanded="true"]':{"--ListItem-radius":"0"},[`& .${yr.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),M1=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:s,defaultExpanded:l=!1,disabled:c=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,O1),v=Vi(i),[S,I]=Bl({controlled:d,default:l,name:"Accordion",state:"expanded"}),x=V.useCallback(G=>{I(!S),f&&f(G,!S)},[S,f,I]),w=V.useMemo(()=>({accordionId:v,expanded:S,disabled:c,toggle:x}),[v,S,c,x]),y=O({},g,{component:o,slots:p,slotProps:m}),A=O({},r,{component:o,color:a,variant:h,expanded:S,disabled:c,nested:!0}),E=R1(A),[_,D]=Ie("root",{ref:n,className:E.root,elementType:L1,externalForwardedProps:y,ownerState:A});return u.jsx(nc.Provider,{value:w,children:u.jsx(_,O({},D,{children:V.Children.map(s,(G,F)=>V.isValidElement(G)&&F===0?V.cloneElement(G,{"data-first-child":""}):G)}))})});function B1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const $1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function oc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=u.jsx(rc.Provider,{value:r,children:u.jsx(Bh.Provider,{value:i,children:V.Children.map(t,(a,s)=>V.isValidElement(a)?V.cloneElement(a,O({},s===0&&{"data-first-child":""},s===V.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Ea.Provider,{value:n,children:o})}const ac=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=O({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var s;r[o]=((s=e.vars)==null?void 0:s.radius[a])||a}else["p","padding","m","margin"].indexOf(o)!==-1&&typeof a=="number"?r[o]=e.spacing(a):r[o]=a;else typeof a=="function"?r[o]=a(e):r[o]=void 0})),r};function N1(e){return it("MuiList",e)}Xe("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const F1=V.createContext(void 0),z1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],j1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,s={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return ut(s,N1,{})},sc=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=ac({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(s){return s==="sm"?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"3px","--ListItem-paddingX":t.marker?"3px":"0.5rem","--ListItem-gap":"0.5rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:s==="md"?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.25rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":t.marker?"0.25rem":"0.75rem","--ListItem-gap":"0.625rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:s==="lg"?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"2.75rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":t.marker?"0.5rem":"1rem","--ListItem-gap":"0.75rem","--ListItemDecorator-size":t.orientation==="horizontal"?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&O({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&O({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?O({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),O({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),U1=be(sc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),V1=V.forwardRef(function(t,n){var r;const i=V.useContext(Ea),o=V.useContext(Nh),a=V.useContext(F1),s=dt({props:t,name:"JoyList"}),{component:l,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:v,slots:S={},slotProps:I={}}=s,x=Ae(s,z1),w=f||((r=t.size)!=null?r:"md");let y;o&&(y="group"),a&&(y="presentation"),v&&(y=v);const A=O({},s,{instanceSize:t.size,size:w,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:y}),E=j1(A),_=O({},x,{component:l,slots:S,slotProps:I}),[D,G]=Ie("root",{ref:n,className:Bn(E.root,c),elementType:U1,externalForwardedProps:_,ownerState:A,additionalProps:{as:l,role:y,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(D,O({},G,{children:u.jsx($h.Provider,{value:`${typeof l=="string"?l:""}:${y||""}`,children:u.jsx(oc,{row:h==="horizontal",wrap:p,children:d})})}))}),H1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],W1=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`,r&&`size${ye(r)}`]};return ut(i,B1,{})},G1=be(sc,{name:"JoyAccordionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let n={};return t.transition&&(typeof t.transition=="string"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition}, padding-block ${t.transition}`}),typeof t.transition=="object"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition.initial}, padding-block ${t.transition.initial}`,[`& .${yr.root}.${yr.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),O({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${x1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),Y1=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:s=!1,variant:l="plain",transition:c="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,H1),m=O({},p,{component:i,slots:f,slotProps:h}),g=O({},r,{component:i,color:o,disableDivider:s,variant:l,transition:c,size:d}),v=W1(g),[S,I]=Ie("root",{ref:n,className:v.root,elementType:G1,externalForwardedProps:m,ownerState:g});return u.jsx(S,O({},I,{children:u.jsx(oc,{children:a})}))}),K1=["component","children","color","variant","slots","slotProps"],q1=e=>{const{expanded:t}=e;return ut({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},D1,{})},Q1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return O({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${yr.expanded})`]:{gridTemplateRows:"0fr"}})}),J1=be("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${yr.expanded})`]:{paddingBlock:0}}),X1=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:s="plain",slots:l={},slotProps:c={}}=r,d=Ae(r,K1),{accordionId:f,expanded:h=!1}=V.useContext(nc),p=V.useRef(null),m=sn(p,n);V.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const _=E.getAttribute("data-prev-tabindex"),D=E.getAttribute("tabindex");D&&_&&(E.setAttribute("tabindex",_),E.removeAttribute("data-prev-tabindex")),!_&&!D&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=O({},d,{component:i,slots:l,slotProps:c}),v=O({},r,{component:i,color:a,variant:s,expanded:h,nesting:!0}),S=q1(v),[I,x]=Ie("root",{ref:m,className:S.root,elementType:Q1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[w,y]=Ie("content",{className:S.content,elementType:J1,externalForwardedProps:g,ownerState:v});return u.jsx(I,O({},x,{children:u.jsx(w,O({},y,{children:o}))}))});function Z1(e){return it("MuiAccordionSummary",e)}const ka=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),_a=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),eT=V.createContext("horizontal"),lc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;return O({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:O({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${Mh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${_a.selected}`]:O({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${_a.selected}, [aria-selected="true"])`]:{"&:hover":(o=e.variants[`${t.variant}Hover`])==null?void 0:o[t.color],"&:active":(a=e.variants[`${t.variant}Active`])==null?void 0:a[t.color]},[`&.${_a.disabled}`]:O({},(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color])})});be(lc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>O({},!e.row&&{[`&.${_a.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function tT(e){return it("MuiSvgIcon",e)}Xe("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const nT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],rT=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${ye(t)}`,n&&`size${ye(n)}`,r&&`fontSize${ye(r)}`]};return ut(i,tT,{})},jh={sm:"xl",md:"xl2",lg:"xl3"},iT=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return O({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[jh[t.instanceSize]]},t.instanceFontSize&&t.instanceFontSize!=="inherit"&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[jh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&O({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Uh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:s="svg",fontSize:l,htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,v=Ae(r,nT),S=V.isValidElement(i)&&i.type==="svg",I=O({},r,{color:a,component:s,size:p,instanceSize:t.size,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:S}),x=rT(I),w=O({},v,{component:s,slots:m,slotProps:g}),[y,A]=Ie("root",{ref:n,className:Bn(x.root,o),elementType:iT,externalForwardedProps:w,ownerState:I,additionalProps:O({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},S&&i.props)});return u.jsxs(y,O({},A,{children:[S?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function cc(e,t){function n(r,i){return u.jsx(Uh,O({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Uh.muiName,V.memo(V.forwardRef(n))}const oT=cc(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Vh;const aT=["component","color","children","indicator","variant","slots","slotProps"],sT=e=>{const{disabled:t,expanded:n}=e;return ut({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},Z1,{})},lT=be(ic,{name:"JoyAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.vars.fontWeight.md,gap:"calc(var(--ListItem-paddingX, 0.75rem) + 0.25rem)",[`&.${ka.expanded}`]:{"--Icon-color":"currentColor"}})),cT=be(lc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${ka.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),uT=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${ka.expanded}`]:{transform:"rotate(180deg)"}}),dT=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:s=Vh||(Vh=u.jsx(oT,{})),variant:l="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,aT),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=V.useContext(nc),v=O({},f,{component:i,slots:c,slotProps:d}),S=O({},r,{component:i,color:o,disabled:p,expanded:m,variant:l}),I=G=>{if(g&&g(G),typeof d.button=="function"){var F,T;(F=d.button(S))==null||(T=F.onClick)==null||T.call(F,G)}else{var j,Y;(j=d.button)==null||(Y=j.onClick)==null||Y.call(j,G)}},x=sT(S),[w,y]=Ie("root",{ref:n,className:x.root,elementType:lT,externalForwardedProps:v,ownerState:S}),[A,E]=Ie("button",{ref:n,className:x.button,elementType:cT,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:I},ownerState:S}),[_,D]=Ie("indicator",{ref:n,className:x.indicator,elementType:uT,externalForwardedProps:v,ownerState:S});return u.jsx(w,O({},y,{children:u.jsxs(A,O({},E,{children:[a,s&&u.jsx(_,O({},D,{children:s}))]}))}))}),fT=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(Y1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${ka.button}:hover`]:{backgroundColor:"#fff"},[`& .${yr.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${yr.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:u.jsxs(M1,{disabled:t,children:[u.jsx(dT,{children:e}),u.jsx(X1,{variant:"soft",children:n})]})})),uc={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},dc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const s=(l,c,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(l))};return t==="description"?u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e}),u.jsx(yi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{color:"primary",children:e}),u.jsx(yi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"}),u.jsx(b.FormHelperText,{children:o})]}):u.jsx(b.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(yi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i})})},hT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(b.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(b.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(b.Tab,{children:e.labels.richText}),u.jsx(b.Tab,{children:e.labels.plainText})]}),u.jsx(b.TabPanel,{value:0,sx:{px:0},children:u.jsx(dc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(b.TabPanel,{value:1,sx:{px:0},children:u.jsx(b.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},pT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,s)=>{i(s||"")};return u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e}),u.jsx(b.Select,{defaultValue:t,onChange:o,children:n.map((a,s)=>u.jsx(b.Option,{value:a,children:a},`basic-select-${a}-${s}`))}),r?u.jsx(b.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},fc=V.createContext("md");function gT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const mT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],vT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${ye(n)}`,r&&`color${ye(r)}`,i&&`size${ye(i)}`]};return ut(o,gT,{})},bT=be("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:s,p:l,padding:c}=ac({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=tr(t,`palette.${o}`)||o||tr(t,`palette.${a}`)||a||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return O({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":d==="transparent"?"initial":d,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],l!==void 0&&{"--Tabs-padding":l},c!==void 0&&{"--Tabs-padding":c})}),Hh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:s="horizontal",direction:l="ltr",component:c,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,mT),v=a||(o===void 0?0:void 0),{contextValue:S}=FS(O({},r,{orientation:s,defaultValue:v})),I=O({},r,{orientation:s,direction:l,variant:d,color:f,size:h}),x=vT(I),w=O({},g,{component:c,slots:p,slotProps:m}),[y,A]=Ie("root",{ref:n,elementType:bT,externalForwardedProps:w,additionalProps:{ref:n,as:c},ownerState:I,className:x.root});return u.jsx(y,O({},A,{children:u.jsx(zS,{value:S,children:u.jsx(fc.Provider,{value:h,children:i})})}))});function yT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function xT(e){return it("MuiTab",e)}const hc=Xe("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),CT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],wT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return ut(o,yT,{})},IT=be(sc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return O({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},$1,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&O({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${hc.root}`]:{flex:t.tabFlex}})}),Wh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTabList"}),i=V.useContext(fc),{isRtl:o,orientation:a,getRootProps:s,contextValue:l}=HS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:S,slots:I={},slotProps:x={}}=r,w=Ae(r,CT),y=p!=null?p:i,A=O({},r,{isRtl:o,orientation:a,variant:f,color:h,size:y,sticky:S,tabFlex:v,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=wT(A),_=O({},w,{component:c,slots:I,slotProps:x}),[D,G]=Ie("root",{ref:n,elementType:IT,getSlotProps:s,externalForwardedProps:_,ownerState:A,className:E.root});return u.jsx(D,O({},G,{children:u.jsx(WS,{value:l,children:u.jsx(oc,{row:a==="horizontal",nested:!0,children:d})})}))}),ST=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],AT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,s={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return ut(s,xT,{})},TT=be(lc,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),Hr=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTab"}),i=V.useContext(rc),{action:o,children:a,disabled:s=!1,component:l="button",orientation:c="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:v={}}=r,S=Ae(r,ST),I=V.useRef(null),x=sn(I,n),{active:w,focusVisible:y,setFocusVisible:A,selected:E,getRootProps:_}=YS(O({},r,{rootRef:x}));V.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),I.current.focus()}}),[A]);const D=O({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:c,row:i,active:w,focusVisible:y,disabled:s,selected:E,variant:d,color:f}),G=AT(D),F=O({},S,{component:l,slots:g,slotProps:v}),[T,j]=Ie("root",{ref:n,elementType:TT,getSlotProps:_,externalForwardedProps:F,ownerState:D,className:G.root});return u.jsx(eT.Provider,{value:c,children:u.jsx(T,O({},j,{children:a}))})});function zn(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 Gh(e){if(V.isValidElement(e)||Qf.isValidElementType(e)||!zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Gh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?N({},e):e;return zn(e)&&zn(t)&&Object.keys(t).forEach(i=>{V.isValidElement(t[i])||Qf.isValidElementType(t[i])?r[i]=t[i]:zn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&zn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=zn(t[i])?Gh(t[i]):t[i]:r[i]=t[i]}),r}function xr(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Wr(e){if(typeof e!="string")throw new Error(xr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function pc(e,t){const n=N({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=N(N({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=N({},a);for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const l=s;n[i][l]=pc(o[l],a[l])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function ET(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}const Yh=e=>e,kT=(()=>{let e=Yh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Yh}}})(),_T={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Kh(e,t,n="Mui"){const r=_T[t];return r?`${n}-${r}`:`${kT.generate(e)}-${t}`}function PT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Kh(e,i,n)}),r}function DT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ki(e,t){return t?Wt(e,t,{clone:!1}):e}function OT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,s;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((s=i.match(o))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},N({},t)):t}function RT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function LT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function MT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=o=>(n(r,o),r);return n(i),Q(N({},e),{containerQueries:i})}const Pa={xs:0,sm:600,md:900,lg:1200,xl:1536},qh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Pa[e]}px)`},BT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Pa[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function jn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||qh;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||qh;return Object.keys(t).reduce((a,s)=>{if(RT(o.keys,s)){const l=LT(r.containerQueries?r:BT,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(o.values||Pa).includes(s)){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function $T(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function NT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Da(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Oa(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Da(e,n)||r,t&&(i=t(i,r,e)),i}function ot(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=Da(l,r)||{};return jn(a,s,f=>{let h=Oa(c,i,f);return f===h&&typeof f=="string"&&(h=Oa(c,i,`${t}${f==="default"?"":Wr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function FT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const zT={m:"margin",p:"padding"},jT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Qh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},UT=FT(e=>{if(e.length>2)if(Qh[e])e=Qh[e];else return[e];const[t,n]=e.split(""),r=zT[t],i=jT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),gc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...gc,...mc];function qi(e,t,n,r){var o;const i=(o=Da(e,t,!0))!=null?o:n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a),l=i[s];return a>=0?l:typeof l=="number"?-l:`-${l}`}:typeof i=="function"?i:()=>{}}function vc(e){return qi(e,"spacing",8)}function Qi(e,t){return typeof t=="string"||t==null?t:e(t)}function VT(e,t){return n=>e.reduce((r,i)=>(r[i]=Qi(t,n),r),{})}function HT(e,t,n,r){if(!t.includes(n))return null;const i=UT(n),o=VT(i,r),a=e[n];return jn(e,a,o)}function Jh(e,t){const n=vc(e.theme);return Object.keys(e).map(r=>HT(e,t,r,n)).reduce(Ki,{})}function Ze(e){return Jh(e,gc)}Ze.propTypes={},Ze.filterProps=gc;function et(e){return Jh(e,mc)}et.propTypes={},et.filterProps=mc;function Ra(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ki(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tn(e){return typeof e!="number"?e:`${e}px solid`}function nn(e,t){return ot({prop:e,themeKey:"borders",transform:t})}const WT=nn("border",tn),GT=nn("borderTop",tn),YT=nn("borderRight",tn),KT=nn("borderBottom",tn),qT=nn("borderLeft",tn),QT=nn("borderColor"),JT=nn("borderTopColor"),XT=nn("borderRightColor"),ZT=nn("borderBottomColor"),eE=nn("borderLeftColor"),tE=nn("outline",tn),nE=nn("outlineColor"),La=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=qi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Qi(t,r)});return jn(e,e.borderRadius,n)}return null};La.propTypes={},La.filterProps=["borderRadius"],Ra(WT,GT,YT,KT,qT,QT,JT,XT,ZT,eE,La,tE,nE);const Ma=e=>{if(e.gap!==void 0&&e.gap!==null){const t=qi(e.theme,"spacing",8),n=r=>({gap:Qi(t,r)});return jn(e,e.gap,n)}return null};Ma.propTypes={},Ma.filterProps=["gap"];const Ba=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=qi(e.theme,"spacing",8),n=r=>({columnGap:Qi(t,r)});return jn(e,e.columnGap,n)}return null};Ba.propTypes={},Ba.filterProps=["columnGap"];const $a=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=qi(e.theme,"spacing",8),n=r=>({rowGap:Qi(t,r)});return jn(e,e.rowGap,n)}return null};$a.propTypes={},$a.filterProps=["rowGap"];const rE=ot({prop:"gridColumn"}),iE=ot({prop:"gridRow"}),oE=ot({prop:"gridAutoFlow"}),aE=ot({prop:"gridAutoColumns"}),sE=ot({prop:"gridAutoRows"}),lE=ot({prop:"gridTemplateColumns"}),cE=ot({prop:"gridTemplateRows"}),uE=ot({prop:"gridTemplateAreas"}),dE=ot({prop:"gridArea"});Ra(Ma,Ba,$a,rE,iE,oE,aE,sE,lE,cE,uE,dE);function Gr(e,t){return t==="grey"?t:e}const fE=ot({prop:"color",themeKey:"palette",transform:Gr}),hE=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gr}),pE=ot({prop:"backgroundColor",themeKey:"palette",transform:Gr});Ra(fE,hE,pE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const gE=ot({prop:"width",transform:Gt}),bc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,s,l;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||Pa[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return jn(e,e.maxWidth,t)}return null};bc.filterProps=["maxWidth"];const mE=ot({prop:"minWidth",transform:Gt}),vE=ot({prop:"height",transform:Gt}),bE=ot({prop:"maxHeight",transform:Gt}),yE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const xE=ot({prop:"boxSizing"});Ra(gE,bc,mE,vE,bE,yE,xE);const Na={border:{themeKey:"borders",transform:tn},borderTop:{themeKey:"borders",transform:tn},borderRight:{themeKey:"borders",transform:tn},borderBottom:{themeKey:"borders",transform:tn},borderLeft:{themeKey:"borders",transform:tn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:La},color:{themeKey:"palette",transform:Gr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gr},backgroundColor:{themeKey:"palette",transform:Gr},p:{style:et},pt:{style:et},pr:{style:et},pb:{style:et},pl:{style:et},px:{style:et},py:{style:et},padding:{style:et},paddingTop:{style:et},paddingRight:{style:et},paddingBottom:{style:et},paddingLeft:{style:et},paddingX:{style:et},paddingY:{style:et},paddingInline:{style:et},paddingInlineStart:{style:et},paddingInlineEnd:{style:et},paddingBlock:{style:et},paddingBlockStart:{style:et},paddingBlockEnd:{style:et},m:{style:Ze},mt:{style:Ze},mr:{style:Ze},mb:{style:Ze},ml:{style:Ze},mx:{style:Ze},my:{style:Ze},margin:{style:Ze},marginTop:{style:Ze},marginRight:{style:Ze},marginBottom:{style:Ze},marginLeft:{style:Ze},marginX:{style:Ze},marginY:{style:Ze},marginInline:{style:Ze},marginInlineStart:{style:Ze},marginInlineEnd:{style:Ze},marginBlock:{style:Ze},marginBlockStart:{style:Ze},marginBlockEnd:{style:Ze},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ma},rowGap:{style:$a},columnGap:{style:Ba},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Gt},maxWidth:{style:bc},minWidth:{transform:Gt},height:{transform:Gt},maxHeight:{transform:Gt},minHeight:{transform:Gt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function CE(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function wE(e,t){return typeof e=="function"?e(t):e}function IE(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Da(i,c)||{};return f?f(a):jn(a,r,m=>{let g=Oa(h,d,m);return m===g&&typeof m=="string"&&(g=Oa(h,d,`${n}${m==="default"?"":Wr(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var s;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(s=i.unstable_sxConfig)!=null?s:Na;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const d=$T(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=wE(c[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Ki(h,e(p,m,i,o));else{const g=jn({theme:i},m,v=>({[p]:v}));CE(g,m)?h[p]=t({sx:m,theme:i}):h=Ki(h,g)}else h=Ki(h,e(p,m,i,o))}),OT(i,NT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Yr=IE();Yr.filterProps=["sx"];function SE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var AE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},TE=!1,EE=/[A-Z]|^ms/g,kE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xh=function(t){return t.charCodeAt(1)===45},Zh=function(t){return t!=null&&typeof t!="boolean"},yc=KS(function(e){return Xh(e)?e:e.replace(EE,"-$&").toLowerCase()}),ep=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kE,function(r,i,o){return nr={name:i,styles:o,next:nr},i})}return AE[t]!==1&&!Xh(t)&&typeof n=="number"&&n!==0?n+"px":n},_E="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Fa(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return nr={name:i.name,styles:i.styles,next:nr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)nr={name:a.name,styles:a.styles,next:nr},a=a.next;var s=o.styles+";";return s}return PE(e,t,n)}}var l=n;return l}function PE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Fa(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;Zh(s)&&(r+=yc(o)+":"+ep(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&TE)throw new Error(_E);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Zh(a[l])&&(r+=yc(o)+":"+ep(o,a[l])+";");else{var c=Fa(e,t,a);switch(o){case"animation":case"animationName":{r+=yc(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}}return r}var tp=/label:\s*([^\s;{]+)\s*(;|$)/g,nr;function DE(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";nr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Fa(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Fa(n,t,e[s]),r){var l=o;i+=l[s]}tp.lastIndex=0;for(var c="",d;(d=tp.exec(i))!==null;)c+="-"+d[1];var f=SE(i)+c;return{name:f,styles:i,next:nr}}/**
|
|
2333
|
+
*/var Ll=Symbol.for("react.transitional.element"),Ml=Symbol.for("react.portal"),ta=Symbol.for("react.fragment"),na=Symbol.for("react.strict_mode"),ra=Symbol.for("react.profiler"),ia=Symbol.for("react.consumer"),oa=Symbol.for("react.context"),aa=Symbol.for("react.forward_ref"),sa=Symbol.for("react.suspense"),la=Symbol.for("react.suspense_list"),ca=Symbol.for("react.memo"),ua=Symbol.for("react.lazy"),NI=Symbol.for("react.offscreen"),FI=Symbol.for("react.client.reference");function Xt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ll:switch(e=e.type,e){case ta:case ra:case na:case sa:case la:return e;default:switch(e=e&&e.$$typeof,e){case oa:case aa:case ua:case ca:return e;case ia:return e;default:return t}}case Ml:return t}}}$e.ContextConsumer=ia,$e.ContextProvider=oa,$e.Element=Ll,$e.ForwardRef=aa,$e.Fragment=ta,$e.Lazy=ua,$e.Memo=ca,$e.Portal=Ml,$e.Profiler=ra,$e.StrictMode=na,$e.Suspense=sa,$e.SuspenseList=la,$e.isContextConsumer=function(e){return Xt(e)===ia},$e.isContextProvider=function(e){return Xt(e)===oa},$e.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ll},$e.isForwardRef=function(e){return Xt(e)===aa},$e.isFragment=function(e){return Xt(e)===ta},$e.isLazy=function(e){return Xt(e)===ua},$e.isMemo=function(e){return Xt(e)===ca},$e.isPortal=function(e){return Xt(e)===Ml},$e.isProfiler=function(e){return Xt(e)===ra},$e.isStrictMode=function(e){return Xt(e)===na},$e.isSuspense=function(e){return Xt(e)===sa},$e.isSuspenseList=function(e){return Xt(e)===la},$e.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ta||e===ra||e===na||e===sa||e===la||e===NI||typeof e=="object"&&e!==null&&(e.$$typeof===ua||e.$$typeof===ca||e.$$typeof===oa||e.$$typeof===ia||e.$$typeof===aa||e.$$typeof===FI||e.getModuleId!==void 0)},$e.typeOf=Xt,Qf.exports=$e;var qf=Qf.exports;function ye(e){if(typeof e!="string")throw new Error(ea(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Jf(e,t){var n,r;return V.isValidElement(e)&&t.indexOf((n=e.type.muiName)!=null?n:(r=e.type)==null||(r=r._payload)==null||(r=r.value)==null?void 0:r.muiName)!==-1}const zI=typeof window!="undefined"?V.useLayoutEffect:V.useEffect;let Xf=0;function jI(e){const[t,n]=V.useState(e),r=e||t;return V.useEffect(()=>{t==null&&(Xf+=1,n(`mui-${Xf}`))},[t]),r}const Zf=V.useId;function Vi(e){if(Zf!==void 0){const t=Zf();return e!=null?e:t}return jI(e)}function Bl({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=V.useRef(e!==void 0),[o,a]=V.useState(t),s=i?e:o,l=V.useCallback(c=>{i||a(c)},[]);return[s,l]}class $l{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new $l}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}let da=!0,Nl=!1;const UI=new $l,VI={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function HI(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&VI[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function WI(e){e.metaKey||e.altKey||e.ctrlKey||(da=!0)}function Fl(){da=!1}function GI(){this.visibilityState==="hidden"&&Nl&&(da=!0)}function YI(e){e.addEventListener("keydown",WI,!0),e.addEventListener("mousedown",Fl,!0),e.addEventListener("pointerdown",Fl,!0),e.addEventListener("touchstart",Fl,!0),e.addEventListener("visibilitychange",GI,!0)}function KI(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return da||HI(t)}function eh(){const e=V.useCallback(i=>{i!=null&&YI(i.ownerDocument)},[]),t=V.useRef(!1);function n(){return t.current?(Nl=!0,UI.start(100,()=>{Nl=!1}),t.current=!1,!0):!1}function r(i){return KI(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function th(e,t){const n=O({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=O({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=O({},o),Object.keys(i).forEach(a=>{n[r][a]=th(i[a],o[a])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function ut(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),n&&n[a]&&o.push(n[a])}return o},[]).join(" ")}),r}const nh=e=>e,QI=(()=>{let e=nh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=nh}}})(),qI={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function rh(e,t,n="Mui"){const r=qI[t];return r?`${n}-${r}`:`${QI.generate(e)}-${t}`}function JI(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=rh(e,i,n)}),r}function zl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,href:r,rootRef:i,tabIndex:o,to:a,type:s,rootElementName:l}=e,c=V.useRef(null),[d,f]=V.useState(!1),{isFocusVisibleRef:h,onFocus:p,onBlur:m,ref:g}=eh(),[v,S]=V.useState(!1);t&&!n&&v&&S(!1),V.useEffect(()=>{h.current=v},[v,h]);const[I,x]=MI({rootElementName:l!=null?l:r||a?"a":void 0,componentName:"Button"}),w=z=>$=>{var B;v&&$.preventDefault(),(B=z.onMouseLeave)==null||B.call(z,$)},y=z=>$=>{var B;m($),h.current===!1&&S(!1),(B=z.onBlur)==null||B.call(z,$)},A=z=>$=>{var B;if(c.current||(c.current=$.currentTarget),p($),h.current===!0){var W;S(!0),(W=z.onFocusVisible)==null||W.call(z,$)}(B=z.onFocus)==null||B.call(z,$)},E=()=>{const z=c.current;return I==="BUTTON"||I==="INPUT"&&["button","submit","reset"].includes(z==null?void 0:z.type)||I==="A"&&(z==null?void 0:z.href)},_=z=>$=>{if(!t){var B;(B=z.onClick)==null||B.call(z,$)}},D=z=>$=>{var B;t||(f(!0),document.addEventListener("mouseup",()=>{f(!1)},{once:!0})),(B=z.onMouseDown)==null||B.call(z,$)},G=z=>$=>{var B;if((B=z.onKeyDown)==null||B.call(z,$),!$.defaultMuiPrevented&&($.target===$.currentTarget&&!E()&&$.key===" "&&$.preventDefault(),$.target===$.currentTarget&&$.key===" "&&!t&&f(!0),$.target===$.currentTarget&&!E()&&$.key==="Enter"&&!t)){var W;(W=z.onClick)==null||W.call(z,$),$.preventDefault()}},F=z=>$=>{var B;if($.target===$.currentTarget&&f(!1),(B=z.onKeyUp)==null||B.call(z,$),$.target===$.currentTarget&&!E()&&!t&&$.key===" "&&!$.defaultMuiPrevented){var W;(W=z.onClick)==null||W.call(z,$)}},T=sn(x,i,g,c),j={};return o!==void 0&&(j.tabIndex=o),I==="BUTTON"?(j.type=s!=null?s:"button",n?j["aria-disabled"]=t:j.disabled=t):I==="INPUT"?s&&["button","submit","reset"].includes(s)&&(n?j["aria-disabled"]=t:j.disabled=t):I!==""&&(!r&&!a&&(j.role="button",j.tabIndex=o!=null?o:0),t&&(j["aria-disabled"]=t,j.tabIndex=n?o!=null?o:0:-1)),{getRootProps:(z={})=>{const $=O({},Mn(e),Mn(z)),B=O({type:s},$,j,z,{onBlur:y($),onClick:_($),onFocus:A($),onKeyDown:G($),onKeyUp:F($),onMouseDown:D($),onMouseLeave:w($),ref:T});return delete B.onFocusVisible,B},focusVisible:v,setFocusVisible:S,active:d,rootRef:T}}function XI(e,t){return e===t}const jl={},ih=()=>{};function Ul(e,t){const n=O({},e);return Object.keys(t).forEach(r=>{t[r]!==void 0&&(n[r]=t[r])}),n}function ZI(e){const{nextState:t,initialState:n,stateComparers:r,onStateChange:i,controlledProps:o,lastActionRef:a}=e,s=V.useRef(n);V.useEffect(()=>{if(a.current===null)return;const l=Ul(s.current,o);Object.keys(t).forEach(c=>{var d;const f=(d=r[c])!=null?d:XI,h=t[c],p=l[c];if(p==null&&h!=null||p!=null&&h==null||p!=null&&h!=null&&!f(h,p)){var m,g;i==null||i((m=a.current.event)!=null?m:null,c,h,(g=a.current.type)!=null?g:"",t)}}),s.current=t,a.current=null},[s,t,a,i,r,o])}function eS(e){const t=V.useRef(null),{reducer:n,initialState:r,controlledProps:i=jl,stateComparers:o=jl,onStateChange:a=ih,actionContext:s,componentName:l=""}=e;V.useRef(i);const c=V.useCallback((p,m)=>{t.current=m;const g=Ul(p,i);return n(g,m)},[i,n]),[d,f]=V.useReducer(c,r),h=V.useCallback(p=>{f(O({},p,{context:s}))},[s]);return ZI({nextState:d,initialState:r,stateComparers:o!=null?o:jl,onStateChange:a!=null?a:ih,controlledProps:i,lastActionRef:t}),[Ul(d,i),h]}const tS=V.createContext(void 0);function nS(){return V.useContext(tS)}function rS(e={}){const{defaultValue:t,disabled:n=!1,error:r=!1,onBlur:i,onChange:o,onFocus:a,required:s=!1,value:l,inputRef:c}=e,d=nS();let f,h,p,m,g;if(d){var v,S,I;f=void 0,h=(v=d.disabled)!=null?v:!1,p=(S=d.error)!=null?S:!1,m=(I=d.required)!=null?I:!1,g=d.value}else f=t,h=n,p=r,m=s,g=l;const{current:x}=V.useRef(g!=null),w=V.useCallback(z=>{},[]),y=V.useRef(null),A=sn(y,c,w),[E,_]=V.useState(!1);V.useEffect(()=>{!d&&h&&E&&(_(!1),i==null||i())},[d,h,E,i]);const D=z=>$=>{var B;if(d!=null&&d.disabled){$.stopPropagation();return}if((B=z.onFocus)==null||B.call(z,$),d&&d.onFocus){var W;d==null||(W=d.onFocus)==null||W.call(d)}else _(!0)},G=z=>$=>{var B;(B=z.onBlur)==null||B.call(z,$),d&&d.onBlur?d.onBlur():_(!1)},F=z=>($,...B)=>{var W,Q;if(!x&&($.target||y.current)==null)throw new Error(ea(17));d==null||(W=d.onChange)==null||W.call(d,$),(Q=z.onChange)==null||Q.call(z,$,...B)},T=z=>$=>{var B;y.current&&$.currentTarget===$.target&&y.current.focus(),(B=z.onClick)==null||B.call(z,$)};return{disabled:h,error:p,focused:E,formControlContext:d,getInputProps:(z={})=>{const B=O({},{onBlur:i,onChange:o,onFocus:a},Mn(z)),W=O({},B,{onBlur:G(B),onChange:F(B),onFocus:D(B)});return O({},W,{"aria-invalid":p||void 0,defaultValue:f,value:g,required:m,disabled:h},z,{ref:A},W)},getRootProps:(z={})=>{const $=Mn(e,["onBlur","onChange","onFocus"]),B=O({},$,Mn(z));return O({},z,B,{onClick:T(B)})},inputRef:A,required:m,value:g}}const yt={blur:"list:blur",focus:"list:focus",itemClick:"list:itemClick",itemHover:"list:itemHover",itemsChange:"list:itemsChange",keyDown:"list:keyDown",resetHighlight:"list:resetHighlight",highlightLast:"list:highlightLast",textNavigation:"list:textNavigation",clearSelection:"list:clearSelection"};function iS(e,t,n,r,i,o){if(n.length===0||!r&&n.every((s,l)=>i(s,l)))return-1;let a=e;for(;;){if(!o&&t==="next"&&a===n.length||!o&&t==="previous"&&a===-1)return-1;if(r?!1:i(n[a],a))a+=t==="next"?1:-1,o&&(a=(a+n.length)%n.length);else return a}}function Dt(e,t,n){var r;const{items:i,isItemDisabled:o,disableListWrap:a,disabledItemsFocusable:s,itemComparer:l,focusManagement:c}=n,d=c==="DOM"?0:-1,f=i.length-1,h=e==null?-1:i.findIndex(S=>l(S,e));let p,m,g=!a;switch(t){case"reset":if(d===-1)return null;p=0,m="next",g=!1;break;case"start":p=0,m="next",g=!1;break;case"end":p=f,m="previous",g=!1;break;default:{const S=h+t;S<0?!g&&h!==-1||Math.abs(t)>1?(p=0,m="next"):(p=f,m="previous"):S>f?!g||Math.abs(t)>1?(p=f,m="previous"):(p=0,m="next"):(p=S,m=t>=0?"next":"previous")}}const v=iS(p,m,i,s,o,g);return v===-1&&e!==null&&!o(e,h)?e:(r=i[v])!=null?r:null}function oS(e,t,n,r){return n==="none"?[]:n==="single"?r(t[0],e)?t:[e]:t.some(i=>r(i,e))?t.filter(i=>!r(i,e)):[...t,e]}function oh(e,t,n){const{itemComparer:r,isItemDisabled:i,selectionMode:o,items:a}=n,{selectedValues:s}=t,l=a.findIndex(d=>r(e,d));if(i(e,l))return t;const c=oS(e,s,o,r);return O({},t,{selectedValues:c,highlightedValue:e})}function aS(e,t,n){const r=t.highlightedValue,{orientation:i,pageSize:o}=n;switch(e){case"Home":return O({},t,{highlightedValue:Dt(r,"start",n)});case"End":return O({},t,{highlightedValue:Dt(r,"end",n)});case"PageUp":return O({},t,{highlightedValue:Dt(r,-o,n)});case"PageDown":return O({},t,{highlightedValue:Dt(r,o,n)});case"ArrowUp":if(i!=="vertical")break;return O({},t,{highlightedValue:Dt(r,-1,n)});case"ArrowDown":if(i!=="vertical")break;return O({},t,{highlightedValue:Dt(r,1,n)});case"ArrowLeft":{if(i==="vertical")break;return O({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?-1:1,n)})}case"ArrowRight":{if(i==="vertical")break;return O({},t,{highlightedValue:Dt(r,i==="horizontal-ltr"?1:-1,n)})}case"Enter":case" ":return t.highlightedValue===null?t:oh(t.highlightedValue,t,n)}return t}function sS(e,t){return t.focusManagement==="DOM"?e:O({},e,{highlightedValue:null})}function lS(e,t,n){var r;const i=(r=n(e))==null?void 0:r.trim().toLowerCase();return!i||i.length===0?!1:i.indexOf(t)===0}function cS(e,t,n){const{items:r,isItemDisabled:i,disabledItemsFocusable:o,getItemAsString:a}=n,s=t.length>1;let l=s?e.highlightedValue:Dt(e.highlightedValue,1,n);for(let c=0;c<r.length;c+=1){if(!l||!s&&e.highlightedValue===l)return e;if(lS(l,t,a)&&(!i(l,r.indexOf(l))||o))return O({},e,{highlightedValue:l});l=Dt(l,1,n)}return e}function uS(e,t,n,r){var i;const{itemComparer:o,focusManagement:a}=r;let s=null;if(n.highlightedValue!=null){var l;s=(l=e.find(f=>o(f,n.highlightedValue)))!=null?l:null}else a==="DOM"&&t.length===0&&(s=Dt(null,"reset",r));const d=((i=n.selectedValues)!=null?i:[]).filter(f=>e.some(h=>o(h,f)));return O({},n,{highlightedValue:s,selectedValues:d})}function dS(e,t){return O({},e,{highlightedValue:Dt(null,"reset",t)})}function fS(e,t){return O({},e,{highlightedValue:Dt(null,"end",t)})}function hS(e,t){return O({},e,{selectedValues:[],highlightedValue:Dt(null,"reset",t)})}function ah(e,t){const{type:n,context:r}=t;switch(n){case yt.keyDown:return aS(t.key,e,r);case yt.itemClick:return oh(t.item,e,r);case yt.blur:return sS(e,r);case yt.textNavigation:return cS(e,t.searchString,r);case yt.itemsChange:return uS(t.items,t.previousItems,e,r);case yt.resetHighlight:return dS(e,r);case yt.highlightLast:return fS(e,r);case yt.clearSelection:return hS(e,r);default:return e}}const pS=500;function gS(e){const t=V.useRef({searchString:"",lastTime:null});return V.useCallback(n=>{if(n.key.length===1&&n.key!==" "){const r=t.current,i=n.key.toLowerCase(),o=performance.now();r.searchString.length>0&&r.lastTime&&o-r.lastTime>pS?r.searchString=i:(r.searchString.length!==1||i!==r.searchString)&&(r.searchString+=i),r.lastTime=o,e(r.searchString,n)}},[e])}const sh={},mS=()=>{},vS=(e,t)=>e===t,bS=()=>!1,yS=e=>typeof e=="string"?e:String(e),xS=()=>({highlightedValue:null,selectedValues:[]});function CS(e){const{controlledProps:t=sh,disabledItemsFocusable:n=!1,disableListWrap:r=!1,focusManagement:i="activeDescendant",getInitialState:o=xS,getItemDomElement:a,getItemId:s,isItemDisabled:l=bS,rootRef:c,onStateChange:d=mS,items:f,itemComparer:h=vS,getItemAsString:p=yS,onChange:m,onHighlightChange:g,onItemsChange:v,orientation:S="vertical",pageSize:I=5,reducerActionContext:x=sh,selectionMode:w="single",stateReducer:y,componentName:A="useList"}=e,E=V.useRef(null),_=sn(c,E),D=V.useCallback((ae,X,le)=>{if(g==null||g(ae,X,le),i==="DOM"&&X!=null&&(le===yt.itemClick||le===yt.keyDown||le===yt.textNavigation)){var re;a==null||(re=a(X))==null||re.focus()}},[a,g,i]),G=V.useMemo(()=>({highlightedValue:h,selectedValues:(ae,X)=>Wf(ae,X,h)}),[h]),F=V.useCallback((ae,X,le,re,ge)=>{switch(d==null||d(ae,X,le,re,ge),X){case"highlightedValue":D(ae,le,re);break;case"selectedValues":m==null||m(ae,le,re);break}},[D,m,d]),T=V.useMemo(()=>({disabledItemsFocusable:n,disableListWrap:r,focusManagement:i,isItemDisabled:l,itemComparer:h,items:f,getItemAsString:p,onHighlightChange:D,orientation:S,pageSize:I,selectionMode:w,stateComparers:G}),[n,r,i,l,h,f,p,D,S,I,w,G]),j=o(),Y=y!=null?y:ah,z=V.useMemo(()=>O({},x,T),[x,T]),[$,B]=eS({reducer:Y,actionContext:z,initialState:j,controlledProps:t,stateComparers:G,onStateChange:F,componentName:A}),{highlightedValue:W,selectedValues:Q}=$,te=gS((ae,X)=>B({type:yt.textNavigation,event:X,searchString:ae})),R=V.useRef([]);V.useEffect(()=>{Wf(R.current,f,h)||(B({type:yt.itemsChange,event:null,items:f,previousItems:R.current}),R.current=f,v==null||v(f))},[f,h,B,v]);const M=ae=>X=>{var le;if((le=ae.onKeyDown)==null||le.call(ae,X),X.defaultMuiPrevented)return;const re=["Home","End","PageUp","PageDown"];S==="vertical"?re.push("ArrowUp","ArrowDown"):re.push("ArrowLeft","ArrowRight"),i==="activeDescendant"&&re.push(" ","Enter"),re.includes(X.key)&&X.preventDefault(),B({type:yt.keyDown,key:X.key,event:X}),te(X)},U=ae=>X=>{var le,re;(le=ae.onBlur)==null||le.call(ae,X),!X.defaultMuiPrevented&&((re=E.current)!=null&&re.contains(X.relatedTarget)||B({type:yt.blur,event:X}))},H=(ae={})=>{const X=Mn(ae);return O({},ae,{"aria-activedescendant":i==="activeDescendant"&&W!=null?s(W):void 0,tabIndex:i==="DOM"?-1:0,ref:_},X,{onBlur:U(X),onKeyDown:M(X)})},ne=V.useCallback(ae=>{const X=(Q!=null?Q:[]).some(ge=>ge!=null&&h(ae,ge)),le=W!=null&&h(ae,W);return{focusable:i==="DOM",highlighted:le,selected:X}},[h,Q,W,i]),se=V.useMemo(()=>({dispatch:B,getItemState:ne}),[B,ne]);return V.useDebugValue({state:$}),{contextValue:se,dispatch:B,getRootProps:H,rootRef:_,state:$}}const lh=V.createContext(null);function wS(e){const{handlePointerOverEvents:t=!1,item:n}=e,r=V.useContext(lh);if(!r)throw new Error("useListItem must be used within a ListProvider");const{dispatch:i,getItemState:o}=r,{highlighted:a,selected:s,focusable:l}=o(n),c=V.useCallback(p=>m=>{var g;(g=p.onClick)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemClick,item:n,event:m})},[i,n]),d=V.useCallback(p=>m=>{var g;(g=p.onMouseOver)==null||g.call(p,m),!m.defaultPrevented&&i({type:yt.itemHover,item:n,event:m})},[i,n]);let f;return l&&(f=a?0:-1),{getRootProps:(p={})=>{const m=Mn(p);return O({},p,{onClick:c(m),onPointerOver:t?d(m):void 0,tabIndex:f})},highlighted:a,selected:s}}const Vl=V.createContext(null);function IS(e){const t=Array.from(e.keys()).map(n=>{const r=e.get(n);return{key:n,subitem:r}});return t.sort((n,r)=>{const i=n.subitem.ref.current,o=r.subitem.ref.current;return i===null||o===null||i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING?1:-1}),new Map(t.map(n=>[n.key,n.subitem]))}function ch(){const[e,t]=V.useState(new Map),n=V.useRef(new Set),r=V.useCallback(function(c){n.current.delete(c),t(d=>{const f=new Map(d);return f.delete(c),f})},[]),i=V.useCallback(function(c,d){let f;return typeof c=="function"?f=c(n.current):f=c,n.current.add(f),t(h=>{const p=new Map(h);return p.set(f,d),p}),{id:f,deregister:()=>r(f)}},[r]),o=V.useMemo(()=>IS(e),[e]),a=V.useCallback(function(c){return Array.from(o.keys()).indexOf(c)},[o]);return{contextValue:V.useMemo(()=>({getItemIndex:a,registerItem:i,totalSubitemCount:e.size}),[a,i,e.size]),subitems:o}}function uh(e,t){const n=V.useContext(Vl);if(n===null)throw new Error("useCompoundItem must be used within a useCompoundParent");const{registerItem:r}=n,[i,o]=V.useState(typeof e=="function"?void 0:e);return zI(()=>{const{id:a,deregister:s}=r(e,t);return o(a),s},[r,t,e]),{id:i,index:i!==void 0?n.getItemIndex(i):-1,totalItemCount:n.totalSubitemCount}}function SS(e,t){return function(r={}){const i=O({},r,e(r));return O({},i,t(i))}}const AS=Math.min,TS=Math.max,fa=Math.round,ha=Math.floor,pa=e=>({x:e,y:e});function ES(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dh(e){return hh(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fh(e){var t;return(t=(hh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hh(e){return e instanceof Node||e instanceof Nn(e).Node}function kS(e){return e instanceof Element||e instanceof Nn(e).Element}function Hl(e){return e instanceof HTMLElement||e instanceof Nn(e).HTMLElement}function ph(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function gh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Wl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function _S(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function PS(e){return["html","body","#document"].includes(dh(e))}function Wl(e){return Nn(e).getComputedStyle(e)}function DS(e){if(dh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ph(e)&&e.host||fh(e);return ph(t)?t.host:t}function mh(e){const t=DS(e);return PS(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hl(t)&&gh(t)?t:mh(t)}function ga(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=mh(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Nn(i);if(o){const s=Gl(a);return t.concat(a,a.visualViewport||[],gh(i)?i:[],s&&n?ga(s):[])}return t.concat(i,ga(i,[],n))}function Gl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function OS(e){const t=Wl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Hl(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=fa(n)!==o||fa(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Yl(e){return kS(e)?e:e.contextElement}function vh(e){const t=Yl(e);if(!Hl(t))return pa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=OS(t);let a=(o?fa(n.width):n.width)/r,s=(o?fa(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const RS=pa(0);function LS(e){const t=Nn(e);return!_S()||!t.visualViewport?RS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function MS(e,t,n){return!1}function bh(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=Yl(e);let a=pa(1);t&&(a=vh(e));const s=MS()?LS(o):pa(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,f=i.height/a.y;if(o){const h=Nn(o),p=r;let m=h,g=Gl(m);for(;g&&r&&p!==m;){const v=vh(g),S=g.getBoundingClientRect(),I=Wl(g),x=S.left+(g.clientLeft+parseFloat(I.paddingLeft))*v.x,w=S.top+(g.clientTop+parseFloat(I.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=x,c+=w,m=Nn(g),g=Gl(m)}}return ES({width:d,height:f,x:l,y:c})}function BS(e,t){let n=null,r;const i=fh(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:c,top:d,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=ha(d),m=ha(i.clientWidth-(c+f)),g=ha(i.clientHeight-(d+h)),v=ha(c),I={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:TS(0,AS(1,l))||1};let x=!0;function w(y){const A=y[0].intersectionRatio;if(A!==l){if(!x)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,q(N({},I),{root:i.ownerDocument}))}catch(y){n=new IntersectionObserver(w,I)}n.observe(e)}return a(!0),o}function $S(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Yl(e),d=i||o?[...c?ga(c):[],...ga(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),o&&S.addEventListener("resize",n)});const f=c&&s?BS(c,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(S=>{let[I]=S;I&&I.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m,g=l?bh(e):null;l&&v();function v(){const S=bh(e);g&&(S.x!==g.x||S.y!==g.y||S.width!==g.width||S.height!==g.height)&&n(),g=S,m=requestAnimationFrame(v)}return n(),()=>{var S;d.forEach(I=>{i&&I.removeEventListener("scroll",n),o&&I.removeEventListener("resize",n)}),f==null||f(),(S=p)==null||S.disconnect(),p=null,l&&cancelAnimationFrame(m)}}function NS(e){const{checked:t,defaultChecked:n,disabled:r,onBlur:i,onChange:o,onFocus:a,onFocusVisible:s,readOnly:l,required:c}=e,[d,f]=Bl({controlled:t,default:!!n,name:"Switch",state:"checked"}),h=_=>D=>{var G;D.nativeEvent.defaultPrevented||(f(D.target.checked),o==null||o(D),(G=_.onChange)==null||G.call(_,D))},{isFocusVisibleRef:p,onBlur:m,onFocus:g,ref:v}=eh(),[S,I]=V.useState(!1);r&&S&&I(!1),V.useEffect(()=>{p.current=S},[S,p]);const x=V.useRef(null),w=_=>D=>{var G;x.current||(x.current=D.currentTarget),g(D),p.current===!0&&(I(!0),s==null||s(D)),a==null||a(D),(G=_.onFocus)==null||G.call(_,D)},y=_=>D=>{var G;m(D),p.current===!1&&I(!1),i==null||i(D),(G=_.onBlur)==null||G.call(_,D)},A=sn(v,x);return{checked:d,disabled:!!r,focusVisible:S,getInputProps:(_={})=>O({checked:t,defaultChecked:n,disabled:r,readOnly:l,ref:A,required:c,type:"checkbox",role:"switch","aria-checked":t},_,{onChange:h(_),onFocus:w(_),onBlur:y(_)}),inputRef:A,readOnly:!!l}}function FS(e){const{value:t,defaultValue:n,onChange:r,orientation:i="horizontal",direction:o="ltr",selectionFollowsFocus:a=!1}=e,[s,l]=Bl({controlled:t,default:n,name:"Tabs",state:"value"}),c=V.useCallback((v,S)=>{l(S),r==null||r(v,S)},[r,l]),{subitems:d,contextValue:f}=ch(),h=V.useRef(()=>{}),p=V.useCallback(v=>{var S;return(S=d.get(v))==null?void 0:S.id},[d]),m=V.useCallback(v=>h.current(v),[]),g=V.useCallback(v=>{h.current=v},[]);return{contextValue:O({direction:o,getTabId:m,getTabPanelId:p,onSelected:c,orientation:i,registerTabIdLookup:g,selectionFollowsFocus:a,value:s},f)}}const yh=V.createContext(null);function ma(){const e=V.useContext(yh);if(e==null)throw new Error("No TabsContext provided");return e}function zS(e){const{value:t,children:n}=e,{direction:r,getItemIndex:i,onSelected:o,orientation:a,registerItem:s,registerTabIdLookup:l,selectionFollowsFocus:c,totalSubitemCount:d,value:f,getTabId:h,getTabPanelId:p}=t,m=V.useMemo(()=>({getItemIndex:i,registerItem:s,totalSubitemCount:d}),[s,i,d]),g=V.useMemo(()=>({direction:r,getTabId:h,getTabPanelId:p,onSelected:o,orientation:a,registerTabIdLookup:l,selectionFollowsFocus:c,value:f}),[r,h,p,o,a,l,c,f]);return u.jsx(Vl.Provider,{value:m,children:u.jsx(yh.Provider,{value:g,children:n})})}function jS(e){return e.size}function US(e){const{value:t,id:n,rootRef:r}=e,i=ma();if(i===null)throw new Error("No TabContext provided");const{value:o,getTabId:a}=i,s=Vi(n),l=V.useRef(null),c=sn(l,r),d=V.useMemo(()=>({id:s,ref:l}),[s]),{id:f}=uh(t!=null?t:jS,d),h=f!==o,p=f!==void 0?a(f):void 0;return{hidden:h,getRootProps:(g={})=>O({"aria-labelledby":p!=null?p:void 0,hidden:h,id:s!=null?s:void 0},g,{ref:c}),rootRef:c}}const xh={valueChange:"valueChange"};function VS(e,t){if(t.type===xh.valueChange)return O({},e,{highlightedValue:t.value});const n=ah(e,t),{context:{selectionFollowsFocus:r}}=t;if(t.type===yt.itemsChange){if(n.selectedValues.length>0)return O({},n,{highlightedValue:n.selectedValues[0]});Dt(null,"reset",t.context)}return r&&n.highlightedValue!=null?O({},n,{selectedValues:[n.highlightedValue]}):n}function HS(e){var t;const{rootRef:n}=e,{direction:r="ltr",onSelected:i,orientation:o="horizontal",value:a,registerTabIdLookup:s,selectionFollowsFocus:l}=ma(),{subitems:c,contextValue:d}=ch(),f=V.useCallback(F=>{var T;return(T=c.get(F))==null?void 0:T.id},[c]);s(f);const h=V.useMemo(()=>Array.from(c.keys()),[c]),p=V.useCallback(F=>{var T,j;return F==null?null:(T=(j=c.get(F))==null?void 0:j.ref.current)!=null?T:null},[c]),m=r==="rtl";let g;o==="vertical"?g="vertical":g=m?"horizontal-rtl":"horizontal-ltr";const v=V.useCallback((F,T)=>{var j;i(F,(j=T[0])!=null?j:null)},[i]),S=V.useMemo(()=>a===void 0?{}:a!=null?{selectedValues:[a]}:{selectedValues:[]},[a]),I=V.useCallback(F=>{var T,j;return(T=(j=c.get(F))==null?void 0:j.disabled)!=null?T:!1},[c]),{contextValue:x,dispatch:w,getRootProps:y,state:{highlightedValue:A,selectedValues:E},rootRef:_}=CS({controlledProps:S,disabledItemsFocusable:!l,focusManagement:"DOM",getItemDomElement:p,isItemDisabled:I,items:h,rootRef:n,onChange:v,orientation:g,reducerActionContext:V.useMemo(()=>({selectionFollowsFocus:l||!1}),[l]),selectionMode:"single",stateReducer:VS});V.useEffect(()=>{a!==void 0&&a!=null&&w({type:xh.valueChange,value:a})},[w,a]);const D=(F={})=>O({},F,y(F),{"aria-orientation":o==="vertical"?"vertical":void 0,role:"tablist"});return{contextValue:V.useMemo(()=>O({},d,x),[d,x]),dispatch:w,getRootProps:D,highlightedValue:A,isRtl:m,orientation:o,rootRef:_,selectedValue:(t=E[0])!=null?t:null}}function WS(e){const{value:t,children:n}=e,{dispatch:r,getItemIndex:i,getItemState:o,registerItem:a,totalSubitemCount:s}=t,l=V.useMemo(()=>({dispatch:r,getItemState:o,getItemIndex:i}),[r,i,o]),c=V.useMemo(()=>({getItemIndex:i,registerItem:a,totalSubitemCount:s}),[a,i,s]);return u.jsx(Vl.Provider,{value:c,children:u.jsx(lh.Provider,{value:l,children:n})})}function GS(e){return e.size}function YS(e){const{value:t,rootRef:n,disabled:r=!1,id:i}=e,o=V.useRef(null),a=Vi(i),{value:s,selectionFollowsFocus:l,getTabPanelId:c}=ma(),d=V.useMemo(()=>({disabled:r,ref:o,id:a}),[r,o,a]),{id:f,index:h,totalItemCount:p}=uh(t!=null?t:GS,d),{getRootProps:m,highlighted:g,selected:v}=wS({item:f}),{getRootProps:S,rootRef:I,active:x,focusVisible:w,setFocusVisible:y}=zl({disabled:r,focusableWhenDisabled:!l,type:"button"}),A=sn(o,n,I),E=f!==void 0?c(f):void 0;return{getRootProps:(D={})=>{const G=Mn(D),F=SS(m,S);return O({},D,F(G),{role:"tab","aria-controls":E,"aria-selected":v,id:a,ref:A})},active:x,focusVisible:w,highlighted:g,index:h,rootRef:A,selected:v||f===s,setFocusVisible:y,totalTabsCount:p}}const Ch="$$joy";function KS(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}function QS(e,t){return Mt(e,t)}const qS=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},JS=["values","unit","step"],XS=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>O({},n,{[r.key]:r.val}),{})};function wh(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ae(e,JS),o=XS(t),a=Object.keys(o);function s(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function d(h){return a.indexOf(h)+1<a.length?c(h,a[a.indexOf(h)+1]):s(h)}function f(h){const p=a.indexOf(h);return p===0?s(a[1]):p===a.length-1?l(a[p]):c(h,a[a.indexOf(h)+1]).replace("@media","@media not all and")}return O({keys:a,values:o,up:s,down:l,between:c,only:d,not:f,unit:n},i)}const ZS={borderRadius:4};function Hi(e,t){return t?$n(e,t,{clone:!1}):e}const Kl={xs:0,sm:600,md:900,lg:1200,xl:1536},Ih={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Kl[e]}px)`};function Fn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Ih;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Ih;return Object.keys(t).reduce((a,s)=>{if(Object.keys(o.values||Kl).indexOf(s)!==-1){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function eA(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function tA(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function tr(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function va(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=tr(e,n)||r,t&&(i=t(i,r,e)),i}function rt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=tr(l,r)||{};return Fn(a,s,f=>{let h=va(c,i,f);return f===h&&typeof f=="string"&&(h=va(c,i,`${t}${f==="default"?"":ye(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function nA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const rA={m:"margin",p:"padding"},iA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Sh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},oA=nA(e=>{if(e.length>2)if(Sh[e])e=Sh[e];else return[e];const[t,n]=e.split(""),r=rA[t],i=iA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Ql=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ql=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Ql,...ql];function Wi(e,t,n,r){var i;const o=(i=tr(e,t,!1))!=null?i:n;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function Ah(e){return Wi(e,"spacing",8)}function Gi(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function aA(e,t){return n=>e.reduce((r,i)=>(r[i]=Gi(t,n),r),{})}function sA(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=oA(n),o=aA(i,r),a=e[n];return Fn(e,a,o)}function Th(e,t){const n=Ah(e.theme);return Object.keys(e).map(r=>sA(e,t,r,n)).reduce(Hi,{})}function qe(e){return Th(e,Ql)}qe.propTypes={},qe.filterProps=Ql;function Je(e){return Th(e,ql)}Je.propTypes={},Je.filterProps=ql;function Eh(e=8){if(e.mui)return e;const t=Ah({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function ba(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Hi(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Zt(e){return typeof e!="number"?e:`${e}px solid`}function en(e,t){return rt({prop:e,themeKey:"borders",transform:t})}const lA=en("border",Zt),cA=en("borderTop",Zt),uA=en("borderRight",Zt),dA=en("borderBottom",Zt),fA=en("borderLeft",Zt),hA=en("borderColor"),pA=en("borderTopColor"),gA=en("borderRightColor"),mA=en("borderBottomColor"),vA=en("borderLeftColor"),bA=en("outline",Zt),yA=en("outlineColor"),ya=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Wi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Gi(t,r)});return Fn(e,e.borderRadius,n)}return null};ya.propTypes={},ya.filterProps=["borderRadius"],ba(lA,cA,uA,dA,fA,hA,pA,gA,mA,vA,ya,bA,yA);const xa=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Wi(e.theme,"spacing",8),n=r=>({gap:Gi(t,r)});return Fn(e,e.gap,n)}return null};xa.propTypes={},xa.filterProps=["gap"];const Ca=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Wi(e.theme,"spacing",8),n=r=>({columnGap:Gi(t,r)});return Fn(e,e.columnGap,n)}return null};Ca.propTypes={},Ca.filterProps=["columnGap"];const wa=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Wi(e.theme,"spacing",8),n=r=>({rowGap:Gi(t,r)});return Fn(e,e.rowGap,n)}return null};wa.propTypes={},wa.filterProps=["rowGap"];const xA=rt({prop:"gridColumn"}),CA=rt({prop:"gridRow"}),wA=rt({prop:"gridAutoFlow"}),IA=rt({prop:"gridAutoColumns"}),SA=rt({prop:"gridAutoRows"}),AA=rt({prop:"gridTemplateColumns"}),TA=rt({prop:"gridTemplateRows"}),EA=rt({prop:"gridTemplateAreas"}),kA=rt({prop:"gridArea"});ba(xa,Ca,wa,xA,CA,wA,IA,SA,AA,TA,EA,kA);function Vr(e,t){return t==="grey"?t:e}const _A=rt({prop:"color",themeKey:"palette",transform:Vr}),PA=rt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Vr}),DA=rt({prop:"backgroundColor",themeKey:"palette",transform:Vr});ba(_A,PA,DA);function Ht(e){return e<=1&&e!==0?`${e*100}%`:e}const OA=rt({prop:"width",transform:Ht}),Jl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Kl[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Ht(n)}};return Fn(e,e.maxWidth,t)}return null};Jl.filterProps=["maxWidth"];const RA=rt({prop:"minWidth",transform:Ht}),LA=rt({prop:"height",transform:Ht}),MA=rt({prop:"maxHeight",transform:Ht}),BA=rt({prop:"minHeight",transform:Ht});rt({prop:"size",cssProperty:"width",transform:Ht}),rt({prop:"size",cssProperty:"height",transform:Ht});const $A=rt({prop:"boxSizing"});ba(OA,Jl,RA,LA,MA,BA,$A);const Ia={border:{themeKey:"borders",transform:Zt},borderTop:{themeKey:"borders",transform:Zt},borderRight:{themeKey:"borders",transform:Zt},borderBottom:{themeKey:"borders",transform:Zt},borderLeft:{themeKey:"borders",transform:Zt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Zt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ya},color:{themeKey:"palette",transform:Vr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Vr},backgroundColor:{themeKey:"palette",transform:Vr},p:{style:Je},pt:{style:Je},pr:{style:Je},pb:{style:Je},pl:{style:Je},px:{style:Je},py:{style:Je},padding:{style:Je},paddingTop:{style:Je},paddingRight:{style:Je},paddingBottom:{style:Je},paddingLeft:{style:Je},paddingX:{style:Je},paddingY:{style:Je},paddingInline:{style:Je},paddingInlineStart:{style:Je},paddingInlineEnd:{style:Je},paddingBlock:{style:Je},paddingBlockStart:{style:Je},paddingBlockEnd:{style:Je},m:{style:qe},mt:{style:qe},mr:{style:qe},mb:{style:qe},ml:{style:qe},mx:{style:qe},my:{style:qe},margin:{style:qe},marginTop:{style:qe},marginRight:{style:qe},marginBottom:{style:qe},marginLeft:{style:qe},marginX:{style:qe},marginY:{style:qe},marginInline:{style:qe},marginInlineStart:{style:qe},marginInlineEnd:{style:qe},marginBlock:{style:qe},marginBlockStart:{style:qe},marginBlockEnd:{style:qe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xa},rowGap:{style:wa},columnGap:{style:Ca},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ht},maxWidth:{style:Jl},minWidth:{transform:Ht},height:{transform:Ht},maxHeight:{transform:Ht},minHeight:{transform:Ht},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function NA(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function FA(e,t){return typeof e=="function"?e(t):e}function zA(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=tr(i,c)||{};return f?f(a):Fn(a,r,m=>{let g=va(h,d,m);return m===g&&typeof m=="string"&&(g=va(h,d,`${n}${m==="default"?"":ye(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const a=(r=o.unstable_sxConfig)!=null?r:Ia;function s(l){let c=l;if(typeof l=="function")c=l(o);else if(typeof l!="object")return l;if(!c)return null;const d=eA(o.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=FA(c[p],o);if(m!=null)if(typeof m=="object")if(a[p])h=Hi(h,e(p,m,o,a));else{const g=Fn({theme:o},m,v=>({[p]:v}));NA(g,m)?h[p]=t({sx:m,theme:o}):h=Hi(h,g)}else h=Hi(h,e(p,m,o,a))}),tA(f,h)}return Array.isArray(i)?i.map(s):s(i)}return t}const Sa=zA();Sa.filterProps=["sx"];function kh(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const jA=["breakpoints","palette","spacing","shape"];function _h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Ae(e,jA),s=wh(n),l=Eh(i);let c=$n({breakpoints:s,direction:"ltr",components:{},palette:O({mode:"light"},r),spacing:l,shape:O({},ZS,o)},a);return c.applyStyles=kh,c=t.reduce((d,f)=>$n(d,f),c),c.unstable_sxConfig=O({},Ia,a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(f){return Sa({sx:f,theme:this})},c}function UA(e){return Object.keys(e).length===0}function VA(e=null){const t=V.useContext(pe.ThemeContext);return!t||UA(t)?e:t}const HA=_h();function WA(e=HA){return VA(e)}const GA=["sx"],YA=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Ia;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function KA(e){const{sx:t}=e,n=Ae(e,GA),{systemProps:r,otherProps:i}=YA(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...a)=>{const s=t(...a);return er(s)?O({},r,s):r}:o=O({},r,t),O({},i,{sx:o})}const QA=["ownerState"],qA=["variants"],JA=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function XA(e){return Object.keys(e).length===0}function ZA(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xl(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const e1=_h(),t1=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Aa({defaultTheme:e,theme:t,themeId:n}){return XA(t)?e:t[n]||t}function n1(e){return e?(t,n)=>n[e]:null}function Ta(e,t){let{ownerState:n}=t,r=Ae(t,QA);const i=typeof e=="function"?e(O({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ta(o,O({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let s=Ae(i,qA);return o.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(O({ownerState:n},r,n)):Object.keys(l.props).forEach(d=>{(n==null?void 0:n[d])!==l.props[d]&&r[d]!==l.props[d]&&(c=!1)}),c&&(Array.isArray(s)||(s=[s]),s.push(typeof l.style=="function"?l.style(O({ownerState:n},r,n)):l.style))}),s}return i}function r1(e={}){const{themeId:t,defaultTheme:n=e1,rootShouldForwardProp:r=Xl,slotShouldForwardProp:i=Xl}=e,o=a=>Sa(O({},a,{theme:Aa(O({},a,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(a,s={})=>{qS(a,y=>y.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:h=n1(t1(c))}=s,p=Ae(s,JA),m=d!==void 0?d:c&&c!=="Root"&&c!=="root"||!1,g=f||!1;let v,S=Xl;c==="Root"||c==="root"?S=r:c?S=i:ZA(a)&&(S=void 0);const I=QS(a,O({shouldForwardProp:S,label:v},p)),x=y=>typeof y=="function"&&y.__emotion_real!==y||er(y)?A=>Ta(y,O({},A,{theme:Aa({theme:A.theme,defaultTheme:n,themeId:t})})):y,w=(y,...A)=>{let E=x(y);const _=A?A.map(x):[];l&&h&&_.push(F=>{const T=Aa(O({},F,{defaultTheme:n,themeId:t}));if(!T.components||!T.components[l]||!T.components[l].styleOverrides)return null;const j=T.components[l].styleOverrides,Y={};return Object.entries(j).forEach(([z,$])=>{Y[z]=Ta($,O({},F,{theme:T}))}),h(F,Y)}),l&&!m&&_.push(F=>{var T;const j=Aa(O({},F,{defaultTheme:n,themeId:t})),Y=j==null||(T=j.components)==null||(T=T[l])==null?void 0:T.variants;return Ta({variants:Y},O({},F,{theme:j}))}),g||_.push(o);const D=_.length-A.length;if(Array.isArray(y)&&D>0){const F=new Array(D).fill("");E=[...y,...F],E.raw=[...y.raw,...F]}const G=I(E,..._);return a.muiName&&(G.muiName=a.muiName),G};return I.withConfig&&(w.withConfig=I.withConfig),w}}function i1(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:th(t.components[n].defaultProps,r)}function o1({props:e,name:t,defaultTheme:n,themeId:r}){let i=WA(n);return r&&(i=i[r]||i),i1({theme:i,name:t,props:e})}function a1(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Ph(e){if(e.type)return e;if(e.charAt(0)==="#")return Ph(a1(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ea(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(ea(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const vr=e=>{const t=Ph(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};function Zl(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const Dh=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},s1=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},l1=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function ec(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return s1(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[d]:l1(s,l)}),Dh(o,s,`var(${d})`,c),Dh(a,s,`var(${d}, ${l})`,c)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function br(e){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(e)}function c1(e,t){if(br(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(br(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tc(e){var t=c1(e,"string");return br(t)=="symbol"?t:t+""}const u1=["colorSchemes","components","defaultColorScheme"];function d1(e,t){const{colorSchemes:n={},defaultColorScheme:r="light"}=e,i=Ae(e,u1),{vars:o,css:a,varsWithDefaults:s}=ec(i,t);let l=s;const c={},{[r]:d}=n,f=Ae(n,[r].map(tc));if(Object.entries(f||{}).forEach(([p,m])=>{const{vars:g,css:v,varsWithDefaults:S}=ec(m,t);l=$n(l,S),c[p]={css:v,vars:g}}),d){const{css:p,vars:m,varsWithDefaults:g}=ec(d,t);l=$n(l,g),c[r]={css:p,vars:m}}return{vars:l,generateCssVars:p=>{var m;if(!p){var g;const S=O({},a);return{css:S,vars:o,selector:(t==null||(g=t.getSelector)==null?void 0:g.call(t,p,S))||":root"}}const v=O({},c[p].css);return{css:v,vars:c[p].vars,selector:(t==null||(m=t.getSelector)==null?void 0:m.call(t,p,v))||":root"}}}}const f1=O({},Ia,{borderRadius:{themeKey:"radius"},boxShadow:{themeKey:"shadow"},fontFamily:{themeKey:"fontFamily"},fontSize:{themeKey:"fontSize"},fontWeight:{themeKey:"fontWeight"},letterSpacing:{themeKey:"letterSpacing"},lineHeight:{themeKey:"lineHeight"}}),Yi={grey:{50:"#FBFCFE",100:"#F0F4F8",200:"#DDE7EE",300:"#CDD7E1",400:"#9FA6AD",500:"#636B74",600:"#555E68",700:"#32383E",800:"#171A1C",900:"#0B0D0E"},blue:{50:"#EDF5FD",100:"#E3EFFB",200:"#C7DFF7",300:"#97C3F0",400:"#4393E4",500:"#0B6BCB",600:"#185EA5",700:"#12467B",800:"#0A2744",900:"#051423"},yellow:{50:"#FEFAF6",100:"#FDF0E1",200:"#FCE1C2",300:"#F3C896",400:"#EA9A3E",500:"#9A5B13",600:"#72430D",700:"#492B08",800:"#2E1B05",900:"#1D1002"},red:{50:"#FEF6F6",100:"#FCE4E4",200:"#F7C5C5",300:"#F09898",400:"#E47474",500:"#C41C1C",600:"#A51818",700:"#7D1212",800:"#430A0A",900:"#240505"},green:{50:"#F6FEF6",100:"#E3FBE3",200:"#C7F7C7",300:"#A1E8A1",400:"#51BC51",500:"#1F7A1F",600:"#136C13",700:"#0A470A",800:"#042F04",900:"#021D02"}};function h1(e){var t;return!!e[0].match(/^(typography|variants|breakpoints)$/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/^(mode)$/))||e[0]==="focus"&&e[1]!=="thickness"}const it=(e,t)=>rh(e,t,"Mui"),Xe=(e,t)=>JI(e,t,"Mui"),p1=e=>e&&typeof e=="object"&&Object.keys(e).some(t=>{var n;return(n=t.match)==null?void 0:n.call(t,/^(plain(Hover|Active|Disabled)?(Color|Bg)|outlined(Hover|Active|Disabled)?(Color|Border|Bg)|soft(Hover|Active|Disabled)?(Color|Bg)|solid(Hover|Active|Disabled)?(Color|Bg))$/)}),Oh=(e,t,n)=>{t.includes("Color")&&(e.color=n),t.includes("Bg")&&(e.backgroundColor=n),t.includes("Border")&&(e.borderColor=n)},Rh=(e,t,n)=>{const r={};return Object.entries(t||{}).forEach(([i,o])=>{if(i.match(new RegExp(`${e}(color|bg|border)`,"i"))&&o){const a=n?n(i):o;i.includes("Disabled")&&(r.pointerEvents="none",r.cursor="default",r["--Icon-color"]="currentColor"),i.match(/(Hover|Active|Disabled)/)||(r["--variant-borderWidth"]||(r["--variant-borderWidth"]="0px"),i.includes("Border")&&(r["--variant-borderWidth"]="1px",r.border="var(--variant-borderWidth) solid")),Oh(r,i,a)}}),r},Tt=(e,t)=>{let n={};if(t){const{getCssVar:r,palette:i}=t;Object.entries(i).forEach(o=>{const[a,s]=o;p1(s)&&typeof s=="object"&&(n=O({},n,{[a]:Rh(e,s,l=>`var(--variant-${l}, ${r(`palette-${a}-${l}`,i[a][l])})`)}))})}return n.context=Rh(e,{plainColor:"var(--variant-plainColor)",plainHoverColor:"var(--variant-plainHoverColor)",plainHoverBg:"var(--variant-plainHoverBg)",plainActiveBg:"var(--variant-plainActiveBg)",plainDisabledColor:"var(--variant-plainDisabledColor)",outlinedColor:"var(--variant-outlinedColor)",outlinedBorder:"var(--variant-outlinedBorder)",outlinedHoverColor:"var(--variant-outlinedHoverColor)",outlinedHoverBorder:"var(--variant-outlinedHoverBorder)",outlinedHoverBg:"var(--variant-outlinedHoverBg)",outlinedActiveBg:"var(--variant-outlinedActiveBg)",outlinedDisabledColor:"var(--variant-outlinedDisabledColor)",outlinedDisabledBorder:"var(--variant-outlinedDisabledBorder)",softColor:"var(--variant-softColor)",softBg:"var(--variant-softBg)",softHoverColor:"var(--variant-softHoverColor)",softHoverBg:"var(--variant-softHoverBg)",softActiveBg:"var(--variant-softActiveBg)",softDisabledColor:"var(--variant-softDisabledColor)",softDisabledBg:"var(--variant-softDisabledBg)",solidColor:"var(--variant-solidColor)",solidBg:"var(--variant-solidBg)",solidHoverBg:"var(--variant-solidHoverBg)",solidActiveBg:"var(--variant-solidActiveBg)",solidDisabledColor:"var(--variant-solidDisabledColor)",solidDisabledBg:"var(--variant-solidDisabledBg)"}),n},g1=["cssVarPrefix","breakpoints","spacing","components","variants","shouldSkipGeneratingVar"],m1=["colorSchemes"],v1=(e="joy")=>Zl(e);function b1(e){var t,n,r,i,o,a,s,l,c,d;const f={},{cssVarPrefix:h="joy",breakpoints:p,spacing:m,components:g,variants:v,shouldSkipGeneratingVar:S=h1}=f,I=Ae(f,g1),x=v1(h),w={primary:Yi.blue,neutral:Yi.grey,danger:Yi.red,success:Yi.green,warning:Yi.yellow,common:{white:"#FFF",black:"#000"}},y=X=>{var le;const re=X.split("-"),ge=re[1],Se=re[2];return x(X,(le=w[ge])==null?void 0:le[Se])},A=X=>({plainColor:y(`palette-${X}-500`),plainHoverBg:y(`palette-${X}-100`),plainActiveBg:y(`palette-${X}-200`),plainDisabledColor:y("palette-neutral-400"),outlinedColor:y(`palette-${X}-500`),outlinedBorder:y(`palette-${X}-300`),outlinedHoverBg:y(`palette-${X}-100`),outlinedActiveBg:y(`palette-${X}-200`),outlinedDisabledColor:y("palette-neutral-400"),outlinedDisabledBorder:y("palette-neutral-200"),softColor:y(`palette-${X}-700`),softBg:y(`palette-${X}-100`),softHoverBg:y(`palette-${X}-200`),softActiveColor:y(`palette-${X}-800`),softActiveBg:y(`palette-${X}-300`),softDisabledColor:y("palette-neutral-400"),softDisabledBg:y("palette-neutral-50"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-400"),solidDisabledBg:y("palette-neutral-100")}),E=X=>({plainColor:y(`palette-${X}-300`),plainHoverBg:y(`palette-${X}-800`),plainActiveBg:y(`palette-${X}-700`),plainDisabledColor:y("palette-neutral-500"),outlinedColor:y(`palette-${X}-200`),outlinedBorder:y(`palette-${X}-700`),outlinedHoverBg:y(`palette-${X}-800`),outlinedActiveBg:y(`palette-${X}-700`),outlinedDisabledColor:y("palette-neutral-500"),outlinedDisabledBorder:y("palette-neutral-800"),softColor:y(`palette-${X}-200`),softBg:y(`palette-${X}-800`),softHoverBg:y(`palette-${X}-700`),softActiveColor:y(`palette-${X}-100`),softActiveBg:y(`palette-${X}-600`),softDisabledColor:y("palette-neutral-500"),softDisabledBg:y("palette-neutral-800"),solidColor:y("palette-common-white"),solidBg:y(`palette-${X}-500`),solidHoverBg:y(`palette-${X}-600`),solidActiveBg:y(`palette-${X}-700`),solidDisabledColor:y("palette-neutral-500"),solidDisabledBg:y("palette-neutral-800")}),_={palette:{mode:"light",primary:O({},w.primary,A("primary")),neutral:O({},w.neutral,A("neutral"),{plainColor:y("palette-neutral-700"),plainHoverColor:y("palette-neutral-900"),outlinedColor:y("palette-neutral-700")}),danger:O({},w.danger,A("danger")),success:O({},w.success,A("success")),warning:O({},w.warning,A("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-800"),secondary:y("palette-neutral-700"),tertiary:y("palette-neutral-600"),icon:y("palette-neutral-500")},background:{body:y("palette-common-white"),surface:y("palette-neutral-50"),popup:y("palette-common-white"),level1:y("palette-neutral-100"),level2:y("palette-neutral-200"),level3:y("palette-neutral-300"),tooltip:y("palette-neutral-500"),backdrop:`rgba(${x("palette-neutral-darkChannel",vr(w.neutral[900]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",vr(w.neutral[500]))} / 0.2)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"21 21 21",shadowOpacity:"0.08"},D={palette:{mode:"dark",primary:O({},w.primary,E("primary")),neutral:O({},w.neutral,E("neutral"),{plainColor:y("palette-neutral-300"),plainHoverColor:y("palette-neutral-300")}),danger:O({},w.danger,E("danger")),success:O({},w.success,E("success")),warning:O({},w.warning,E("warning")),common:{white:"#FFF",black:"#000"},text:{primary:y("palette-neutral-100"),secondary:y("palette-neutral-300"),tertiary:y("palette-neutral-400"),icon:y("palette-neutral-400")},background:{body:y("palette-common-black"),surface:y("palette-neutral-900"),popup:y("palette-common-black"),level1:y("palette-neutral-800"),level2:y("palette-neutral-700"),level3:y("palette-neutral-600"),tooltip:y("palette-neutral-600"),backdrop:`rgba(${x("palette-neutral-darkChannel",vr(w.neutral[50]))} / 0.25)`},divider:`rgba(${x("palette-neutral-mainChannel",vr(w.neutral[500]))} / 0.16)`,focusVisible:y("palette-primary-500")},shadowRing:"0 0 #000",shadowChannel:"0 0 0",shadowOpacity:"0.6"},G='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',F=O({body:`"Inter", ${x(`fontFamily-fallback, ${G}`)}`,display:`"Inter", ${x(`fontFamily-fallback, ${G}`)}`,code:"Source Code Pro,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",fallback:G},I.fontFamily),T=O({sm:300,md:500,lg:600,xl:700},I.fontWeight),j=O({xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem",xl2:"1.5rem",xl3:"1.875rem",xl4:"2.25rem"},I.fontSize),Y=O({xs:"1.33334",sm:"1.42858",md:"1.5",lg:"1.55556",xl:"1.66667"},I.lineHeight),z=(t=(n=I.colorSchemes)==null||(n=n.light)==null?void 0:n.shadowRing)!=null?t:_.shadowRing,$=(r=(i=I.colorSchemes)==null||(i=i.light)==null?void 0:i.shadowChannel)!=null?r:_.shadowChannel,B=(o=(a=I.colorSchemes)==null||(a=a.light)==null?void 0:a.shadowOpacity)!=null?o:_.shadowOpacity,W={colorSchemes:{light:_,dark:D},fontSize:j,fontFamily:F,fontWeight:T,focus:{thickness:"2px",selector:`&.${it("","focusVisible")}, &:focus-visible`,default:{outlineOffset:`var(--focus-outline-offset, ${x("focus-thickness",(s=(l=I.focus)==null?void 0:l.thickness)!=null?s:"2px")})`,outline:`${x("focus-thickness",(c=(d=I.focus)==null?void 0:d.thickness)!=null?c:"2px")} solid ${x("palette-focusVisible",w.primary[500])}`}},lineHeight:Y,radius:{xs:"2px",sm:"6px",md:"8px",lg:"12px",xl:"16px"},shadow:{xs:`${x("shadowRing",z)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,sm:`${x("shadowRing",z)}, 0px 1px 2px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 2px 4px 0px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,md:`${x("shadowRing",z)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 6px 12px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,lg:`${x("shadowRing",z)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 12px 16px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`,xl:`${x("shadowRing",z)}, 0px 2px 8px -2px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)}), 0px 20px 24px -4px rgba(${x("shadowChannel",$)} / ${x("shadowOpacity",B)})`},zIndex:{badge:1,table:10,popup:1e3,modal:1300,snackbar:1400,tooltip:1500},typography:{h1:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl4, ${j.xl4}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},h2:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-xl, ${T.xl}`),fontSize:x(`fontSize-xl3, ${j.xl3}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},h3:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl2, ${j.xl2}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},h4:{fontFamily:x(`fontFamily-display, ${F.display}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-xl, ${j.xl}`),lineHeight:x(`lineHeight-md, ${Y.md}`),letterSpacing:"-0.025em",color:x(`palette-text-primary, ${_.palette.text.primary}`)},"title-lg":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-lg, ${T.lg}`),fontSize:x(`fontSize-lg, ${j.lg}`),lineHeight:x(`lineHeight-xs, ${Y.xs}`),color:x(`palette-text-primary, ${_.palette.text.primary}`)},"title-md":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-md, ${j.md}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-primary, ${_.palette.text.primary}`)},"title-sm":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-sm, ${j.sm}`),lineHeight:x(`lineHeight-sm, ${Y.sm}`),color:x(`palette-text-primary, ${_.palette.text.primary}`)},"body-lg":{fontFamily:x(`fontFamily-body, ${F.body}`),fontSize:x(`fontSize-lg, ${j.lg}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-secondary, ${_.palette.text.secondary}`)},"body-md":{fontFamily:x(`fontFamily-body, ${F.body}`),fontSize:x(`fontSize-md, ${j.md}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-secondary, ${_.palette.text.secondary}`)},"body-sm":{fontFamily:x(`fontFamily-body, ${F.body}`),fontSize:x(`fontSize-sm, ${j.sm}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-tertiary, ${_.palette.text.tertiary}`)},"body-xs":{fontFamily:x(`fontFamily-body, ${F.body}`),fontWeight:x(`fontWeight-md, ${T.md}`),fontSize:x(`fontSize-xs, ${j.xs}`),lineHeight:x(`lineHeight-md, ${Y.md}`),color:x(`palette-text-tertiary, ${_.palette.text.tertiary}`)}}},Q=I?$n(W,I):W,{colorSchemes:te}=Q,R=Ae(Q,m1),M=O({colorSchemes:te},R,{breakpoints:wh(p!=null?p:{}),components:$n({MuiSvgIcon:{defaultProps:{fontSize:"xl2"},styleOverrides:{root:({ownerState:X,theme:le})=>{var re;const ge=X.instanceFontSize;return O({margin:"var(--Icon-margin)"},X.fontSize&&X.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${le.vars.fontSize[X.fontSize]})`},!X.htmlColor&&O({color:`var(--Icon-color, ${M.vars.palette.text.icon})`},X.color&&X.color!=="inherit"&&le.vars.palette[X.color]&&{color:`rgba(${(re=le.vars.palette[X.color])==null?void 0:re.mainChannel} / 1)`}),ge&&ge!=="inherit"&&{"--Icon-fontSize":le.vars.fontSize[ge]})}}}},g),cssVarPrefix:h,getCssVar:x,spacing:Eh(m)});function U(X,le){Object.keys(le).forEach(re=>{const ge={main:"500",light:"200",dark:"700"};X==="dark"&&(ge.main=400),!le[re].mainChannel&&le[re][ge.main]&&(le[re].mainChannel=vr(le[re][ge.main])),!le[re].lightChannel&&le[re][ge.light]&&(le[re].lightChannel=vr(le[re][ge.light])),!le[re].darkChannel&&le[re][ge.dark]&&(le[re].darkChannel=vr(le[re][ge.dark]))})}Object.entries(M.colorSchemes).forEach(([X,le])=>{U(X,le.palette)});const H={prefix:h,shouldSkipGeneratingVar:S},{vars:ne,generateCssVars:se}=d1(O({colorSchemes:te},R),H);M.vars=ne,M.generateCssVars=se,M.unstable_sxConfig=O({},f1,void 0),M.unstable_sx=function(le){return Sa({sx:le,theme:this})},M.getColorSchemeSelector=X=>X==="light"?"&":`&[data-joy-color-scheme="${X}"], [data-joy-color-scheme="${X}"] &`;const ae={getCssVar:x,palette:M.colorSchemes.light.palette};return M.variants=$n({plain:Tt("plain",ae),plainHover:Tt("plainHover",ae),plainActive:Tt("plainActive",ae),plainDisabled:Tt("plainDisabled",ae),outlined:Tt("outlined",ae),outlinedHover:Tt("outlinedHover",ae),outlinedActive:Tt("outlinedActive",ae),outlinedDisabled:Tt("outlinedDisabled",ae),soft:Tt("soft",ae),softHover:Tt("softHover",ae),softActive:Tt("softActive",ae),softDisabled:Tt("softDisabled",ae),solid:Tt("solid",ae),solidHover:Tt("solidHover",ae),solidActive:Tt("solidActive",ae),solidDisabled:Tt("solidDisabled",ae)},v),M.palette=O({},M.colorSchemes.light.palette,{colorScheme:"light"}),M.shouldSkipGeneratingVar=S,M.applyStyles=kh,M}const Lh=b1(),be=r1({defaultTheme:Lh,themeId:Ch});function dt({props:e,name:t}){return o1({props:e,name:t,defaultTheme:O({},Lh,{components:{}}),themeId:Ch})}function y1(e){return it("MuiAccordion",e)}const x1=Xe("MuiAccordion",["root","expanded","disabled"]),C1=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],w1=["component","slots","slotProps"],I1=["component"];function Ie(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=Ae(t,C1),{component:c,slots:d={[e]:void 0},slotProps:f={[e]:void 0}}=o,h=Ae(o,w1),p=d[e]||r,m=LI(f[e],i),g=$I(O({className:n},l,{externalForwardedProps:e==="root"?h:void 0,externalSlotProps:m})),{props:{component:v},internalRef:S}=g,I=Ae(g.props,I1),x=sn(S,m==null?void 0:m.ref,t.ref),w=a?a(I):{},y=O({},i,w),A=e==="root"?v||c:v,E=RI(p,O({},e==="root"&&!c&&!d[e]&&s,e!=="root"&&!d[e]&&s,I,A&&{as:A},{ref:x}),y);return Object.keys(w).forEach(_=>{delete E[_]}),[p,E]}const nc=V.createContext({});function S1(e){return it("MuiListItem",e)}const Mh=Xe("MuiListItem",["root","startAction","endAction","nested","nesting","sticky","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantSoft","variantOutlined","variantSolid"]),Ea=V.createContext(!1),rc=V.createContext(!1),Bh=V.createContext(!1),$h=V.createContext(void 0),A1=V.createContext(void 0),Nh=V.createContext(void 0),T1=["component","className","children","nested","sticky","variant","color","startAction","endAction","role","slots","slotProps"],E1=e=>{const{sticky:t,nested:n,nesting:r,variant:i,color:o}=e,a={root:["root",n&&"nested",r&&"nesting",t&&"sticky",o&&`color${ye(o)}`,i&&`variant${ye(i)}`],startAction:["startAction"],endAction:["endAction"]};return ut(a,S1,{})},ic=be("li")(({theme:e,ownerState:t})=>{var n;return[!t.nested&&{"--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItemButton-marginBlock":"calc(-1 * var(--ListItem-paddingY))",alignItems:"center",gap:"var(--ListItem-gap)",marginInline:"var(--ListItem-marginInline)"},t.nested&&{"--NestedList-marginRight":"calc(-1 * var(--ListItem-paddingRight))","--NestedList-marginLeft":"calc(-1 * var(--ListItem-paddingLeft))","--NestedListItem-paddingLeft":"calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))","--ListItem-marginInline":"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",flexDirection:"column"},O({"--unstable_actionRadius":"calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))"},t.startAction&&{"--unstable_startActionWidth":"2rem"},t.endAction&&{"--unstable_endActionWidth":"2.5rem"},{boxSizing:"border-box",borderRadius:"var(--ListItem-radius)",display:"var(--_ListItem-display)","&:not([hidden])":{"--_ListItem-display":"var(--_List-markerDisplay, flex)"},flex:"none",listStyleType:"var(--_List-markerType, disc)",position:"relative",paddingBlockStart:t.nested?0:"var(--ListItem-paddingY)",paddingBlockEnd:t.nested?0:"var(--ListItem-paddingY)",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)"},t["data-first-child"]===void 0&&O({},t.row?{marginInlineStart:"var(--List-gap)"}:{marginBlockStart:"var(--List-gap)"}),t.row&&t.wrap&&{marginInlineStart:"var(--List-gap)",marginBlockStart:"var(--List-gap)"},{minBlockSize:"var(--ListItem-minHeight)"},t.sticky&&{position:"sticky",top:"var(--ListItem-stickyTop, 0px)",zIndex:1,background:`var(--ListItem-stickyBackground, ${e.vars.palette.background.body})`},{[`.${Mh.nested} > &`]:{"--_ListItem-display":"flex"}}),(n=e.variants[t.variant])==null?void 0:n[t.color]]}),k1=be(ic,{name:"JoyListItem",slot:"Root",overridesResolver:(e,t)=>t.root})({}),_1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",left:0,transform:"translate(var(--ListItem-startActionTranslateX), -50%)",zIndex:1})),P1=be("div",{name:"JoyListItem",slot:"StartAction",overridesResolver:(e,t)=>t.startAction})(({ownerState:e})=>({display:"inherit",position:"absolute",top:e.nested?"calc(var(--ListItem-minHeight) / 2)":"50%",right:0,transform:"translate(var(--ListItem-endActionTranslateX), -50%)"})),Fh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyListItem"}),i=V.useContext(Nh),o=V.useContext($h),a=V.useContext(rc),s=V.useContext(Bh),l=V.useContext(Ea),{component:c,className:d,children:f,nested:h=!1,sticky:p=!1,variant:m="plain",color:g="neutral",startAction:v,endAction:S,role:I,slots:x={},slotProps:w={}}=r,y=Ae(r,T1),[A,E]=V.useState(""),[_,D]=(o==null?void 0:o.split(":"))||["",""],G=c||(_&&!_.match(/^(ul|ol|menu)$/)?"div":void 0);let F=i==="menu"?"none":void 0;o&&(F={menu:"none",menubar:"none",group:"presentation"}[D]),I&&(F=I);const T=O({},r,{sticky:p,startAction:v,endAction:S,row:a,wrap:s,variant:m,color:g,nesting:l,nested:h,component:G,role:F}),j=E1(T),Y=O({},y,{component:G,slots:x,slotProps:w}),[z,$]=Ie("root",{additionalProps:{role:F},ref:n,className:Bn(j.root,d),elementType:k1,externalForwardedProps:Y,ownerState:T}),[B,W]=Ie("startAction",{className:j.startAction,elementType:_1,externalForwardedProps:Y,ownerState:T}),[Q,te]=Ie("endAction",{className:j.endAction,elementType:P1,externalForwardedProps:Y,ownerState:T});return u.jsx(A1.Provider,{value:E,children:u.jsx(Ea.Provider,{value:h?A||!0:!1,children:u.jsxs(z,O({},$,{children:[v&&u.jsx(B,O({},W,{children:v})),V.Children.map(f,(R,M)=>{var U;return V.isValidElement(R)?V.cloneElement(R,O({},M===0&&{"data-first-child":""},Jf(R,["ListItem"])&&{component:((U=R.props)==null?void 0:U.component)||"div"})):R}),S&&u.jsx(Q,O({},te,{children:S}))]}))})})});Fh.muiName="ListItem";const zh=Fh;function D1(e){return it("MuiAccordionDetails",e)}const yr=Xe("MuiAccordionDetails",["root","content","expanded"]),O1=["accordionId","component","color","children","defaultExpanded","disabled","expanded","onChange","variant","slots","slotProps"],R1=e=>{const{variant:t,color:n,expanded:r,disabled:i}=e,o={root:["root",r&&"expanded",i&&"disabled",n&&`color${ye(n)}`,t&&`variant${ye(t)}`]};return ut(o,y1,{})},L1=be(ic,{name:"JoyAccordion",slot:"Root",overridesResolver:(e,t)=>t.root})({borderBottom:"var(--Accordion-borderBottom)","&[data-first-child]":{"--ListItem-radius":"var(--unstable_List-childRadius) var(--unstable_List-childRadius) 0 0"},"&[data-last-child]":{"--ListItem-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)",'& [aria-expanded="true"]':{"--ListItem-radius":"0"},[`& .${yr.root}`]:{"--AccordionDetails-radius":"0 0 var(--unstable_List-childRadius) var(--unstable_List-childRadius)"}},"&:not([data-first-child]):not([data-last-child])":{"--ListItem-radius":"0"}}),M1=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordion"}),{accordionId:i,component:o="div",color:a="neutral",children:s,defaultExpanded:l=!1,disabled:c=!1,expanded:d,onChange:f,variant:h="plain",slots:p={},slotProps:m={}}=r,g=Ae(r,O1),v=Vi(i),[S,I]=Bl({controlled:d,default:l,name:"Accordion",state:"expanded"}),x=V.useCallback(G=>{I(!S),f&&f(G,!S)},[S,f,I]),w=V.useMemo(()=>({accordionId:v,expanded:S,disabled:c,toggle:x}),[v,S,c,x]),y=O({},g,{component:o,slots:p,slotProps:m}),A=O({},r,{component:o,color:a,variant:h,expanded:S,disabled:c,nested:!0}),E=R1(A),[_,D]=Ie("root",{ref:n,className:E.root,elementType:L1,externalForwardedProps:y,ownerState:A});return u.jsx(nc.Provider,{value:w,children:u.jsx(_,O({},D,{children:V.Children.map(s,(G,F)=>V.isValidElement(G)&&F===0?V.cloneElement(G,{"data-first-child":""}):G)}))})});function B1(e){return it("MuiAccordionGroup",e)}Xe("MuiAccordionGroup",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const $1={"--NestedList-marginRight":"0px","--NestedList-marginLeft":"0px","--NestedListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px"};function oc(e){const{children:t,nested:n,row:r=!1,wrap:i=!1}=e,o=u.jsx(rc.Provider,{value:r,children:u.jsx(Bh.Provider,{value:i,children:V.Children.map(t,(a,s)=>V.isValidElement(a)?V.cloneElement(a,O({},s===0&&{"data-first-child":""},s===V.Children.count(t)-1&&{"data-last-child":""})):a)})});return n===void 0?o:u.jsx(Ea.Provider,{value:n,children:o})}const ac=({theme:e,ownerState:t},n)=>{let r={};function i(o){if(typeof o=="function"){const a=o(e);i(a)}else Array.isArray(o)?o.forEach(a=>{typeof a!="boolean"&&i(a)}):typeof o=="object"&&(r=O({},r,o))}return t.sx&&(i(t.sx),n.forEach(o=>{const a=r[o];if(typeof a=="string"||typeof a=="number")if(o==="borderRadius")if(typeof a=="number")r[o]=`${a}px`;else{var s;r[o]=((s=e.vars)==null?void 0:s.radius[a])||a}else["p","padding","m","margin"].indexOf(o)!==-1&&typeof a=="number"?r[o]=e.spacing(a):r[o]=a;else typeof a=="function"?r[o]=a(e):r[o]=void 0})),r};function N1(e){return it("MuiList",e)}Xe("MuiList",["root","nesting","scoped","sizeSm","sizeMd","sizeLg","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","horizontal","vertical"]);const F1=V.createContext(void 0),z1=["component","className","children","size","orientation","wrap","variant","color","role","slots","slotProps"],j1=e=>{const{variant:t,color:n,size:r,nesting:i,orientation:o,instanceSize:a}=e,s={root:["root",o,t&&`variant${ye(t)}`,n&&`color${ye(n)}`,!a&&!i&&r&&`size${ye(r)}`,a&&`size${ye(a)}`,i&&"nesting"]};return ut(s,N1,{})},sc=be("ul")(({theme:e,ownerState:t})=>{var n;const{p:r,padding:i,borderRadius:o}=ac({theme:e,ownerState:t},["p","padding","borderRadius"]);function a(s){return s==="sm"?{"--ListDivider-gap":"0.25rem","--ListItem-minHeight":"2rem","--ListItem-paddingY":"3px","--ListItem-paddingX":t.marker?"3px":"0.5rem","--ListItem-gap":"0.5rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.5rem":"2rem","--Icon-fontSize":e.vars.fontSize.lg}:s==="md"?{"--ListDivider-gap":"0.375rem","--ListItem-minHeight":"2.25rem","--ListItem-paddingY":"0.25rem","--ListItem-paddingX":t.marker?"0.25rem":"0.75rem","--ListItem-gap":"0.625rem","--ListItemDecorator-size":t.orientation==="horizontal"?"1.75rem":"2.5rem","--Icon-fontSize":e.vars.fontSize.xl}:s==="lg"?{"--ListDivider-gap":"0.5rem","--ListItem-minHeight":"2.75rem","--ListItem-paddingY":"0.375rem","--ListItem-paddingX":t.marker?"0.5rem":"1rem","--ListItem-gap":"0.75rem","--ListItemDecorator-size":t.orientation==="horizontal"?"2.25rem":"3rem","--Icon-fontSize":e.vars.fontSize.xl2}:{}}return[t.nesting&&O({},a(t.instanceSize),{"--ListItem-paddingRight":"var(--ListItem-paddingX)","--ListItem-paddingLeft":"var(--NestedListItem-paddingLeft)","--ListItemButton-marginBlock":"0px","--ListItemButton-marginInline":"0px","--ListItem-marginBlock":"0px","--ListItem-marginInline":"0px",padding:0},t.marker&&{paddingInlineStart:"calc(3ch - var(--_List-markerDeduct, 0px))"},{marginInlineStart:"var(--NestedList-marginLeft)",marginInlineEnd:"var(--NestedList-marginRight)",marginBlockStart:"var(--List-gap)",marginBlockEnd:"initial"}),!t.nesting&&O({},a(t.size),{"--List-gap":"0px","--List-nestedInsetStart":"0px","--ListItem-paddingLeft":"var(--ListItem-paddingX)","--ListItem-paddingRight":"var(--ListItem-paddingX)"},t.marker&&{"--_List-markerDeduct":"1ch"},{"--unstable_List-childRadius":"calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))","--ListItem-radius":"var(--unstable_List-childRadius)","--ListItem-startActionTranslateX":"calc(0.5 * var(--ListItem-paddingLeft))","--ListItem-endActionTranslateX":"calc(-0.5 * var(--ListItem-paddingRight))",margin:"initial"},e.typography[`body-${t.size}`],t.orientation==="horizontal"?O({},t.wrap?{padding:"var(--List-padding)",marginInlineStart:"calc(-1 * var(--List-gap))",marginBlockStart:"calc(-1 * var(--List-gap))"}:{paddingInline:"var(--List-padding, var(--ListDivider-gap))",paddingBlock:"var(--List-padding)"}):{paddingBlock:"var(--List-padding, var(--ListDivider-gap))",paddingInline:"var(--List-padding)"},t.marker&&{paddingInlineStart:"3ch"}),O({boxSizing:"border-box",borderRadius:"var(--List-radius)",listStyle:"none",display:"flex",flexDirection:t.orientation==="horizontal"?"row":"column"},t.wrap&&{flexWrap:"wrap"},t.marker&&{"--_List-markerDisplay":"list-item","--_List-markerType":t.marker,lineHeight:"calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"},{flexGrow:1,position:"relative"},(n=e.variants[t.variant])==null?void 0:n[t.color],{"--unstable_List-borderWidth":"var(--variant-borderWidth, 0px)"},o!==void 0&&{"--List-radius":o},r!==void 0&&{"--List-padding":r},i!==void 0&&{"--List-padding":i})]}),U1=be(sc,{name:"JoyList",slot:"Root",overridesResolver:(e,t)=>t.root})({}),V1=V.forwardRef(function(t,n){var r;const i=V.useContext(Ea),o=V.useContext(Nh),a=V.useContext(F1),s=dt({props:t,name:"JoyList"}),{component:l,className:c,children:d,size:f,orientation:h="vertical",wrap:p=!1,variant:m="plain",color:g="neutral",role:v,slots:S={},slotProps:I={}}=s,x=Ae(s,z1),w=f||((r=t.size)!=null?r:"md");let y;o&&(y="group"),a&&(y="presentation"),v&&(y=v);const A=O({},s,{instanceSize:t.size,size:w,nesting:i,orientation:h,wrap:p,variant:m,color:g,role:y}),E=j1(A),_=O({},x,{component:l,slots:S,slotProps:I}),[D,G]=Ie("root",{ref:n,className:Bn(E.root,c),elementType:U1,externalForwardedProps:_,ownerState:A,additionalProps:{as:l,role:y,"aria-labelledby":typeof i=="string"?i:void 0}});return u.jsx(D,O({},G,{children:u.jsx($h.Provider,{value:`${typeof l=="string"?l:""}:${y||""}`,children:u.jsx(oc,{row:h==="horizontal",wrap:p,children:d})})}))}),H1=["component","color","children","disableDivider","variant","transition","size","slots","slotProps"],W1=e=>{const{variant:t,color:n,size:r}=e,i={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`,r&&`size${ye(r)}`]};return ut(i,B1,{})},G1=be(sc,{name:"JoyAccordionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{let n={};return t.transition&&(typeof t.transition=="string"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition}, padding-block ${t.transition}`}),typeof t.transition=="object"&&(n={"--AccordionDetails-transition":`grid-template-rows ${t.transition.initial}, padding-block ${t.transition.initial}`,[`& .${yr.root}.${yr.expanded}`]:{"--AccordionDetails-transition":`grid-template-rows ${t.transition.expanded}, padding-block ${t.transition.expanded}`}})),O({"--List-padding":"0px","--ListDivider-gap":"0px"},n,!t.disableDivider&&{[`& .${x1.root}:not([data-last-child])`]:{"--Accordion-borderBottom":`1px solid ${e.vars.palette.divider}`}})}),Y1=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordionGroup"}),{component:i="div",color:o="neutral",children:a,disableDivider:s=!1,variant:l="plain",transition:c="0.2s ease",size:d="md",slots:f={},slotProps:h={}}=r,p=Ae(r,H1),m=O({},p,{component:i,slots:f,slotProps:h}),g=O({},r,{component:i,color:o,disableDivider:s,variant:l,transition:c,size:d}),v=W1(g),[S,I]=Ie("root",{ref:n,className:v.root,elementType:G1,externalForwardedProps:m,ownerState:g});return u.jsx(S,O({},I,{children:u.jsx(oc,{children:a})}))}),K1=["component","children","color","variant","slots","slotProps"],Q1=e=>{const{expanded:t}=e;return ut({root:["root",t&&"expanded"],content:["content",t&&"expanded"]},D1,{})},q1=be("div",{name:"JoyAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n;return O({overflow:"hidden",borderRadius:"var(--AccordionDetails-radius)",display:"grid",gridTemplateRows:"1fr",marginInline:"calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))",transition:"var(--AccordionDetails-transition)"},(n=t.variants[e.variant])==null?void 0:n[e.color],{[`&:not(.${yr.expanded})`]:{gridTemplateRows:"0fr"}})}),J1=be("div",{name:"JoyAccordionDetails",slot:"Content",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",overflow:"hidden",paddingInlineStart:"var(--ListItem-paddingLeft)",paddingInlineEnd:"var(--ListItem-paddingRight)",paddingBlockStart:"calc(var(--ListItem-paddingY) / 2)",paddingBlockEnd:"calc(2.5 * var(--ListItem-paddingY))",transition:"var(--AccordionDetails-transition)",[`&:not(.${yr.expanded})`]:{paddingBlock:0}}),X1=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordionDetails"}),{component:i="div",children:o,color:a="neutral",variant:s="plain",slots:l={},slotProps:c={}}=r,d=Ae(r,K1),{accordionId:f,expanded:h=!1}=V.useContext(nc),p=V.useRef(null),m=sn(p,n);V.useEffect(()=>{p.current&&p.current.querySelectorAll('a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])').forEach(E=>{if(h){const _=E.getAttribute("data-prev-tabindex"),D=E.getAttribute("tabindex");D&&_&&(E.setAttribute("tabindex",_),E.removeAttribute("data-prev-tabindex")),!_&&!D&&E.removeAttribute("tabindex")}else E.setAttribute("data-prev-tabindex",E.getAttribute("tabindex")||""),E.setAttribute("tabindex","-1")})},[h]);const g=O({},d,{component:i,slots:l,slotProps:c}),v=O({},r,{component:i,color:a,variant:s,expanded:h,nesting:!0}),S=Q1(v),[I,x]=Ie("root",{ref:m,className:S.root,elementType:q1,externalForwardedProps:g,additionalProps:{id:`${f}-details`,"aria-labelledby":`${f}-summary`,role:"region",hidden:h?void 0:!0},ownerState:v}),[w,y]=Ie("content",{className:S.content,elementType:J1,externalForwardedProps:g,ownerState:v});return u.jsx(I,O({},x,{children:u.jsx(w,O({},y,{children:o}))}))});function Z1(e){return it("MuiAccordionSummary",e)}const ka=Xe("MuiAccordionSummary",["root","button","indicator","disabled","expanded"]),_a=Xe("MuiListItemButton",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","focusVisible","disabled","selected","variantPlain","variantSoft","variantOutlined","variantSolid"]),eT=V.createContext("horizontal"),lc=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;return O({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",font:"inherit",display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"stretch",gap:"var(--ListItem-gap)"},t.orientation==="vertical"&&{flexDirection:"column",justifyContent:"center"},{textAlign:"initial",textDecoration:"initial",backgroundColor:"initial",cursor:"pointer",marginInline:"var(--ListItemButton-marginInline)",marginBlock:"var(--ListItemButton-marginBlock)"},t["data-first-child"]===void 0&&{marginInlineStart:t.row?"var(--List-gap)":void 0,marginBlockStart:t.row?void 0:"var(--List-gap)"},{paddingBlock:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",paddingInlineStart:"calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",paddingInlineEnd:"calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",minBlockSize:"var(--ListItem-minHeight)",border:"1px solid transparent",borderRadius:"var(--ListItem-radius)",flex:"var(--unstable_ListItem-flex, none)",fontSize:"inherit",lineHeight:"inherit",minInlineSize:0,[e.focus.selector]:O({},e.focus.default,{zIndex:1})},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:active":(r=e.variants[`${t.variant}Active`])==null?void 0:r[t.color],[`.${Mh.root} > &`]:{"--unstable_ListItem-flex":"1 0 0%"},[`&.${_a.selected}`]:O({},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],{"--Icon-color":"currentColor"}),[`&:not(.${_a.selected}, [aria-selected="true"])`]:{"&:hover":(o=e.variants[`${t.variant}Hover`])==null?void 0:o[t.color],"&:active":(a=e.variants[`${t.variant}Active`])==null?void 0:a[t.color]},[`&.${_a.disabled}`]:O({},(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color])})});be(lc,{name:"JoyListItemButton",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>O({},!e.row&&{[`&.${_a.selected}`]:{fontWeight:t.vars.fontWeight.md}}));function tT(e){return it("MuiSvgIcon",e)}Xe("MuiSvgIcon",["root","colorInherit","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","fontSizeInherit","fontSizeXs","fontSizeSm","fontSizeMd","fontSizeLg","fontSizeXl","fontSizeXl2","fontSizeXl3","fontSizeXl4","sizeSm","sizeMd","sizeLg"]);const nT=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox","size","slots","slotProps"],rT=e=>{const{color:t,size:n,fontSize:r}=e,i={root:["root",t&&t!=="inherit"&&`color${ye(t)}`,n&&`size${ye(n)}`,r&&`fontSize${ye(r)}`]};return ut(i,tT,{})},jh={sm:"xl",md:"xl2",lg:"xl3"},iT=be("svg",{name:"JoySvgIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return O({},t.instanceSize&&{"--Icon-fontSize":e.vars.fontSize[jh[t.instanceSize]]},t.instanceFontSize&&t.instanceFontSize!=="inherit"&&{"--Icon-fontSize":e.vars.fontSize[t.instanceFontSize]},{userSelect:"none",margin:"var(--Icon-margin)",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,fontSize:`var(--Icon-fontSize, ${e.vars.fontSize[jh[t.size]]||"unset"})`},t.fontSize&&t.fontSize!=="inherit"&&{fontSize:`var(--Icon-fontSize, ${e.fontSize[t.fontSize]})`},!t.htmlColor&&O({color:`var(--Icon-color, ${e.vars.palette.text.icon})`},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&e.vars.palette[t.color]&&{color:`rgba(${(n=e.vars.palette[t.color])==null?void 0:n.mainChannel} / 1)`}))}),Uh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoySvgIcon"}),{children:i,className:o,color:a,component:s="svg",fontSize:l,htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24",size:p="md",slots:m={},slotProps:g={}}=r,v=Ae(r,nT),S=V.isValidElement(i)&&i.type==="svg",I=O({},r,{color:a,component:s,size:p,instanceSize:t.size,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:S}),x=rT(I),w=O({},v,{component:s,slots:m,slotProps:g}),[y,A]=Ie("root",{ref:n,className:Bn(x.root,o),elementType:iT,externalForwardedProps:w,ownerState:I,additionalProps:O({color:c,focusable:!1},f&&{role:"img"},!f&&{"aria-hidden":!0},!d&&{viewBox:h},S&&i.props)});return u.jsxs(y,O({},A,{children:[S?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});function cc(e,t){function n(r,i){return u.jsx(Uh,O({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Uh.muiName,V.memo(V.forwardRef(n))}const oT=cc(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");var Vh;const aT=["component","color","children","indicator","variant","slots","slotProps"],sT=e=>{const{disabled:t,expanded:n}=e;return ut({root:["root",t&&"disabled",n&&"expanded"],button:["button",t&&"disabled",n&&"expanded"],indicator:["indicator",t&&"disabled",n&&"expanded"]},Z1,{})},lT=be(ic,{name:"JoyAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({fontWeight:e.vars.fontWeight.md,gap:"calc(var(--ListItem-paddingX, 0.75rem) + 0.25rem)",[`&.${ka.expanded}`]:{"--Icon-color":"currentColor"}})),cT=be(lc,{name:"JoyAccordionSummary",slot:"Button",overridesResolver:(e,t)=>t.button})({gap:"inherit",fontWeight:"inherit",justifyContent:"space-between",font:"inherit","&:focus-visible":{zIndex:1},[`.${ka.root} &`]:{"--unstable_ListItem-flex":"1 0 0%"}}),uT=be("span",{name:"JoyAccordionSummary",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})({display:"inline-flex",[`&.${ka.expanded}`]:{transform:"rotate(180deg)"}}),dT=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyAccordionSummary"}),{component:i="div",color:o="neutral",children:a,indicator:s=Vh||(Vh=u.jsx(oT,{})),variant:l="plain",slots:c={},slotProps:d={}}=r,f=Ae(r,aT),{accordionId:h,disabled:p=!1,expanded:m=!1,toggle:g}=V.useContext(nc),v=O({},f,{component:i,slots:c,slotProps:d}),S=O({},r,{component:i,color:o,disabled:p,expanded:m,variant:l}),I=G=>{if(g&&g(G),typeof d.button=="function"){var F,T;(F=d.button(S))==null||(T=F.onClick)==null||T.call(F,G)}else{var j,Y;(j=d.button)==null||(Y=j.onClick)==null||Y.call(j,G)}},x=sT(S),[w,y]=Ie("root",{ref:n,className:x.root,elementType:lT,externalForwardedProps:v,ownerState:S}),[A,E]=Ie("button",{ref:n,className:x.button,elementType:cT,externalForwardedProps:v,additionalProps:{component:"button",id:`${h}-summary`,"aria-expanded":m?"true":"false","aria-controls":`${h}-details`,disabled:p,type:"button",onClick:I},ownerState:S}),[_,D]=Ie("indicator",{ref:n,className:x.indicator,elementType:uT,externalForwardedProps:v,ownerState:S});return u.jsx(w,O({},y,{children:u.jsxs(A,O({},E,{children:[a,s&&u.jsx(_,O({},D,{children:s}))]}))}))}),fT=({label:e,disabled:t,children:n})=>(t=t||!1,u.jsx(Y1,{variant:"outlined",transition:"0.2s",sx:{borderRadius:"md",overflow:"hidden",[`& .${ka.button}:hover`]:{backgroundColor:"#fff"},[`& .${yr.content}`]:{boxShadow:r=>`inset 0 1px ${r.vars.palette.divider}`,[`&.${yr.expanded}`]:{paddingBlock:"0.75rem"}},marginBottom:"8px",backgroundColor:"#fff"},children:u.jsxs(M1,{disabled:t,children:[u.jsx(dT,{children:e}),u.jsx(X1,{variant:"soft",children:n})]})})),uc={toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["blockquote","code-block"],[{direction:"rtl"}],[{script:"sub"},{script:"super"}],[{color:[]},{background:[]}],[{font:[]}],["link","image","video"],["clean"]]},dc=({label:e,property:t,value:n,defaultValue:r,placeholder:i,description:o,onChange:a})=>{const s=(l,c,d,f)=>{d!=="api"&&(f.getText().trim()===""?a(""):a(l))};return t==="description"?u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e}),u.jsx(yi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"})]}):t==="mini_games_explanation"?u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{color:"primary",children:e}),u.jsx(yi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i,className:"ql-container ql-toolbar"}),u.jsx(b.FormHelperText,{children:o})]}):u.jsx(b.Box,{sx:()=>({marginBottom:"16px"}),children:u.jsx(yi,{value:n||r,defaultValue:r,onChange:s,modules:uc,placeholder:i})})},hT=e=>{const t=n=>{n.persist(),e.onChange(n.target.value)};return u.jsxs(b.Tabs,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(b.TabList,{sx:{borderRadius:0},tabFlex:"auto",children:[u.jsx(b.Tab,{children:e.labels.richText}),u.jsx(b.Tab,{children:e.labels.plainText})]}),u.jsx(b.TabPanel,{value:0,sx:{px:0},children:u.jsx(dc,{label:"",placeholder:"",defaultValue:e.defaultValue,property:"ad_content",onChange:e.onChange})}),u.jsx(b.TabPanel,{value:1,sx:{px:0},children:u.jsx(b.Textarea,{defaultValue:e.defaultValue,minRows:"7",onChange:t,sx:{marginBottom:"16px",overflow:"auto",resize:"vertical"}})})]})},pT=({label:e,defaultValue:t,values:n,description:r,onChange:i})=>{const o=(a,s)=>{i(s||"")};return u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e}),u.jsx(b.Select,{defaultValue:t,onChange:o,children:n.map((a,s)=>u.jsx(b.Option,{value:a,children:a},`basic-select-${a}-${s}`))}),r?u.jsx(b.FormHelperText,{children:r}):u.jsx(u.Fragment,{})]})},fc=V.createContext("md");function gT(e){return it("MuiTabs",e)}Xe("MuiTabs",["root","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);const mT=["children","value","defaultValue","orientation","direction","component","onChange","selectionFollowsFocus","variant","color","size","slots","slotProps"],vT=e=>{const{orientation:t,variant:n,color:r,size:i}=e,o={root:["root",t,n&&`variant${ye(n)}`,r&&`color${ye(r)}`,i&&`size${ye(i)}`]};return ut(o,gT,{})},bT=be("div",{name:"JoyTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r;const i=(n=t.variants[e.variant])==null?void 0:n[e.color],{bgcolor:o,backgroundColor:a,background:s,p:l,padding:c}=ac({theme:t,ownerState:e},["bgcolor","backgroundColor","background","p","padding"]),d=tr(t,`palette.${o}`)||o||tr(t,`palette.${a}`)||a||s||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||t.vars.palette.background.surface;return O({},e.size==="sm"&&{"--Tabs-spacing":"0.75rem"},e.size==="md"&&{"--Tabs-spacing":"1rem"},e.size==="lg"&&{"--Tabs-spacing":"1.25rem"},{"--Tab-indicatorThickness":"2px","--Icon-color":e.color!=="neutral"||e.variant==="solid"?"currentColor":t.vars.palette.text.icon,"--TabList-stickyBackground":d==="transparent"?"initial":d,display:"flex",flexDirection:"column"},e.orientation==="vertical"&&{flexDirection:"row"},{backgroundColor:t.vars.palette.background.surface,position:"relative"},t.typography[`body-${e.size}`],(r=t.variants[e.variant])==null?void 0:r[e.color],l!==void 0&&{"--Tabs-padding":l},c!==void 0&&{"--Tabs-padding":c})}),Hh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTabs"}),{children:i,value:o,defaultValue:a,orientation:s="horizontal",direction:l="ltr",component:c,variant:d="plain",color:f="neutral",size:h="md",slots:p={},slotProps:m={}}=r,g=Ae(r,mT),v=a||(o===void 0?0:void 0),{contextValue:S}=FS(O({},r,{orientation:s,defaultValue:v})),I=O({},r,{orientation:s,direction:l,variant:d,color:f,size:h}),x=vT(I),w=O({},g,{component:c,slots:p,slotProps:m}),[y,A]=Ie("root",{ref:n,elementType:bT,externalForwardedProps:w,additionalProps:{ref:n,as:c},ownerState:I,className:x.root});return u.jsx(y,O({},A,{children:u.jsx(zS,{value:S,children:u.jsx(fc.Provider,{value:h,children:i})})}))});function yT(e){return it("MuiTabList",e)}Xe("MuiTabList",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","sizeSm","sizeMd","sizeLg"]);function xT(e){return it("MuiTab",e)}const hc=Xe("MuiTab",["root","disabled","focusVisible","selected","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]),CT=["component","children","variant","color","size","disableUnderline","underlinePlacement","tabFlex","sticky","slots","slotProps"],wT=e=>{const{orientation:t,size:n,variant:r,color:i}=e,o={root:["root",t,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return ut(o,yT,{})},IT=be(sc,{name:"JoyTabList",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;const r=(n=e.variants[t.variant])==null?void 0:n[t.color];return O({"--List-gap":"0px","--ListDivider-gap":"0px","--ListItem-paddingX":"var(--Tabs-spacing)","--ListItem-gap":"0.375rem","--unstable_TabList-hasUnderline":t.disableUnderline?"var(--unknown,)":"initial"},$1,{flexGrow:"initial",flexDirection:t.orientation==="vertical"?"column":"row",borderRadius:"var(--List-radius, 0px)",padding:"var(--List-padding, 0px)",zIndex:1},t.sticky&&{position:"sticky",top:t.sticky==="top"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",bottom:t.sticky==="bottom"?"calc(-1 * var(--Tabs-padding, 0px))":"initial",backgroundColor:(r==null?void 0:r.backgroundColor)||`var(--TabList-stickyBackground, ${e.vars.palette.background.body})`},!t.disableUnderline&&O({},t.underlinePlacement==="bottom"&&{"--unstable_TabList-underlineBottom":"1px",paddingBottom:1,boxShadow:`inset 0 -1px ${e.vars.palette.divider}`},t.underlinePlacement==="top"&&{"--unstable_TabList-underlineTop":"1px",paddingTop:1,boxShadow:`inset 0 1px ${e.vars.palette.divider}`},t.underlinePlacement==="right"&&{"--unstable_TabList-underlineRight":"1px",paddingRight:1,boxShadow:`inset -1px 0 ${e.vars.palette.divider}`},t.underlinePlacement==="left"&&{"--unstable_TabList-underlineLeft":"1px",paddingLeft:1,boxShadow:`inset 1px 0 ${e.vars.palette.divider}`}),t.tabFlex&&{[`& .${hc.root}`]:{flex:t.tabFlex}})}),Wh=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTabList"}),i=V.useContext(fc),{isRtl:o,orientation:a,getRootProps:s,contextValue:l}=HS({rootRef:n}),{component:c="div",children:d,variant:f="plain",color:h="neutral",size:p,disableUnderline:m=!1,underlinePlacement:g=a==="horizontal"?"bottom":"right",tabFlex:v,sticky:S,slots:I={},slotProps:x={}}=r,w=Ae(r,CT),y=p!=null?p:i,A=O({},r,{isRtl:o,orientation:a,variant:f,color:h,size:y,sticky:S,tabFlex:v,nesting:!1,disableUnderline:m,underlinePlacement:g}),E=wT(A),_=O({},w,{component:c,slots:I,slotProps:x}),[D,G]=Ie("root",{ref:n,elementType:IT,getSlotProps:s,externalForwardedProps:_,ownerState:A,className:E.root});return u.jsx(D,O({},G,{children:u.jsx(WS,{value:l,children:u.jsx(oc,{row:a==="horizontal",nested:!0,children:d})})}))}),ST=["action","children","value","disabled","onChange","onClick","onFocus","component","orientation","variant","color","disableIndicator","indicatorPlacement","indicatorInset","slots","slotProps"],AT=e=>{const{selected:t,disabled:n,focusVisible:r,variant:i,color:o,orientation:a}=e,s={root:["root",a,n&&"disabled",r&&"focusVisible",t&&"selected",i&&`variant${ye(i)}`,o&&`color${ye(o)}`]};return ut(s,xT,{})},TT=be(lc,{name:"JoyTab",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>[{flex:"initial",justifyContent:e.row?"center":"initial","--unstable_ListItemDecorator-alignItems":"center","--unstable_offset":"min(calc(-1 * var(--variant-borderWidth, 0px)), -1px)"},!e.disableIndicator&&{'&[aria-selected="true"]':{"--Tab-indicatorColor":"currentColor",zIndex:1},"&::after":{content:'""',display:"block",position:"absolute",margin:"auto",background:"var(--Tab-indicatorColor)",borderRadius:"var(--Tab-indicatorRadius)"}},!e.disableIndicator&&e.indicatorPlacement==="bottom"&&{paddingBottom:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",bottom:"calc(-1px - var(--unstable_TabList-underlineBottom, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="top"&&{paddingTop:"calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorThickness)",width:"var(--Tab-indicatorSize)",left:e.indicatorInset?"var(--ListItem-paddingLeft)":"var(--unstable_offset)",right:e.indicatorInset?"var(--ListItem-paddingRight)":"var(--unstable_offset)",top:"calc(-1px - var(--unstable_TabList-underlineTop, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="right"&&{paddingRight:"calc(var(--ListItem-paddingRight) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",right:"calc(-1px - var(--unstable_TabList-underlineRight, 0px))"}},!e.disableIndicator&&e.indicatorPlacement==="left"&&{paddingLeft:"calc(var(--ListItem-paddingLeft) + var(--Tab-indicatorThickness) - 1px)","&::after":{height:"var(--Tab-indicatorSize)",width:"var(--Tab-indicatorThickness)",top:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",bottom:e.indicatorInset?"var(--ListItem-paddingY)":"var(--unstable_offset)",left:"calc(-1px - var(--unstable_TabList-underlineLeft, 0px))"}}]),Hr=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTab"}),i=V.useContext(rc),{action:o,children:a,disabled:s=!1,component:l="button",orientation:c="horizontal",variant:d="plain",color:f="neutral",disableIndicator:h=!1,indicatorPlacement:p=i?"bottom":"right",indicatorInset:m=!1,slots:g={},slotProps:v={}}=r,S=Ae(r,ST),I=V.useRef(null),x=sn(I,n),{active:w,focusVisible:y,setFocusVisible:A,selected:E,getRootProps:_}=YS(O({},r,{rootRef:x}));V.useImperativeHandle(o,()=>({focusVisible:()=>{A(!0),I.current.focus()}}),[A]);const D=O({},r,{disableIndicator:h,indicatorPlacement:p,indicatorInset:m,orientation:c,row:i,active:w,focusVisible:y,disabled:s,selected:E,variant:d,color:f}),G=AT(D),F=O({},S,{component:l,slots:g,slotProps:v}),[T,j]=Ie("root",{ref:n,elementType:TT,getSlotProps:_,externalForwardedProps:F,ownerState:D,className:G.root});return u.jsx(eT.Provider,{value:c,children:u.jsx(T,O({},j,{children:a}))})});function zn(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 Gh(e){if(V.isValidElement(e)||qf.isValidElementType(e)||!zn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Gh(e[n])}),t}function Wt(e,t,n={clone:!0}){const r=n.clone?N({},e):e;return zn(e)&&zn(t)&&Object.keys(t).forEach(i=>{V.isValidElement(t[i])||qf.isValidElementType(t[i])?r[i]=t[i]:zn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&zn(e[i])?r[i]=Wt(e[i],t[i],n):n.clone?r[i]=zn(t[i])?Gh(t[i]):t[i]:r[i]=t[i]}),r}function xr(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Wr(e){if(typeof e!="string")throw new Error(xr(7));return e.charAt(0).toUpperCase()+e.slice(1)}function pc(e,t){const n=N({},t);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")n[i]=N(N({},e[i]),n[i]);else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)n[i]=o||{};else if(!o)n[i]=a;else{n[i]=N({},a);for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const l=s;n[i][l]=pc(o[l],a[l])}}}else n[i]===void 0&&(n[i]=e[i])}return n}function ET(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let a="",s=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,n&&n[c]&&(a+=" "+n[c]))}r[i]=a}return r}const Yh=e=>e,kT=(()=>{let e=Yh;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Yh}}})(),_T={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Kh(e,t,n="Mui"){const r=_T[t];return r?`${n}-${r}`:`${kT.generate(e)}-${t}`}function PT(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Kh(e,i,n)}),r}function DT(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ki(e,t){return t?Wt(e,t,{clone:!1}):e}function OT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var a,s;const o=/min-width:\s*([0-9.]+)/;return+(((a=r.match(o))==null?void 0:a[1])||0)-+(((s=i.match(o))==null?void 0:s[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},N({},t)):t}function RT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function LT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function MT(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=o=>(n(r,o),r);return n(i),q(N({},e),{containerQueries:i})}const Pa={xs:0,sm:600,md:900,lg:1200,xl:1536},Qh={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Pa[e]}px)`},BT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Pa[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function jn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Qh;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Qh;return Object.keys(t).reduce((a,s)=>{if(RT(o.keys,s)){const l=LT(r.containerQueries?r:BT,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(o.values||Pa).includes(s)){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function $T(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function NT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Da(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Oa(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Da(e,n)||r,t&&(i=t(i,r,e)),i}function ot(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=Da(l,r)||{};return jn(a,s,f=>{let h=Oa(c,i,f);return f===h&&typeof f=="string"&&(h=Oa(c,i,`${t}${f==="default"?"":Wr(f)}`,f)),n===!1?h:{[n]:h}})};return o.propTypes={},o.filterProps=[t],o}function FT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const zT={m:"margin",p:"padding"},jT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},qh={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},UT=FT(e=>{if(e.length>2)if(qh[e])e=qh[e];else return[e];const[t,n]=e.split(""),r=zT[t],i=jT[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),gc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],mc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...gc,...mc];function Qi(e,t,n,r){var o;const i=(o=Da(e,t,!0))!=null?o:n;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:typeof i=="string"?`calc(${a} * ${i})`:i*a:Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a),l=i[s];return a>=0?l:typeof l=="number"?-l:`-${l}`}:typeof i=="function"?i:()=>{}}function vc(e){return Qi(e,"spacing",8)}function qi(e,t){return typeof t=="string"||t==null?t:e(t)}function VT(e,t){return n=>e.reduce((r,i)=>(r[i]=qi(t,n),r),{})}function HT(e,t,n,r){if(!t.includes(n))return null;const i=UT(n),o=VT(i,r),a=e[n];return jn(e,a,o)}function Jh(e,t){const n=vc(e.theme);return Object.keys(e).map(r=>HT(e,t,r,n)).reduce(Ki,{})}function Ze(e){return Jh(e,gc)}Ze.propTypes={},Ze.filterProps=gc;function et(e){return Jh(e,mc)}et.propTypes={},et.filterProps=mc;function Ra(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ki(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function tn(e){return typeof e!="number"?e:`${e}px solid`}function nn(e,t){return ot({prop:e,themeKey:"borders",transform:t})}const WT=nn("border",tn),GT=nn("borderTop",tn),YT=nn("borderRight",tn),KT=nn("borderBottom",tn),QT=nn("borderLeft",tn),qT=nn("borderColor"),JT=nn("borderTopColor"),XT=nn("borderRightColor"),ZT=nn("borderBottomColor"),eE=nn("borderLeftColor"),tE=nn("outline",tn),nE=nn("outlineColor"),La=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Qi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:qi(t,r)});return jn(e,e.borderRadius,n)}return null};La.propTypes={},La.filterProps=["borderRadius"],Ra(WT,GT,YT,KT,QT,qT,JT,XT,ZT,eE,La,tE,nE);const Ma=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Qi(e.theme,"spacing",8),n=r=>({gap:qi(t,r)});return jn(e,e.gap,n)}return null};Ma.propTypes={},Ma.filterProps=["gap"];const Ba=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Qi(e.theme,"spacing",8),n=r=>({columnGap:qi(t,r)});return jn(e,e.columnGap,n)}return null};Ba.propTypes={},Ba.filterProps=["columnGap"];const $a=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Qi(e.theme,"spacing",8),n=r=>({rowGap:qi(t,r)});return jn(e,e.rowGap,n)}return null};$a.propTypes={},$a.filterProps=["rowGap"];const rE=ot({prop:"gridColumn"}),iE=ot({prop:"gridRow"}),oE=ot({prop:"gridAutoFlow"}),aE=ot({prop:"gridAutoColumns"}),sE=ot({prop:"gridAutoRows"}),lE=ot({prop:"gridTemplateColumns"}),cE=ot({prop:"gridTemplateRows"}),uE=ot({prop:"gridTemplateAreas"}),dE=ot({prop:"gridArea"});Ra(Ma,Ba,$a,rE,iE,oE,aE,sE,lE,cE,uE,dE);function Gr(e,t){return t==="grey"?t:e}const fE=ot({prop:"color",themeKey:"palette",transform:Gr}),hE=ot({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gr}),pE=ot({prop:"backgroundColor",themeKey:"palette",transform:Gr});Ra(fE,hE,pE);function Gt(e){return e<=1&&e!==0?`${e*100}%`:e}const gE=ot({prop:"width",transform:Gt}),bc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,a,s,l;const r=((a=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:a[n])||Pa[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Gt(n)}};return jn(e,e.maxWidth,t)}return null};bc.filterProps=["maxWidth"];const mE=ot({prop:"minWidth",transform:Gt}),vE=ot({prop:"height",transform:Gt}),bE=ot({prop:"maxHeight",transform:Gt}),yE=ot({prop:"minHeight",transform:Gt});ot({prop:"size",cssProperty:"width",transform:Gt}),ot({prop:"size",cssProperty:"height",transform:Gt});const xE=ot({prop:"boxSizing"});Ra(gE,bc,mE,vE,bE,yE,xE);const Na={border:{themeKey:"borders",transform:tn},borderTop:{themeKey:"borders",transform:tn},borderRight:{themeKey:"borders",transform:tn},borderBottom:{themeKey:"borders",transform:tn},borderLeft:{themeKey:"borders",transform:tn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:tn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:La},color:{themeKey:"palette",transform:Gr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gr},backgroundColor:{themeKey:"palette",transform:Gr},p:{style:et},pt:{style:et},pr:{style:et},pb:{style:et},pl:{style:et},px:{style:et},py:{style:et},padding:{style:et},paddingTop:{style:et},paddingRight:{style:et},paddingBottom:{style:et},paddingLeft:{style:et},paddingX:{style:et},paddingY:{style:et},paddingInline:{style:et},paddingInlineStart:{style:et},paddingInlineEnd:{style:et},paddingBlock:{style:et},paddingBlockStart:{style:et},paddingBlockEnd:{style:et},m:{style:Ze},mt:{style:Ze},mr:{style:Ze},mb:{style:Ze},ml:{style:Ze},mx:{style:Ze},my:{style:Ze},margin:{style:Ze},marginTop:{style:Ze},marginRight:{style:Ze},marginBottom:{style:Ze},marginLeft:{style:Ze},marginX:{style:Ze},marginY:{style:Ze},marginInline:{style:Ze},marginInlineStart:{style:Ze},marginInlineEnd:{style:Ze},marginBlock:{style:Ze},marginBlockStart:{style:Ze},marginBlockEnd:{style:Ze},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ma},rowGap:{style:$a},columnGap:{style:Ba},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Gt},maxWidth:{style:bc},minWidth:{transform:Gt},height:{transform:Gt},maxHeight:{transform:Gt},minHeight:{transform:Gt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function CE(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function wE(e,t){return typeof e=="function"?e(t):e}function IE(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:d,style:f}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Da(i,c)||{};return f?f(a):jn(a,r,m=>{let g=Oa(h,d,m);return m===g&&typeof m=="string"&&(g=Oa(h,d,`${n}${m==="default"?"":Wr(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){var s;const{sx:r,theme:i={}}=n||{};if(!r)return null;const o=(s=i.unstable_sxConfig)!=null?s:Na;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const d=$T(i.breakpoints),f=Object.keys(d);let h=d;return Object.keys(c).forEach(p=>{const m=wE(c[p],i);if(m!=null)if(typeof m=="object")if(o[p])h=Ki(h,e(p,m,i,o));else{const g=jn({theme:i},m,v=>({[p]:v}));CE(g,m)?h[p]=t({sx:m,theme:i}):h=Ki(h,g)}else h=Ki(h,e(p,m,i,o))}),OT(i,NT(f,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Yr=IE();Yr.filterProps=["sx"];function SE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var AE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},TE=!1,EE=/[A-Z]|^ms/g,kE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xh=function(t){return t.charCodeAt(1)===45},Zh=function(t){return t!=null&&typeof t!="boolean"},yc=KS(function(e){return Xh(e)?e:e.replace(EE,"-$&").toLowerCase()}),ep=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kE,function(r,i,o){return nr={name:i,styles:o,next:nr},i})}return AE[t]!==1&&!Xh(t)&&typeof n=="number"&&n!==0?n+"px":n},_E="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Fa(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return nr={name:i.name,styles:i.styles,next:nr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)nr={name:a.name,styles:a.styles,next:nr},a=a.next;var s=o.styles+";";return s}return PE(e,t,n)}}var l=n;return l}function PE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Fa(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;Zh(s)&&(r+=yc(o)+":"+ep(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&TE)throw new Error(_E);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var l=0;l<a.length;l++)Zh(a[l])&&(r+=yc(o)+":"+ep(o,a[l])+";");else{var c=Fa(e,t,a);switch(o){case"animation":case"animationName":{r+=yc(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}}return r}var tp=/label:\s*([^\s;{]+)\s*(;|$)/g,nr;function DE(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";nr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Fa(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Fa(n,t,e[s]),r){var l=o;i+=l[s]}tp.lastIndex=0;for(var c="",d;(d=tp.exec(i))!==null;)c+="-"+d[1];var f=SE(i)+c;return{name:f,styles:i,next:nr}}/**
|
|
2334
2334
|
* @mui/styled-engine v6.4.0
|
|
2335
2335
|
*
|
|
2336
2336
|
* @license MIT
|
|
2337
2337
|
* This source code is licensed under the MIT license found in the
|
|
2338
2338
|
* LICENSE file in the root directory of this source tree.
|
|
2339
|
-
*/function OE(e,t){return Mt(e,t)}function RE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const np=[];function rp(e){return np[0]=e,DE(np)}const LE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>Q(N({},n),{[r.key]:r.val}),{})};function ME(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=We(h,["values","unit","step"]),o=LE(t),a=Object.keys(o);function s(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):s(p)}function f(p){const m=a.indexOf(p);return m===0?s(a[1]):m===a.length-1?l(a[m]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return N({keys:a,values:o,up:s,down:l,between:c,only:d,not:f,unit:n},i)}const BE={borderRadius:4};function ip(e=8,t=vc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function $E(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function op(e={},...t){const d=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=d,a=We(d,["breakpoints","palette","spacing","shape"]),s=ME(n),l=ip(i);let c=Wt({breakpoints:s,direction:"ltr",components:{},palette:N({mode:"light"},r),spacing:l,shape:N(N({},BE),o)},a);return c=MT(c),c.applyStyles=$E,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=N(N({},Na),a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(h){return Yr({sx:h,theme:this})},c}function ap(e){const i=e,{variants:t}=i,n=We(i,["variants"]),r={variants:t,style:rp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=rp(o.style))}),r}const NE=op();function xc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function FE(e){return e?(t,n)=>n[e]:null}function zE(e,t,n){e.theme=VE(e.theme)?n:e.theme[t]||e.theme}function za(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>za(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=We(r,["variants"])}return sp(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function sp(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=Q(N(N({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==a.props[s])continue e;typeof a.style=="function"?(r!=null||(r=Q(N(N({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function jE(e={}){const{themeId:t,defaultTheme:n=NE,rootShouldForwardProp:r=xc,slotShouldForwardProp:i=xc}=e;function o(s){zE(s,t,n)}return(s,l={})=>{RE(s,A=>A.filter(E=>E!==Yr));const y=l,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=FE(WE(d))}=y,m=We(y,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),g=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let S=xc;d==="Root"||d==="root"?S=r:d?S=i:HE(s)&&(S=void 0);const I=OE(s,N({shouldForwardProp:S,label:UE()},m)),x=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(_){return za(_,A)};if(zn(A)){const E=ap(A);return E.variants?function(D){return za(D,E)}:E.style}return A},w=(...A)=>{const E=[],_=A.map(x),D=[];if(E.push(o),c&&p&&D.push(function(j){var B,W;const z=(W=(B=j.theme.components)==null?void 0:B[c])==null?void 0:W.styleOverrides;if(!z)return null;const $={};for(const q in z)$[q]=za(j,z[q]);return p(j,$)}),c&&!g&&D.push(function(j){var $,B;const Y=j.theme,z=(B=($=Y==null?void 0:Y.components)==null?void 0:$[c])==null?void 0:B.variants;return z?sp(j,z):null}),v||D.push(Yr),Array.isArray(_[0])){const T=_.shift(),j=new Array(E.length).fill(""),Y=new Array(D.length).fill("");let z;z=[...j,...T,...Y],z.raw=[...j,...T.raw,...Y],E.unshift(z)}const G=[...E,..._,...D],F=I(...G);return s.muiName&&(F.muiName=s.muiName),F};return I.withConfig&&(w.withConfig=I.withConfig),w}}function UE(e,t){return void 0}function VE(e){for(const t in e)return!1;return!0}function HE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function WE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Cc(e,t=0,n=1){return DT(e,t,n)}function GE(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function rr(e){if(e.type)return e;if(e.charAt(0)==="#")return rr(GE(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(xr(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(xr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const YE=e=>{const t=rr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Ji=(e,t)=>{try{return YE(e)}catch(n){return e}};function ja(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function lp(e){e=rr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),ja({type:s,values:l})}function wc(e){e=rr(e);let t=e.type==="hsl"||e.type==="hsla"?rr(lp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:bi((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function KE(e,t){const n=wc(e),r=wc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function qE(e,t){return e=rr(e),t=Cc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ja(e)}function Ua(e,t,n){try{return qE(e,t)}catch(r){return e}}function Ic(e,t){if(e=rr(e),t=Cc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ja(e)}function Ne(e,t,n){try{return Ic(e,t)}catch(r){return e}}function Sc(e,t){if(e=rr(e),t=Cc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ja(e)}function Fe(e,t,n){try{return Sc(e,t)}catch(r){return e}}function QE(e,t=.15){return wc(e)>.5?Ic(e,t):Sc(e,t)}function Va(e,t,n){try{return QE(e,t)}catch(r){return e}}const JE=V.createContext(void 0);function XE(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?pc(i.defaultProps,r):!i.styleOverrides&&!i.variants?pc(i,r):r}function ZE({props:e,name:t}){const n=V.useContext(JE);return XE({props:e,name:t,theme:{components:n}})}const cp={theme:void 0};function ek(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(cp.theme=i.theme,o=ap(e(cp)),t=o,n=i.theme),o}}function tk(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const up=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},nk=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},rk=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Ac(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return nk(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,f=rk(s,l);Object.assign(i,{[d]:f}),up(o,s,`var(${d})`,c),up(a,s,`var(${d}, ${f})`,c)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function ik(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,x=e,{colorSchemes:o={},components:a,defaultColorScheme:s="light"}=x,l=We(x,["colorSchemes","components","defaultColorScheme"]),{vars:c,css:d,varsWithDefaults:f}=Ac(l,t);let h=f;const p={},w=o,{[s]:m}=w,g=We(w,[$s(s)]);if(Object.entries(g||{}).forEach(([y,A])=>{const{vars:E,css:_,varsWithDefaults:D}=Ac(A,t);h=Wt(h,D),p[y]={css:_,vars:E}}),m){const{css:y,vars:A,varsWithDefaults:E}=Ac(m,t);h=Wt(h,E),p[s]={css:y,vars:A}}function v(y,A){var _,D;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),y){if(E==="media")return e.defaultColorScheme===y?":root":{[`@media (prefers-color-scheme: ${((D=(_=o[y])==null?void 0:_.palette)==null?void 0:D.mode)||y})`]:{":root":A}};if(E)return e.defaultColorScheme===y?`:root, ${E.replace("%s",String(y))}`:E.replace("%s",String(y))}return":root"}return{vars:h,generateThemeVars:()=>{let y=N({},c);return Object.entries(p).forEach(([,{vars:A}])=>{y=Wt(y,A)}),y},generateStyleSheets:()=>{var F,T;const y=[],A=e.defaultColorScheme||"light";function E(j,Y){Object.keys(Y).length&&y.push(typeof j=="string"?{[j]:N({},Y)}:j)}E(n(void 0,N({},d)),d);const G=p,{[A]:_}=G,D=We(G,[$s(A)]);if(_){const{css:j}=_,Y=(T=(F=o[A])==null?void 0:F.palette)==null?void 0:T.mode,z=N(!r&&Y?{colorScheme:Y}:{},j);E(n(A,N({},z)),z)}return Object.entries(D).forEach(([j,{css:Y}])=>{var B,W;const z=(W=(B=o[j])==null?void 0:B.palette)==null?void 0:W.mode,$=N(!r&&z?{colorScheme:z}:{},Y);E(n(j,N({},$)),$)}),y}}}function ok(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Xi={black:"#000",white:"#fff"},ak={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Kr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},qr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Zi={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Qr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Jr={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Xr={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function dp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Xi.white,default:Xi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const sk=dp();function fp(){return{text:{primary:Xi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Xi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const hp=fp();function pp(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Sc(e.main,i):t==="dark"&&(e.dark=Ic(e.main,o)))}function lk(e="light"){return e==="dark"?{main:Qr[200],light:Qr[50],dark:Qr[400]}:{main:Qr[700],light:Qr[400],dark:Qr[800]}}function ck(e="light"){return e==="dark"?{main:Kr[200],light:Kr[50],dark:Kr[400]}:{main:Kr[500],light:Kr[300],dark:Kr[700]}}function uk(e="light"){return e==="dark"?{main:qr[500],light:qr[300],dark:qr[700]}:{main:qr[700],light:qr[400],dark:qr[800]}}function dk(e="light"){return e==="dark"?{main:Jr[400],light:Jr[300],dark:Jr[700]}:{main:Jr[700],light:Jr[500],dark:Jr[900]}}function fk(e="light"){return e==="dark"?{main:Xr[400],light:Xr[300],dark:Xr[700]}:{main:Xr[800],light:Xr[500],dark:Xr[900]}}function hk(e="light"){return e==="dark"?{main:Zi[400],light:Zi[300],dark:Zi[700]}:{main:"#ed6c02",light:Zi[500],dark:Zi[900]}}function Tc(e){const g=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=g,i=We(g,["mode","contrastThreshold","tonalOffset"]),o=e.primary||lk(t),a=e.secondary||ck(t),s=e.error||uk(t),l=e.info||dk(t),c=e.success||fk(t),d=e.warning||hk(t);function f(v){return KE(v,hp.text.primary)>=n?hp.text.primary:sk.text.primary}const h=({color:v,name:S,mainShade:I=500,lightShade:x=300,darkShade:w=700})=>{if(v=N({},v),!v.main&&v[I]&&(v.main=v[I]),!v.hasOwnProperty("main"))throw new Error(xr(11,S?` (${S})`:"",I));if(typeof v.main!="string")throw new Error(xr(12,S?` (${S})`:"",JSON.stringify(v.main)));return pp(v,"light",x,r),pp(v,"dark",w,r),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=dp():t==="dark"&&(p=fp()),Wt(N({common:N({},Xi),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:ak,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function pk(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function gk(e,t){return N({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function mk(e){return Math.round(e*1e5)/1e5}const gp={textTransform:"uppercase"},mp='"Roboto", "Helvetica", "Arial", sans-serif';function vk(e,t){const v=typeof t=="function"?t(e):t,{fontFamily:n=mp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:d}=v,f=We(v,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,p=d||(S=>`${S/l*h}rem`),m=(S,I,x,w,y)=>N(N(N({fontFamily:n,fontWeight:S,fontSize:p(I),lineHeight:x},n===mp?{letterSpacing:`${mk(w/I)}em`}:{}),y),c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,gp),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,gp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(N({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:s},g),f,{clone:!1})}const bk=.2,yk=.14,xk=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${bk})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${yk})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${xk})`].join(",")}const Ck=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],wk={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ik={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function vp(e){return`${Math.round(e)}ms`}function Sk(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*bi(t,.25)+t/5)*10),3e3)}function Ak(e){const t=N(N({},wk),e.easing),n=N(N({},Ik),e.duration);return Q(N({getAutoHeightDuration:Sk,create:(i=["all"],o={})=>{const d=o,{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0}=d,c=We(d,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:vp(a)} ${s} ${typeof l=="string"?l:vp(l)}`).join(",")}},e),{easing:t,duration:n})}const Tk={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ek(e){return zn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function bp(e={}){const t=N({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,s]=i[o];!Ek(s)||a.startsWith("unstable_")?delete r[a]:zn(s)&&(r[a]=N({},s),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2339
|
+
*/function OE(e,t){return Mt(e,t)}function RE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const np=[];function rp(e){return np[0]=e,DE(np)}const LE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>q(N({},n),{[r.key]:r.val}),{})};function ME(e){const h=e,{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=h,i=We(h,["values","unit","step"]),o=LE(t),a=Object.keys(o);function s(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,m){const g=a.indexOf(m);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(g!==-1&&typeof t[a[g]]=="number"?t[a[g]]:m)-r/100}${n})`}function d(p){return a.indexOf(p)+1<a.length?c(p,a[a.indexOf(p)+1]):s(p)}function f(p){const m=a.indexOf(p);return m===0?s(a[1]):m===a.length-1?l(a[m]):c(p,a[a.indexOf(p)+1]).replace("@media","@media not all and")}return N({keys:a,values:o,up:s,down:l,between:c,only:d,not:f,unit:n},i)}const BE={borderRadius:4};function ip(e=8,t=vc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function $E(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function op(e={},...t){const d=e,{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=d,a=We(d,["breakpoints","palette","spacing","shape"]),s=ME(n),l=ip(i);let c=Wt({breakpoints:s,direction:"ltr",components:{},palette:N({mode:"light"},r),spacing:l,shape:N(N({},BE),o)},a);return c=MT(c),c.applyStyles=$E,c=t.reduce((f,h)=>Wt(f,h),c),c.unstable_sxConfig=N(N({},Na),a==null?void 0:a.unstable_sxConfig),c.unstable_sx=function(h){return Yr({sx:h,theme:this})},c}function ap(e){const i=e,{variants:t}=i,n=We(i,["variants"]),r={variants:t,style:rp(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=rp(o.style))}),r}const NE=op();function xc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function FE(e){return e?(t,n)=>n[e]:null}function zE(e,t,n){e.theme=VE(e.theme)?n:e.theme[t]||e.theme}function za(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>za(e,i));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=n.style;else{const r=n,{variants:o}=r;i=We(r,["variants"])}return sp(e,n.variants,[i])}return n!=null&&n.isProcessed?n.style:n}function sp(e,t,n=[]){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r!=null||(r=q(N(N({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(r))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&((i=e.ownerState)==null?void 0:i[s])!==a.props[s])continue e;typeof a.style=="function"?(r!=null||(r=q(N(N({},e),e.ownerState),{ownerState:e.ownerState})),n.push(a.style(r))):n.push(a.style)}return n}function jE(e={}){const{themeId:t,defaultTheme:n=NE,rootShouldForwardProp:r=xc,slotShouldForwardProp:i=xc}=e;function o(s){zE(s,t,n)}return(s,l={})=>{RE(s,A=>A.filter(E=>E!==Yr));const y=l,{name:c,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:p=FE(WE(d))}=y,m=We(y,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),g=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,v=h||!1;let S=xc;d==="Root"||d==="root"?S=r:d?S=i:HE(s)&&(S=void 0);const I=OE(s,N({shouldForwardProp:S,label:UE()},m)),x=A=>{if(typeof A=="function"&&A.__emotion_real!==A)return function(_){return za(_,A)};if(zn(A)){const E=ap(A);return E.variants?function(D){return za(D,E)}:E.style}return A},w=(...A)=>{const E=[],_=A.map(x),D=[];if(E.push(o),c&&p&&D.push(function(j){var B,W;const z=(W=(B=j.theme.components)==null?void 0:B[c])==null?void 0:W.styleOverrides;if(!z)return null;const $={};for(const Q in z)$[Q]=za(j,z[Q]);return p(j,$)}),c&&!g&&D.push(function(j){var $,B;const Y=j.theme,z=(B=($=Y==null?void 0:Y.components)==null?void 0:$[c])==null?void 0:B.variants;return z?sp(j,z):null}),v||D.push(Yr),Array.isArray(_[0])){const T=_.shift(),j=new Array(E.length).fill(""),Y=new Array(D.length).fill("");let z;z=[...j,...T,...Y],z.raw=[...j,...T.raw,...Y],E.unshift(z)}const G=[...E,..._,...D],F=I(...G);return s.muiName&&(F.muiName=s.muiName),F};return I.withConfig&&(w.withConfig=I.withConfig),w}}function UE(e,t){return void 0}function VE(e){for(const t in e)return!1;return!0}function HE(e){return typeof e=="string"&&e.charCodeAt(0)>96}function WE(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Cc(e,t=0,n=1){return DT(e,t,n)}function GE(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function rr(e){if(e.type)return e;if(e.charAt(0)==="#")return rr(GE(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(xr(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(xr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const YE=e=>{const t=rr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Ji=(e,t)=>{try{return YE(e)}catch(n){return e}};function ja(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function lp(e){e=rr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,d=(c+n/30)%12)=>i-o*Math.max(Math.min(d-3,9-d,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),ja({type:s,values:l})}function wc(e){e=rr(e);let t=e.type==="hsl"||e.type==="hsla"?rr(lp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:bi((n+.055)/1.055,2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function KE(e,t){const n=wc(e),r=wc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function QE(e,t){return e=rr(e),t=Cc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,ja(e)}function Ua(e,t,n){try{return QE(e,t)}catch(r){return e}}function Ic(e,t){if(e=rr(e),t=Cc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ja(e)}function Ne(e,t,n){try{return Ic(e,t)}catch(r){return e}}function Sc(e,t){if(e=rr(e),t=Cc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ja(e)}function Fe(e,t,n){try{return Sc(e,t)}catch(r){return e}}function qE(e,t=.15){return wc(e)>.5?Ic(e,t):Sc(e,t)}function Va(e,t,n){try{return qE(e,t)}catch(r){return e}}const JE=V.createContext(void 0);function XE(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?pc(i.defaultProps,r):!i.styleOverrides&&!i.variants?pc(i,r):r}function ZE({props:e,name:t}){const n=V.useContext(JE);return XE({props:e,name:t,theme:{components:n}})}const cp={theme:void 0};function ek(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(cp.theme=i.theme,o=ap(e(cp)),t=o,n=i.theme),o}}function tk(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const up=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},nk=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},rk=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Ac(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return nk(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const d=`--${n?`${n}-`:""}${s.join("-")}`,f=rk(s,l);Object.assign(i,{[d]:f}),up(o,s,`var(${d})`,c),up(a,s,`var(${d}, ${f})`,c)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function ik(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,x=e,{colorSchemes:o={},components:a,defaultColorScheme:s="light"}=x,l=We(x,["colorSchemes","components","defaultColorScheme"]),{vars:c,css:d,varsWithDefaults:f}=Ac(l,t);let h=f;const p={},w=o,{[s]:m}=w,g=We(w,[$s(s)]);if(Object.entries(g||{}).forEach(([y,A])=>{const{vars:E,css:_,varsWithDefaults:D}=Ac(A,t);h=Wt(h,D),p[y]={css:_,vars:E}}),m){const{css:y,vars:A,varsWithDefaults:E}=Ac(m,t);h=Wt(h,E),p[s]={css:y,vars:A}}function v(y,A){var _,D;let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),y){if(E==="media")return e.defaultColorScheme===y?":root":{[`@media (prefers-color-scheme: ${((D=(_=o[y])==null?void 0:_.palette)==null?void 0:D.mode)||y})`]:{":root":A}};if(E)return e.defaultColorScheme===y?`:root, ${E.replace("%s",String(y))}`:E.replace("%s",String(y))}return":root"}return{vars:h,generateThemeVars:()=>{let y=N({},c);return Object.entries(p).forEach(([,{vars:A}])=>{y=Wt(y,A)}),y},generateStyleSheets:()=>{var F,T;const y=[],A=e.defaultColorScheme||"light";function E(j,Y){Object.keys(Y).length&&y.push(typeof j=="string"?{[j]:N({},Y)}:j)}E(n(void 0,N({},d)),d);const G=p,{[A]:_}=G,D=We(G,[$s(A)]);if(_){const{css:j}=_,Y=(T=(F=o[A])==null?void 0:F.palette)==null?void 0:T.mode,z=N(!r&&Y?{colorScheme:Y}:{},j);E(n(A,N({},z)),z)}return Object.entries(D).forEach(([j,{css:Y}])=>{var B,W;const z=(W=(B=o[j])==null?void 0:B.palette)==null?void 0:W.mode,$=N(!r&&z?{colorScheme:z}:{},Y);E(n(j,N({},$)),$)}),y}}}function ok(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Xi={black:"#000",white:"#fff"},ak={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Kr={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Qr={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Zi={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},qr={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Jr={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Xr={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function dp(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Xi.white,default:Xi.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const sk=dp();function fp(){return{text:{primary:Xi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Xi.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const hp=fp();function pp(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Sc(e.main,i):t==="dark"&&(e.dark=Ic(e.main,o)))}function lk(e="light"){return e==="dark"?{main:qr[200],light:qr[50],dark:qr[400]}:{main:qr[700],light:qr[400],dark:qr[800]}}function ck(e="light"){return e==="dark"?{main:Kr[200],light:Kr[50],dark:Kr[400]}:{main:Kr[500],light:Kr[300],dark:Kr[700]}}function uk(e="light"){return e==="dark"?{main:Qr[500],light:Qr[300],dark:Qr[700]}:{main:Qr[700],light:Qr[400],dark:Qr[800]}}function dk(e="light"){return e==="dark"?{main:Jr[400],light:Jr[300],dark:Jr[700]}:{main:Jr[700],light:Jr[500],dark:Jr[900]}}function fk(e="light"){return e==="dark"?{main:Xr[400],light:Xr[300],dark:Xr[700]}:{main:Xr[800],light:Xr[500],dark:Xr[900]}}function hk(e="light"){return e==="dark"?{main:Zi[400],light:Zi[300],dark:Zi[700]}:{main:"#ed6c02",light:Zi[500],dark:Zi[900]}}function Tc(e){const g=e,{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=g,i=We(g,["mode","contrastThreshold","tonalOffset"]),o=e.primary||lk(t),a=e.secondary||ck(t),s=e.error||uk(t),l=e.info||dk(t),c=e.success||fk(t),d=e.warning||hk(t);function f(v){return KE(v,hp.text.primary)>=n?hp.text.primary:sk.text.primary}const h=({color:v,name:S,mainShade:I=500,lightShade:x=300,darkShade:w=700})=>{if(v=N({},v),!v.main&&v[I]&&(v.main=v[I]),!v.hasOwnProperty("main"))throw new Error(xr(11,S?` (${S})`:"",I));if(typeof v.main!="string")throw new Error(xr(12,S?` (${S})`:"",JSON.stringify(v.main)));return pp(v,"light",x,r),pp(v,"dark",w,r),v.contrastText||(v.contrastText=f(v.main)),v};let p;return t==="light"?p=dp():t==="dark"&&(p=fp()),Wt(N({common:N({},Xi),mode:t,primary:h({color:o,name:"primary"}),secondary:h({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:s,name:"error"}),warning:h({color:d,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:ak,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:r},p),i)}function pk(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function gk(e,t){return N({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}function mk(e){return Math.round(e*1e5)/1e5}const gp={textTransform:"uppercase"},mp='"Roboto", "Helvetica", "Arial", sans-serif';function vk(e,t){const v=typeof t=="function"?t(e):t,{fontFamily:n=mp,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:d}=v,f=We(v,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),h=r/14,p=d||(S=>`${S/l*h}rem`),m=(S,I,x,w,y)=>N(N(N({fontFamily:n,fontWeight:S,fontSize:p(I),lineHeight:x},n===mp?{letterSpacing:`${mk(w/I)}em`}:{}),y),c),g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(o,48,1.167,0),h4:m(o,34,1.235,.25),h5:m(o,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(o,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(o,16,1.5,.15),body2:m(o,14,1.43,.15),button:m(a,14,1.75,.4,gp),caption:m(o,12,1.66,.4),overline:m(o,12,2.66,1,gp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Wt(N({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:s},g),f,{clone:!1})}const bk=.2,yk=.14,xk=.12;function je(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${bk})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${yk})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${xk})`].join(",")}const Ck=["none",je(0,2,1,-1,0,1,1,0,0,1,3,0),je(0,3,1,-2,0,2,2,0,0,1,5,0),je(0,3,3,-2,0,3,4,0,0,1,8,0),je(0,2,4,-1,0,4,5,0,0,1,10,0),je(0,3,5,-1,0,5,8,0,0,1,14,0),je(0,3,5,-1,0,6,10,0,0,1,18,0),je(0,4,5,-2,0,7,10,1,0,2,16,1),je(0,5,5,-3,0,8,10,1,0,3,14,2),je(0,5,6,-3,0,9,12,1,0,3,16,2),je(0,6,6,-3,0,10,14,1,0,4,18,3),je(0,6,7,-4,0,11,15,1,0,4,20,3),je(0,7,8,-4,0,12,17,2,0,5,22,4),je(0,7,8,-4,0,13,19,2,0,5,24,4),je(0,7,9,-4,0,14,21,2,0,5,26,4),je(0,8,9,-5,0,15,22,2,0,6,28,5),je(0,8,10,-5,0,16,24,2,0,6,30,5),je(0,8,11,-5,0,17,26,2,0,6,32,5),je(0,9,11,-5,0,18,28,2,0,7,34,6),je(0,9,12,-6,0,19,29,2,0,7,36,6),je(0,10,13,-6,0,20,31,3,0,8,38,7),je(0,10,13,-6,0,21,33,3,0,8,40,7),je(0,10,14,-6,0,22,35,3,0,8,42,7),je(0,11,14,-7,0,23,36,3,0,9,44,8),je(0,11,15,-7,0,24,38,3,0,9,46,8)],wk={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ik={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function vp(e){return`${Math.round(e)}ms`}function Sk(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*bi(t,.25)+t/5)*10),3e3)}function Ak(e){const t=N(N({},wk),e.easing),n=N(N({},Ik),e.duration);return q(N({getAutoHeightDuration:Sk,create:(i=["all"],o={})=>{const d=o,{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0}=d,c=We(d,["duration","easing","delay"]);return(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof a=="string"?a:vp(a)} ${s} ${typeof l=="string"?l:vp(l)}`).join(",")}},e),{easing:t,duration:n})}const Tk={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ek(e){return zn(e)||typeof e=="undefined"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function bp(e={}){const t=N({},e);function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[a,s]=i[o];!Ek(s)||a.startsWith("unstable_")?delete r[a]:zn(s)&&(r[a]=N({},s),n(r[a]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
2340
2340
|
|
|
2341
2341
|
const theme = ${JSON.stringify(t,null,2)};
|
|
2342
2342
|
|
|
@@ -2344,10 +2344,10 @@ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
|
2344
2344
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
2345
2345
|
|
|
2346
2346
|
export default theme;`}function Ec(e={},...t){const p=e,{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:a={},typography:s={},shape:l}=p,c=We(p,["breakpoints","mixins","spacing","palette","transitions","typography","shape"]);if(e.vars)throw new Error(xr(20));const d=Tc(o),f=op(e);let h=Wt(f,{mixins:gk(f.breakpoints,r),palette:d,shadows:Ck.slice(),typography:vk(d,s),transitions:Ak(a),zIndex:N({},Tk)});return h=Wt(h,c),h=t.reduce((m,g)=>Wt(m,g),h),h.unstable_sxConfig=N(N({},Na),c==null?void 0:c.unstable_sxConfig),h.unstable_sx=function(g){return Yr({sx:g,theme:this})},h.toRuntimeSource=bp,h}function kk(e){let t;return e<1?t=5.11916*bi(e,2):t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const _k=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=kk(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function yp(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function xp(e){return e==="dark"?_k:[]}function Pk(e){const a=e,{palette:t={mode:"light"},opacity:n,overlays:r}=a,i=We(a,["palette","opacity","overlays"]),o=Tc(t);return N({palette:o,opacity:N(N({},yp(o.mode)),n),overlays:r||xp(o.mode)},i)}function Dk(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Ok=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Rk=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Ok(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:o?{[o.replace("%s",t)]:a,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:N(N({},n),a)}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function Lk(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Z(e,t,n){!e[t]&&n&&(e[t]=n)}function eo(e){return typeof e!="string"||!e.startsWith("hsl")?e:lp(e)}function Un(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Ji(eo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
2347
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Mk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const yn=e=>{try{return e()}catch(t){}},Bk=(e="mui")=>tk(e);function kc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Pk(Q(N({},t),{palette:N({mode:i},t==null?void 0:t.palette)}));return}const s=Ec(Q(N({},n),{palette:N({mode:i},t==null?void 0:t.palette)})),{palette:o}=s,a=We(s,["palette"]);return e[r]=Q(N({},t),{palette:o,opacity:N(N({},yp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||xp(i)}),a}function $k(e={},...t){const D=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Dk,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root"}=D,c=We(D,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=Bk(o),G=n,{[f]:p,light:m,dark:g}=G,v=We(G,[$s(f),"light","dark"]),S=N({},v);let I=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(I=!0),!I)throw new Error(xr(21,f));const x=kc(S,I,c,f);m&&!S.light&&kc(S,m,void 0,"light"),g&&!S.dark&&kc(S,g,void 0,"dark");let w=Q(N({defaultColorScheme:f},x),{cssVarPrefix:o,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:S,font:N(N({},pk(x.typography)),x.font),spacing:Mk(c.spacing)});Object.keys(w.colorSchemes).forEach(F=>{const T=w.colorSchemes[F].palette,j=Y=>{const z=Y.split("-"),$=z[1],B=z[2];return h(Y,T[$][B])};if(T.mode==="light"&&(Z(T.common,"background","#fff"),Z(T.common,"onBackground","#000")),T.mode==="dark"&&(Z(T.common,"background","#000"),Z(T.common,"onBackground","#fff")),Lk(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){Z(T.Alert,"errorColor",Ne(T.error.light,.6)),Z(T.Alert,"infoColor",Ne(T.info.light,.6)),Z(T.Alert,"successColor",Ne(T.success.light,.6)),Z(T.Alert,"warningColor",Ne(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",j("palette-error-main")),Z(T.Alert,"infoFilledBg",j("palette-info-main")),Z(T.Alert,"successFilledBg",j("palette-success-main")),Z(T.Alert,"warningFilledBg",j("palette-warning-main")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.main))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.main))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.main))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.main))),Z(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),Z(T.Alert,"successStandardBg",Fe(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),Z(T.Alert,"errorIconColor",j("palette-error-main")),Z(T.Alert,"infoIconColor",j("palette-info-main")),Z(T.Alert,"successIconColor",j("palette-success-main")),Z(T.Alert,"warningIconColor",j("palette-warning-main")),Z(T.AppBar,"defaultBg",j("palette-grey-100")),Z(T.Avatar,"defaultBg",j("palette-grey-400")),Z(T.Button,"inheritContainedBg",j("palette-grey-300")),Z(T.Button,"inheritContainedHoverBg",j("palette-grey-A100")),Z(T.Chip,"defaultBorder",j("palette-grey-400")),Z(T.Chip,"defaultAvatarColor",j("palette-grey-700")),Z(T.Chip,"defaultIconColor",j("palette-grey-700")),Z(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),Z(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),Z(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),Z(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),Z(T.LinearProgress,"successBg",Fe(T.success.main,.62)),Z(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),Z(T.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.11)`),Z(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),Z(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),Z(T.Slider,"errorTrack",Fe(T.error.main,.62)),Z(T.Slider,"infoTrack",Fe(T.info.main,.62)),Z(T.Slider,"successTrack",Fe(T.success.main,.62)),Z(T.Slider,"warningTrack",Fe(T.warning.main,.62));const Y=Va(T.background.default,.8);Z(T.SnackbarContent,"bg",Y),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(Y))),Z(T.SpeedDialAction,"fabHoverBg",Va(T.background.paper,.15)),Z(T.StepConnector,"border",j("palette-grey-400")),Z(T.StepContent,"border",j("palette-grey-400")),Z(T.Switch,"defaultColor",j("palette-common-white")),Z(T.Switch,"defaultDisabledColor",j("palette-grey-100")),Z(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),Z(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),Z(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),Z(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),Z(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),Z(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),Z(T.TableCell,"border",Fe(Ua(T.divider,1),.88)),Z(T.Tooltip,"bg",Ua(T.grey[700],.92))}if(T.mode==="dark"){Z(T.Alert,"errorColor",Fe(T.error.light,.6)),Z(T.Alert,"infoColor",Fe(T.info.light,.6)),Z(T.Alert,"successColor",Fe(T.success.light,.6)),Z(T.Alert,"warningColor",Fe(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",j("palette-error-dark")),Z(T.Alert,"infoFilledBg",j("palette-info-dark")),Z(T.Alert,"successFilledBg",j("palette-success-dark")),Z(T.Alert,"warningFilledBg",j("palette-warning-dark")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.dark))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.dark))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.dark))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.dark))),Z(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),Z(T.Alert,"successStandardBg",Ne(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),Z(T.Alert,"errorIconColor",j("palette-error-main")),Z(T.Alert,"infoIconColor",j("palette-info-main")),Z(T.Alert,"successIconColor",j("palette-success-main")),Z(T.Alert,"warningIconColor",j("palette-warning-main")),Z(T.AppBar,"defaultBg",j("palette-grey-900")),Z(T.AppBar,"darkBg",j("palette-background-paper")),Z(T.AppBar,"darkColor",j("palette-text-primary")),Z(T.Avatar,"defaultBg",j("palette-grey-600")),Z(T.Button,"inheritContainedBg",j("palette-grey-800")),Z(T.Button,"inheritContainedHoverBg",j("palette-grey-700")),Z(T.Chip,"defaultBorder",j("palette-grey-700")),Z(T.Chip,"defaultAvatarColor",j("palette-grey-300")),Z(T.Chip,"defaultIconColor",j("palette-grey-300")),Z(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),Z(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),Z(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),Z(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),Z(T.LinearProgress,"successBg",Ne(T.success.main,.5)),Z(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),Z(T.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.13)`),Z(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),Z(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),Z(T.Slider,"errorTrack",Ne(T.error.main,.5)),Z(T.Slider,"infoTrack",Ne(T.info.main,.5)),Z(T.Slider,"successTrack",Ne(T.success.main,.5)),Z(T.Slider,"warningTrack",Ne(T.warning.main,.5));const Y=Va(T.background.default,.98);Z(T.SnackbarContent,"bg",Y),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(Y))),Z(T.SpeedDialAction,"fabHoverBg",Va(T.background.paper,.15)),Z(T.StepConnector,"border",j("palette-grey-600")),Z(T.StepContent,"border",j("palette-grey-600")),Z(T.Switch,"defaultColor",j("palette-grey-300")),Z(T.Switch,"defaultDisabledColor",j("palette-grey-600")),Z(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),Z(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),Z(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),Z(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),Z(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),Z(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),Z(T.TableCell,"border",Ne(Ua(T.divider,1),.68)),Z(T.Tooltip,"bg",Ua(T.grey[700],.92))}Un(T.background,"default"),Un(T.background,"paper"),Un(T.common,"background"),Un(T.common,"onBackground"),Un(T,"divider"),Object.keys(T).forEach(Y=>{const z=T[Y];Y!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&Z(T[Y],"mainChannel",Ji(eo(z.main))),z.light&&Z(T[Y],"lightChannel",Ji(eo(z.light))),z.dark&&Z(T[Y],"darkChannel",Ji(eo(z.dark))),z.contrastText&&Z(T[Y],"contrastTextChannel",Ji(eo(z.contrastText))),Y==="text"&&(Un(T[Y],"primary"),Un(T[Y],"secondary")),Y==="action"&&(z.active&&Un(T[Y],"active"),z.selected&&Un(T[Y],"selected")))})}),w=t.reduce((F,T)=>Wt(F,T),w);const y={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Rk(w)},{vars:A,generateThemeVars:E,generateStyleSheets:_}=ik(w,y);return w.vars=A,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([F,T])=>{w[F]=T}),w.generateThemeVars=E,w.generateStyleSheets=_,w.generateSpacing=function(){return ip(c.spacing,vc(this))},w.getColorSchemeSelector=ok(s),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig=N(N({},Na),c==null?void 0:c.unstable_sxConfig),w.unstable_sx=function(T){return Yr({sx:T,theme:this})},w.toRuntimeSource=bp,w}function Cp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=Q(N({},n!==!0&&n),{palette:Tc(Q(N({},n===!0?{}:n.palette),{mode:t}))}))}function Nk(e={},...t){const d=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=d,a=We(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),s=o||"light",l=i==null?void 0:i[s],c=N(N({},i),n?{[s]:Q(N({},typeof l!="boolean"&&l),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Ec(e,...t);let f=n;"palette"in e||c[s]&&(c[s]!==!0?f=c[s].palette:s==="dark"&&(f={mode:"dark"}));const h=Ec(Q(N({},e),{palette:f}),...t);return h.defaultColorScheme=s,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=Q(N({},c.light!==!0&&c.light),{palette:h.palette}),Cp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=Q(N({},c.dark!==!0&&c.dark),{palette:h.palette}),Cp(h,"light",c.light)),h}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),$k(N(Q(N({},a),{colorSchemes:c,defaultColorScheme:s}),typeof r!="boolean"&&r),...t)}const Fk=Nk(),zk="$$material";function jk(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Uk=jE({themeId:zk,defaultTheme:Fk,rootShouldForwardProp:e=>jk(e)&&e!=="classes"}),Vk=ek;function Hk(e){return ZE(e)}function Wk(e){return Kh("MuiSvgIcon",e)}PT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Gk=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Wr(t)}`,`fontSize${Wr(n)}`]};return ET(i,Wk,r)},Yk=Uk("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Wr(n.color)}`],t[`fontSize${Wr(n.fontSize)}`]]}})(Vk(({theme:e})=>{var t,n,r,i,o,a,s,l,c,d,f,h,p,m,g,v,S,I;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(i=(r=((n=e.vars)!=null?n:e).transitions)==null?void 0:r.duration)==null?void 0:i.shorter}),variants:[{props:x=>!x.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,x])=>x&&x.main).map(([x])=>{var w,y,A;return{props:{color:x},style:{color:(A=(y=((w=e.vars)!=null?w:e).palette)==null?void 0:y[x])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(g=(m=((p=e.vars)!=null?p:e).palette)==null?void 0:m.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(I=(S=((v=e.vars)!=null?v:e).palette)==null?void 0:S.action)==null?void 0:I.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_c=V.forwardRef(function(t,n){const r=Hk({props:t,name:"MuiSvgIcon"}),I=r,{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=I,p=We(I,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=V.isValidElement(i)&&i.type==="svg",g=Q(N({},r),{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),v={};d||(v.viewBox=h);const S=Gk(g);return u.jsxs(Yk,Q(N(N(N({as:s,className:Bn(S.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});_c.muiName="SvgIcon";function Ue(e,t){function n(r,i){return u.jsx(_c,Q(N({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=_c.muiName,V.memo(V.forwardRef(n))}const Pc=Ue(u.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Kk=Ue(u.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),qk=Ue(u.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Qk(e){return it("MuiTabPanel",e)}Xe("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const Jk=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],Xk=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${ye(n)}`,o,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return ut(a,Qk,{})},Zk=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return O({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),Zr=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTabPanel"}),{orientation:i}=ma()||{orientation:"horizontal"},o=V.useContext(fc),{children:a,value:s=0,component:l,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,Jk),{hidden:v,getRootProps:S}=US(O({},r,{value:s})),I=f!=null?f:o,x=O({},r,{orientation:i,hidden:v,size:I,color:c,variant:d}),w=Xk(x),y=O({},g,{component:l,slots:h,slotProps:p}),[A,E]=Ie("root",{ref:n,elementType:Zk,getSlotProps:S,externalForwardedProps:y,additionalProps:{role:"tabpanel",ref:n,as:l},ownerState:x,className:w.root});return m?u.jsx(A,O({},E,{children:a})):u.jsx(A,O({},E,{children:!v&&a}))});function e_(e){return it("MuiInput",e)}const wp=Xe("MuiInput",["root","input","formControl","focused","disabled","error","adornedStart","adornedEnd","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid","fullWidth","startDecorator","endDecorator"]),Ha=V.createContext(void 0),t_=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","disabledInProp","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"];function n_(e,t){var n;const r=V.useContext(Ha),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:v,onChange:S,onKeyDown:I,onKeyUp:x,onFocus:w,onBlur:y,placeholder:A,readOnly:E,required:_,type:D,value:G}=e,F=Ae(e,t_),{getRootProps:T,getInputProps:j,focused:Y,error:z,disabled:$}=rS({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:y,onClick:v,onChange:S,onFocus:w,required:_!=null?_:r==null?void 0:r.required,value:G}),B={[t.disabled]:$,[t.error]:z,[t.focused]:Y,[t.formControl]:!!r,[c]:c},W={[t.disabled]:$};return O({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,disabled:$,id:m,onKeyDown:I,onKeyUp:x,name:g,placeholder:A,readOnly:E,type:D},rootStateClasses:B,inputStateClasses:W,getRootProps:T,getInputProps:j,focused:Y,error:z,disabled:$},F)}const Dc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,to="data-skip-inverted-colors",Ip=`& :not([${to}], [${to}] *)`,Sp=e=>{var t,n,r,i,o,a,s,l,c,d,f,h,p,m,g,v,S,I,x,w,y,A;const E=Dc(e.cssVarPrefix);return{"--variant-plainColor":"var(--variant-plainColor) !important","--variant-plainHoverColor":"var(--variant-plainHoverColor) !important","--variant-plainHoverBg":"var(--variant-plainHoverBg) !important","--variant-plainActiveBg":"var(--variant-plainActiveBg) !important","--variant-plainDisabledColor":"var(--variant-plainDisabledColor) !important","--variant-outlinedColor":"var(--variant-outlinedColor) !important","--variant-outlinedBorder":"var(--variant-outlinedBorder) !important","--variant-outlinedHoverColor":"var(--variant-outlinedHoverColor) !important","--variant-outlinedHoverBorder":"var(--variant-outlinedHoverBorder) !important","--variant-outlinedHoverBg":"var(--variant-outlinedHoverBg) !important","--variant-outlinedActiveBg":"var(--variant-outlinedActiveBg) !important","--variant-outlinedDisabledColor":"var(--variant-outlinedDisabledColor) !important","--variant-outlinedDisabledBorder":"var(--variant-outlinedDisabledBorder) !important","--variant-softColor":"var(--variant-softColor) !important","--variant-softHoverColor":"var(--variant-softHoverColor) !important","--variant-softBg":"var(--variant-softBg) !important","--variant-softHoverBg":"var(--variant-softHoverBg) !important","--variant-softActiveBg":"var(--variant-softActiveBg) !important","--variant-softActiveColor":"var(--variant-softActiveColor) !important","--variant-softDisabledColor":"var(--variant-softDisabledColor) !important","--variant-softDisabledBg":"var(--variant-softDisabledBg) !important","--variant-solidColor":"var(--variant-solidColor) !important","--variant-solidBg":"var(--variant-solidBg) !important","--variant-solidHoverBg":"var(--variant-solidHoverBg) !important","--variant-solidActiveBg":"var(--variant-solidActiveBg) !important","--variant-solidDisabledColor":"var(--variant-solidDisabledColor) !important","--variant-solidDisabledBg":"var(--variant-solidDisabledBg) !important","--Badge-ringColor":"var(--Badge-ringColor) !important",colorScheme:"unset",[e.getColorSchemeSelector("light")]:{[E("--palette-focusVisible")]:`${(t=e.colorSchemes.light)==null?void 0:t.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(n=e.colorSchemes.light)==null?void 0:n.palette.background.body} !important`,[E("--palette-background-surface")]:`${(r=e.colorSchemes.light)==null?void 0:r.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(i=e.colorSchemes.light)==null?void 0:i.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(o=e.colorSchemes.light)==null?void 0:o.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(a=e.colorSchemes.light)==null?void 0:a.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.background.body} !important`,[E("--palette-background-surface")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function r_(e){return e.theme!==void 0}const i_=e=>t=>{const n=r_(t)?t.theme:t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-solidBg`),"--Icon-color":"currentColor",[`${n.getColorSchemeSelector("light")}, ${n.getColorSchemeSelector("dark")}`]:{colorScheme:"dark",[i("--palette-focusVisible")]:o(`palette-${e}-200`),[i("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[i("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[i("--palette-background-popup")]:o(`palette-${e}-700`),[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.36)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.6)`,[i("--palette-text-primary")]:o("palette-common-white"),[i("--palette-text-secondary")]:o(`palette-${e}-200`),[i("--palette-text-tertiary")]:o(`palette-${e}-300`),[i("--palette-text-icon")]:o(`palette-${e}-200`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":o(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":o(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${o(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":o("palette-common-white"),"--variant-softHoverColor":o("palette-common-white"),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softActiveColor":"#fff","--variant-softDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":o(`palette-${e}-${e==="neutral"?"600":"500"}`),"--variant-solidBg":o("palette-common-white"),"--variant-solidHoverBg":o("palette-common-white"),"--variant-solidActiveBg":o(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`}},[`&, & [${to}]`]:Sp(n)}},o_=e=>t=>{const{theme:n=t}=t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-softBg`),"--Icon-color":"currentColor",[n.getColorSchemeSelector("dark")]:{[i("--palette-focusVisible")]:o(`palette-${e}-300`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,[i("--palette-text-primary")]:o(`palette-${e}-100`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-text-icon")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-plainHoverColor":o(`palette-${e}-50`),"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":o(`palette-${e}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":o(`palette-${e}-600`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,"--variant-softColor":o(`palette-${e}-200`),"--variant-softBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":o(`palette-${e}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`},[n.getColorSchemeSelector("light")]:{[i("--palette-focusVisible")]:o(`palette-${e}-500`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,[i("--palette-text-primary")]:o(`palette-${e}-700`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.68)`,[i("--palette-text-icon")]:o(`palette-${e}-500`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${o(`palette-${e}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":o(`palette-${e}-600`),"--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-softColor":o(`palette-${e}-600`),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":o(`palette-${e}-700`),"--variant-softHoverBg":o(`palette-${e}-200`),"--variant-softActiveBg":o(`palette-${e}-300`),"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,"--variant-solidColor":o("palette-common-white"),"--variant-solidBg":o(`palette-${e}-${e==="neutral"?"700":"500"}`),"--variant-solidHoverColor":o("palette-common-white"),"--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`}},[`&, & [${to}]`]:Sp(n)}},a_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],s_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${ye(r)}`,i&&`color${ye(i)}`,o&&`size${ye(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ut(a,e_,{})},l_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;const l=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[O({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${to}])`]:O({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],l,{backgroundColor:(o=l==null?void 0:l.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":O({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${wp.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),c_=be("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":O({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),u_=be("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),d_=be("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),f_=be(l_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),h_=be(c_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),p_=be(u_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),g_=be(d_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Wa=V.forwardRef(function(t,n){var r,i,o,a,s,l;const c=dt({props:t,name:"JoyInput"}),d=n_(O({},c,{disabledInProp:t.disabled}),wp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:v,focused:S,error:I=!1,disabled:x,fullWidth:w=!1,size:y="md",color:A="neutral",variant:E="outlined",startDecorator:_,endDecorator:D,component:G,slots:F={},slotProps:T={}}=d,j=Ae(d,a_),Y=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:I,z=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:y,$=(s=t.color)!=null?s:Y?"danger":(l=v==null?void 0:v.color)!=null?l:A,B=O({instanceColor:Y?"danger":t.color},c,{fullWidth:w,color:$,disabled:x,error:Y,focused:S,size:z,variant:E}),W=s_(B),q=O({},j,{component:G,slots:F,slotProps:T}),[ee,R]=Ie("root",{ref:n,className:[W.root,h],elementType:f_,getSlotProps:m,externalForwardedProps:q,ownerState:B}),[M,U]=Ie("input",O({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[W.input,p],elementType:h_,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:q,ownerState:B})),[H,ne]=Ie("startDecorator",{className:W.startDecorator,elementType:p_,externalForwardedProps:q,ownerState:B}),[se,ae]=Ie("endDecorator",{className:W.endDecorator,elementType:g_,externalForwardedProps:q,ownerState:B});return u.jsxs(ee,O({},R,{children:[_&&u.jsx(H,O({},ne,{children:_})),u.jsx(M,O({},U)),D&&u.jsx(se,O({},ae,{children:D}))]}))}),xn=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:s=void 0,onChange:l})=>u.jsxs(b.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Wa,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:s,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Ap=Ue(u.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function m_(e){return it("MuiCircularProgress",e)}Xe("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let v_=e=>e,Tp;const b_=["color","backgroundColor"],y_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],x_=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),C_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${ye(n)}`,r&&`variant${ye(r)}`,i&&`size${ye(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return ut(o,m_,{})};function ei(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const w_=be("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:s,backgroundColor:l}=a,c=Ae(a,b_);return O({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":l,"--CircularProgress-progressColor":s,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ei("track","3px"),"--_progress-thickness":ei("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ei("track","6px"),"--_progress-thickness":ei("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ei("track","8px"),"--_progress-thickness":ei("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},e.instanceSize==="lg"&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:s},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},c,e.variant==="outlined"&&{"&::before":O({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},c)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),I_=be("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),S_=be("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),A_=be("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&pe.css(Tp||(Tp=v_`
|
|
2347
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Mk(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const yn=e=>{try{return e()}catch(t){}},Bk=(e="mui")=>tk(e);function kc(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Pk(q(N({},t),{palette:N({mode:i},t==null?void 0:t.palette)}));return}const s=Ec(q(N({},n),{palette:N({mode:i},t==null?void 0:t.palette)})),{palette:o}=s,a=We(s,["palette"]);return e[r]=q(N({},t),{palette:o,opacity:N(N({},yp(i)),t==null?void 0:t.opacity),overlays:(t==null?void 0:t.overlays)||xp(i)}),a}function $k(e={},...t){const D=e,{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:a=Dk,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root"}=D,c=We(D,["colorSchemes","defaultColorScheme","disableCssColorScheme","cssVarPrefix","shouldSkipGeneratingVar","colorSchemeSelector","rootSelector"]),d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),h=Bk(o),G=n,{[f]:p,light:m,dark:g}=G,v=We(G,[$s(f),"light","dark"]),S=N({},v);let I=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(I=!0),!I)throw new Error(xr(21,f));const x=kc(S,I,c,f);m&&!S.light&&kc(S,m,void 0,"light"),g&&!S.dark&&kc(S,g,void 0,"dark");let w=q(N({defaultColorScheme:f},x),{cssVarPrefix:o,colorSchemeSelector:s,rootSelector:l,getCssVar:h,colorSchemes:S,font:N(N({},pk(x.typography)),x.font),spacing:Mk(c.spacing)});Object.keys(w.colorSchemes).forEach(F=>{const T=w.colorSchemes[F].palette,j=Y=>{const z=Y.split("-"),$=z[1],B=z[2];return h(Y,T[$][B])};if(T.mode==="light"&&(Z(T.common,"background","#fff"),Z(T.common,"onBackground","#000")),T.mode==="dark"&&(Z(T.common,"background","#000"),Z(T.common,"onBackground","#fff")),Lk(T,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),T.mode==="light"){Z(T.Alert,"errorColor",Ne(T.error.light,.6)),Z(T.Alert,"infoColor",Ne(T.info.light,.6)),Z(T.Alert,"successColor",Ne(T.success.light,.6)),Z(T.Alert,"warningColor",Ne(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",j("palette-error-main")),Z(T.Alert,"infoFilledBg",j("palette-info-main")),Z(T.Alert,"successFilledBg",j("palette-success-main")),Z(T.Alert,"warningFilledBg",j("palette-warning-main")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.main))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.main))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.main))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.main))),Z(T.Alert,"errorStandardBg",Fe(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Fe(T.info.light,.9)),Z(T.Alert,"successStandardBg",Fe(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Fe(T.warning.light,.9)),Z(T.Alert,"errorIconColor",j("palette-error-main")),Z(T.Alert,"infoIconColor",j("palette-info-main")),Z(T.Alert,"successIconColor",j("palette-success-main")),Z(T.Alert,"warningIconColor",j("palette-warning-main")),Z(T.AppBar,"defaultBg",j("palette-grey-100")),Z(T.Avatar,"defaultBg",j("palette-grey-400")),Z(T.Button,"inheritContainedBg",j("palette-grey-300")),Z(T.Button,"inheritContainedHoverBg",j("palette-grey-A100")),Z(T.Chip,"defaultBorder",j("palette-grey-400")),Z(T.Chip,"defaultAvatarColor",j("palette-grey-700")),Z(T.Chip,"defaultIconColor",j("palette-grey-700")),Z(T.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Z(T.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Z(T.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Z(T.LinearProgress,"primaryBg",Fe(T.primary.main,.62)),Z(T.LinearProgress,"secondaryBg",Fe(T.secondary.main,.62)),Z(T.LinearProgress,"errorBg",Fe(T.error.main,.62)),Z(T.LinearProgress,"infoBg",Fe(T.info.main,.62)),Z(T.LinearProgress,"successBg",Fe(T.success.main,.62)),Z(T.LinearProgress,"warningBg",Fe(T.warning.main,.62)),Z(T.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.11)`),Z(T.Slider,"primaryTrack",Fe(T.primary.main,.62)),Z(T.Slider,"secondaryTrack",Fe(T.secondary.main,.62)),Z(T.Slider,"errorTrack",Fe(T.error.main,.62)),Z(T.Slider,"infoTrack",Fe(T.info.main,.62)),Z(T.Slider,"successTrack",Fe(T.success.main,.62)),Z(T.Slider,"warningTrack",Fe(T.warning.main,.62));const Y=Va(T.background.default,.8);Z(T.SnackbarContent,"bg",Y),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(Y))),Z(T.SpeedDialAction,"fabHoverBg",Va(T.background.paper,.15)),Z(T.StepConnector,"border",j("palette-grey-400")),Z(T.StepContent,"border",j("palette-grey-400")),Z(T.Switch,"defaultColor",j("palette-common-white")),Z(T.Switch,"defaultDisabledColor",j("palette-grey-100")),Z(T.Switch,"primaryDisabledColor",Fe(T.primary.main,.62)),Z(T.Switch,"secondaryDisabledColor",Fe(T.secondary.main,.62)),Z(T.Switch,"errorDisabledColor",Fe(T.error.main,.62)),Z(T.Switch,"infoDisabledColor",Fe(T.info.main,.62)),Z(T.Switch,"successDisabledColor",Fe(T.success.main,.62)),Z(T.Switch,"warningDisabledColor",Fe(T.warning.main,.62)),Z(T.TableCell,"border",Fe(Ua(T.divider,1),.88)),Z(T.Tooltip,"bg",Ua(T.grey[700],.92))}if(T.mode==="dark"){Z(T.Alert,"errorColor",Fe(T.error.light,.6)),Z(T.Alert,"infoColor",Fe(T.info.light,.6)),Z(T.Alert,"successColor",Fe(T.success.light,.6)),Z(T.Alert,"warningColor",Fe(T.warning.light,.6)),Z(T.Alert,"errorFilledBg",j("palette-error-dark")),Z(T.Alert,"infoFilledBg",j("palette-info-dark")),Z(T.Alert,"successFilledBg",j("palette-success-dark")),Z(T.Alert,"warningFilledBg",j("palette-warning-dark")),Z(T.Alert,"errorFilledColor",yn(()=>T.getContrastText(T.error.dark))),Z(T.Alert,"infoFilledColor",yn(()=>T.getContrastText(T.info.dark))),Z(T.Alert,"successFilledColor",yn(()=>T.getContrastText(T.success.dark))),Z(T.Alert,"warningFilledColor",yn(()=>T.getContrastText(T.warning.dark))),Z(T.Alert,"errorStandardBg",Ne(T.error.light,.9)),Z(T.Alert,"infoStandardBg",Ne(T.info.light,.9)),Z(T.Alert,"successStandardBg",Ne(T.success.light,.9)),Z(T.Alert,"warningStandardBg",Ne(T.warning.light,.9)),Z(T.Alert,"errorIconColor",j("palette-error-main")),Z(T.Alert,"infoIconColor",j("palette-info-main")),Z(T.Alert,"successIconColor",j("palette-success-main")),Z(T.Alert,"warningIconColor",j("palette-warning-main")),Z(T.AppBar,"defaultBg",j("palette-grey-900")),Z(T.AppBar,"darkBg",j("palette-background-paper")),Z(T.AppBar,"darkColor",j("palette-text-primary")),Z(T.Avatar,"defaultBg",j("palette-grey-600")),Z(T.Button,"inheritContainedBg",j("palette-grey-800")),Z(T.Button,"inheritContainedHoverBg",j("palette-grey-700")),Z(T.Chip,"defaultBorder",j("palette-grey-700")),Z(T.Chip,"defaultAvatarColor",j("palette-grey-300")),Z(T.Chip,"defaultIconColor",j("palette-grey-300")),Z(T.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Z(T.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Z(T.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Z(T.LinearProgress,"primaryBg",Ne(T.primary.main,.5)),Z(T.LinearProgress,"secondaryBg",Ne(T.secondary.main,.5)),Z(T.LinearProgress,"errorBg",Ne(T.error.main,.5)),Z(T.LinearProgress,"infoBg",Ne(T.info.main,.5)),Z(T.LinearProgress,"successBg",Ne(T.success.main,.5)),Z(T.LinearProgress,"warningBg",Ne(T.warning.main,.5)),Z(T.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.13)`),Z(T.Slider,"primaryTrack",Ne(T.primary.main,.5)),Z(T.Slider,"secondaryTrack",Ne(T.secondary.main,.5)),Z(T.Slider,"errorTrack",Ne(T.error.main,.5)),Z(T.Slider,"infoTrack",Ne(T.info.main,.5)),Z(T.Slider,"successTrack",Ne(T.success.main,.5)),Z(T.Slider,"warningTrack",Ne(T.warning.main,.5));const Y=Va(T.background.default,.98);Z(T.SnackbarContent,"bg",Y),Z(T.SnackbarContent,"color",yn(()=>T.getContrastText(Y))),Z(T.SpeedDialAction,"fabHoverBg",Va(T.background.paper,.15)),Z(T.StepConnector,"border",j("palette-grey-600")),Z(T.StepContent,"border",j("palette-grey-600")),Z(T.Switch,"defaultColor",j("palette-grey-300")),Z(T.Switch,"defaultDisabledColor",j("palette-grey-600")),Z(T.Switch,"primaryDisabledColor",Ne(T.primary.main,.55)),Z(T.Switch,"secondaryDisabledColor",Ne(T.secondary.main,.55)),Z(T.Switch,"errorDisabledColor",Ne(T.error.main,.55)),Z(T.Switch,"infoDisabledColor",Ne(T.info.main,.55)),Z(T.Switch,"successDisabledColor",Ne(T.success.main,.55)),Z(T.Switch,"warningDisabledColor",Ne(T.warning.main,.55)),Z(T.TableCell,"border",Ne(Ua(T.divider,1),.68)),Z(T.Tooltip,"bg",Ua(T.grey[700],.92))}Un(T.background,"default"),Un(T.background,"paper"),Un(T.common,"background"),Un(T.common,"onBackground"),Un(T,"divider"),Object.keys(T).forEach(Y=>{const z=T[Y];Y!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&Z(T[Y],"mainChannel",Ji(eo(z.main))),z.light&&Z(T[Y],"lightChannel",Ji(eo(z.light))),z.dark&&Z(T[Y],"darkChannel",Ji(eo(z.dark))),z.contrastText&&Z(T[Y],"contrastTextChannel",Ji(eo(z.contrastText))),Y==="text"&&(Un(T[Y],"primary"),Un(T[Y],"secondary")),Y==="action"&&(z.active&&Un(T[Y],"active"),z.selected&&Un(T[Y],"selected")))})}),w=t.reduce((F,T)=>Wt(F,T),w);const y={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:Rk(w)},{vars:A,generateThemeVars:E,generateStyleSheets:_}=ik(w,y);return w.vars=A,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([F,T])=>{w[F]=T}),w.generateThemeVars=E,w.generateStyleSheets=_,w.generateSpacing=function(){return ip(c.spacing,vc(this))},w.getColorSchemeSelector=ok(s),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig=N(N({},Na),c==null?void 0:c.unstable_sxConfig),w.unstable_sx=function(T){return Yr({sx:T,theme:this})},w.toRuntimeSource=bp,w}function Cp(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]=q(N({},n!==!0&&n),{palette:Tc(q(N({},n===!0?{}:n.palette),{mode:t}))}))}function Nk(e={},...t){const d=e,{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode}=d,a=We(d,["palette","cssVariables","colorSchemes","defaultColorScheme"]),s=o||"light",l=i==null?void 0:i[s],c=N(N({},i),n?{[s]:q(N({},typeof l!="boolean"&&l),{palette:n})}:void 0);if(r===!1){if(!("colorSchemes"in e))return Ec(e,...t);let f=n;"palette"in e||c[s]&&(c[s]!==!0?f=c[s].palette:s==="dark"&&(f={mode:"dark"}));const h=Ec(q(N({},e),{palette:f}),...t);return h.defaultColorScheme=s,h.colorSchemes=c,h.palette.mode==="light"&&(h.colorSchemes.light=q(N({},c.light!==!0&&c.light),{palette:h.palette}),Cp(h,"dark",c.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark=q(N({},c.dark!==!0&&c.dark),{palette:h.palette}),Cp(h,"light",c.light)),h}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),$k(N(q(N({},a),{colorSchemes:c,defaultColorScheme:s}),typeof r!="boolean"&&r),...t)}const Fk=Nk(),zk="$$material";function jk(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Uk=jE({themeId:zk,defaultTheme:Fk,rootShouldForwardProp:e=>jk(e)&&e!=="classes"}),Vk=ek;function Hk(e){return ZE(e)}function Wk(e){return Kh("MuiSvgIcon",e)}PT("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Gk=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Wr(t)}`,`fontSize${Wr(n)}`]};return ET(i,Wk,r)},Yk=Uk("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Wr(n.color)}`],t[`fontSize${Wr(n.fontSize)}`]]}})(Vk(({theme:e})=>{var t,n,r,i,o,a,s,l,c,d,f,h,p,m,g,v,S,I;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(i=(r=((n=e.vars)!=null?n:e).transitions)==null?void 0:r.duration)==null?void 0:i.shorter}),variants:[{props:x=>!x.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries(((h=e.vars)!=null?h:e).palette).filter(([,x])=>x&&x.main).map(([x])=>{var w,y,A;return{props:{color:x},style:{color:(A=(y=((w=e.vars)!=null?w:e).palette)==null?void 0:y[x])==null?void 0:A.main}}}),{props:{color:"action"},style:{color:(g=(m=((p=e.vars)!=null?p:e).palette)==null?void 0:m.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(I=(S=((v=e.vars)!=null?v:e).palette)==null?void 0:S.action)==null?void 0:I.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_c=V.forwardRef(function(t,n){const r=Hk({props:t,name:"MuiSvgIcon"}),I=r,{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:d=!1,titleAccess:f,viewBox:h="0 0 24 24"}=I,p=We(I,["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"]),m=V.isValidElement(i)&&i.type==="svg",g=q(N({},r),{color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:d,viewBox:h,hasSvgAsChild:m}),v={};d||(v.viewBox=h);const S=Gk(g);return u.jsxs(Yk,q(N(N(N({as:s,className:Bn(S.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n},v),p),m&&i.props),{ownerState:g,children:[m?i.props.children:i,f?u.jsx("title",{children:f}):null]}))});_c.muiName="SvgIcon";function Ue(e,t){function n(r,i){return u.jsx(_c,q(N({"data-testid":`${t}Icon`,ref:i},r),{children:e}))}return n.muiName=_c.muiName,V.memo(V.forwardRef(n))}const Pc=Ue(u.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Kk=Ue(u.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8m-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12m3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8m5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8m3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"ColorLens"),Qk=Ue(u.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function qk(e){return it("MuiTabPanel",e)}Xe("MuiTabPanel",["root","hidden","sizeSm","sizeMd","sizeLg","horizontal","vertical","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const Jk=["children","value","component","color","variant","size","slots","slotProps","keepMounted"],Xk=e=>{const{hidden:t,size:n,variant:r,color:i,orientation:o}=e,a={root:["root",t&&"hidden",n&&`size${ye(n)}`,o,r&&`variant${ye(r)}`,i&&`color${ye(i)}`,n&&`size${ye(n)}`]};return ut(a,qk,{})},Zk=be("div",{name:"JoyTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n;return O({display:t.hidden?"none":"block",padding:"var(--Tabs-spacing)",flexGrow:1,fontFamily:e.vars.fontFamily.body},e.typography[`body-${t.size}`],(n=e.variants[t.variant])==null?void 0:n[t.color])}),Zr=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyTabPanel"}),{orientation:i}=ma()||{orientation:"horizontal"},o=V.useContext(fc),{children:a,value:s=0,component:l,color:c="neutral",variant:d="plain",size:f,slots:h={},slotProps:p={},keepMounted:m=!1}=r,g=Ae(r,Jk),{hidden:v,getRootProps:S}=US(O({},r,{value:s})),I=f!=null?f:o,x=O({},r,{orientation:i,hidden:v,size:I,color:c,variant:d}),w=Xk(x),y=O({},g,{component:l,slots:h,slotProps:p}),[A,E]=Ie("root",{ref:n,elementType:Zk,getSlotProps:S,externalForwardedProps:y,additionalProps:{role:"tabpanel",ref:n,as:l},ownerState:x,className:w.root});return m?u.jsx(A,O({},E,{children:a})):u.jsx(A,O({},E,{children:!v&&a}))});function e_(e){return it("MuiInput",e)}const wp=Xe("MuiInput",["root","input","formControl","focused","disabled","error","adornedStart","adornedEnd","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid","fullWidth","startDecorator","endDecorator"]),Ha=V.createContext(void 0),t_=["aria-describedby","aria-label","aria-labelledby","autoComplete","autoFocus","className","defaultValue","disabled","disabledInProp","error","id","name","onClick","onChange","onKeyDown","onKeyUp","onFocus","onBlur","placeholder","readOnly","required","type","value"];function n_(e,t){var n;const r=V.useContext(Ha),{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,className:c,defaultValue:d,disabled:f,disabledInProp:h,error:p,id:m,name:g,onClick:v,onChange:S,onKeyDown:I,onKeyUp:x,onFocus:w,onBlur:y,placeholder:A,readOnly:E,required:_,type:D,value:G}=e,F=Ae(e,t_),{getRootProps:T,getInputProps:j,focused:Y,error:z,disabled:$}=rS({disabled:(n=h!=null?h:r==null?void 0:r.disabled)!=null?n:f,defaultValue:d,error:p,onBlur:y,onClick:v,onChange:S,onFocus:w,required:_!=null?_:r==null?void 0:r.required,value:G}),B={[t.disabled]:$,[t.error]:z,[t.focused]:Y,[t.formControl]:!!r,[c]:c},W={[t.disabled]:$};return O({formControl:r,propsToForward:{"aria-describedby":i,"aria-label":o,"aria-labelledby":a,autoComplete:s,autoFocus:l,disabled:$,id:m,onKeyDown:I,onKeyUp:x,name:g,placeholder:A,readOnly:E,type:D},rootStateClasses:B,inputStateClasses:W,getRootProps:T,getInputProps:j,focused:Y,error:z,disabled:$},F)}const Dc=e=>t=>`--${e?`${e}-`:""}${t.replace(/^--/,"")}`,to="data-skip-inverted-colors",Ip=`& :not([${to}], [${to}] *)`,Sp=e=>{var t,n,r,i,o,a,s,l,c,d,f,h,p,m,g,v,S,I,x,w,y,A;const E=Dc(e.cssVarPrefix);return{"--variant-plainColor":"var(--variant-plainColor) !important","--variant-plainHoverColor":"var(--variant-plainHoverColor) !important","--variant-plainHoverBg":"var(--variant-plainHoverBg) !important","--variant-plainActiveBg":"var(--variant-plainActiveBg) !important","--variant-plainDisabledColor":"var(--variant-plainDisabledColor) !important","--variant-outlinedColor":"var(--variant-outlinedColor) !important","--variant-outlinedBorder":"var(--variant-outlinedBorder) !important","--variant-outlinedHoverColor":"var(--variant-outlinedHoverColor) !important","--variant-outlinedHoverBorder":"var(--variant-outlinedHoverBorder) !important","--variant-outlinedHoverBg":"var(--variant-outlinedHoverBg) !important","--variant-outlinedActiveBg":"var(--variant-outlinedActiveBg) !important","--variant-outlinedDisabledColor":"var(--variant-outlinedDisabledColor) !important","--variant-outlinedDisabledBorder":"var(--variant-outlinedDisabledBorder) !important","--variant-softColor":"var(--variant-softColor) !important","--variant-softHoverColor":"var(--variant-softHoverColor) !important","--variant-softBg":"var(--variant-softBg) !important","--variant-softHoverBg":"var(--variant-softHoverBg) !important","--variant-softActiveBg":"var(--variant-softActiveBg) !important","--variant-softActiveColor":"var(--variant-softActiveColor) !important","--variant-softDisabledColor":"var(--variant-softDisabledColor) !important","--variant-softDisabledBg":"var(--variant-softDisabledBg) !important","--variant-solidColor":"var(--variant-solidColor) !important","--variant-solidBg":"var(--variant-solidBg) !important","--variant-solidHoverBg":"var(--variant-solidHoverBg) !important","--variant-solidActiveBg":"var(--variant-solidActiveBg) !important","--variant-solidDisabledColor":"var(--variant-solidDisabledColor) !important","--variant-solidDisabledBg":"var(--variant-solidDisabledBg) !important","--Badge-ringColor":"var(--Badge-ringColor) !important",colorScheme:"unset",[e.getColorSchemeSelector("light")]:{[E("--palette-focusVisible")]:`${(t=e.colorSchemes.light)==null?void 0:t.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(n=e.colorSchemes.light)==null?void 0:n.palette.background.body} !important`,[E("--palette-background-surface")]:`${(r=e.colorSchemes.light)==null?void 0:r.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(i=e.colorSchemes.light)==null?void 0:i.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(o=e.colorSchemes.light)==null?void 0:o.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(a=e.colorSchemes.light)==null?void 0:a.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(s=e.colorSchemes.light)==null?void 0:s.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(l=e.colorSchemes.light)==null?void 0:l.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(c=e.colorSchemes.light)==null?void 0:c.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(d=e.colorSchemes.light)==null?void 0:d.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(f=e.colorSchemes.light)==null?void 0:f.palette.divider} !important`},[e.getColorSchemeSelector("dark")]:{[E("--palette-focusVisible")]:`${(h=e.colorSchemes.dark)==null?void 0:h.palette.focusVisible} !important`,[E("--palette-background-body")]:`${(p=e.colorSchemes.dark)==null?void 0:p.palette.background.body} !important`,[E("--palette-background-surface")]:`${(m=e.colorSchemes.dark)==null?void 0:m.palette.background.surface} !important`,[E("--palette-background-popup")]:`${(g=e.colorSchemes.dark)==null?void 0:g.palette.background.popup} !important`,[E("--palette-background-level1")]:`${(v=e.colorSchemes.dark)==null?void 0:v.palette.background.level1} !important`,[E("--palette-background-level2")]:`${(S=e.colorSchemes.dark)==null?void 0:S.palette.background.level2} !important`,[E("--palette-background-level3")]:`${(I=e.colorSchemes.dark)==null?void 0:I.palette.background.level3} !important`,[E("--palette-text-primary")]:`${(x=e.colorSchemes.dark)==null?void 0:x.palette.text.primary} !important`,[E("--palette-text-secondary")]:`${(w=e.colorSchemes.dark)==null?void 0:w.palette.text.secondary} !important`,[E("--palette-text-tertiary")]:`${(y=e.colorSchemes.dark)==null?void 0:y.palette.text.tertiary} !important`,[E("--palette-divider")]:`${(A=e.colorSchemes.dark)==null?void 0:A.palette.divider} !important`}}};function r_(e){return e.theme!==void 0}const i_=e=>t=>{const n=r_(t)?t.theme:t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-solidBg`),"--Icon-color":"currentColor",[`${n.getColorSchemeSelector("light")}, ${n.getColorSchemeSelector("dark")}`]:{colorScheme:"dark",[i("--palette-focusVisible")]:o(`palette-${e}-200`),[i("--palette-background-body")]:"rgba(0 0 0 / 0.1)",[i("--palette-background-surface")]:"rgba(0 0 0 / 0.06)",[i("--palette-background-popup")]:o(`palette-${e}-700`),[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.36)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.6)`,[i("--palette-text-primary")]:o("palette-common-white"),[i("--palette-text-secondary")]:o(`palette-${e}-200`),[i("--palette-text-tertiary")]:o(`palette-${e}-300`),[i("--palette-text-icon")]:o(`palette-${e}-200`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainColor":o(`palette-${e}-50`),"--variant-plainHoverColor":"#fff","--variant-plainHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedColor":o(`palette-${e}-50`),"--variant-outlinedBorder":`rgba(${o(`palette-${e}-lightChannel`)} / 0.5)`,"--variant-outlinedHoverColor":"#fff","--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":"rgba(255 255 255 / 0.2)","--variant-softColor":o("palette-common-white"),"--variant-softHoverColor":o("palette-common-white"),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.24)`,"--variant-softHoverBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.36)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.16)`,"--variant-softActiveColor":"#fff","--variant-softDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`,"--variant-solidColor":o(`palette-${e}-${e==="neutral"?"600":"500"}`),"--variant-solidBg":o("palette-common-white"),"--variant-solidHoverBg":o("palette-common-white"),"--variant-solidActiveBg":o(`palette-${e}-100`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.1)`}},[`&, & [${to}]`]:Sp(n)}},o_=e=>t=>{const{theme:n=t}=t,r=Zl(n.cssVarPrefix),i=Dc(n.cssVarPrefix),o=a=>{const s=a.split("-");return r(a,n.palette[s[1]][s[2]])};return{[Ip]:{"--Badge-ringColor":o(`palette-${e}-softBg`),"--Icon-color":"currentColor",[n.getColorSchemeSelector("dark")]:{[i("--palette-focusVisible")]:o(`palette-${e}-300`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,[i("--palette-text-primary")]:o(`palette-${e}-100`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.72)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-text-icon")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.6)`,[i("--palette-divider")]:`rgba(${o(`palette-${e}-lightChannel`)} / 0.2)`,"--variant-plainColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-plainHoverColor":o(`palette-${e}-50`),"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-lightChannel`)} / 1)`,"--variant-outlinedHoverColor":o(`palette-${e}-50`),"--variant-outlinedBg":"initial","--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverBorder":o(`palette-${e}-600`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.16)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,"--variant-softColor":o(`palette-${e}-200`),"--variant-softBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-softHoverColor":"#fff","--variant-softHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-softActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-solidColor":"#fff","--variant-solidBg":o(`palette-${e}-500`),"--variant-solidHoverColor":"#fff","--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.72)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`},[n.getColorSchemeSelector("light")]:{[i("--palette-focusVisible")]:o(`palette-${e}-500`),[i("--palette-background-body")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.1)`,[i("--palette-background-surface")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,[i("--palette-background-level1")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.2)`,[i("--palette-background-level2")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,[i("--palette-background-level3")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.48)`,[i("--palette-text-primary")]:o(`palette-${e}-700`),[i("--palette-text-secondary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,[i("--palette-text-tertiary")]:`rgba(${o(`palette-${e}-darkChannel`)} / 0.68)`,[i("--palette-text-icon")]:o(`palette-${e}-500`),[i("--palette-divider")]:`rgba(${o(`palette-${e}-mainChannel`)} / 0.32)`,"--variant-plainColor":`rgba(${o(`palette-${e}-darkChannel`)} / 0.8)`,"--variant-plainHoverColor":`rgba(${o(`palette-${e}-darkChannel`)} / 1)`,"--variant-plainHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-plainActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-plainDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedColor":`rgba(${o(`palette-${e}-mainChannel`)} / 1)`,"--variant-outlinedBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.4)`,"--variant-outlinedHoverColor":o(`palette-${e}-600`),"--variant-outlinedHoverBorder":o(`palette-${e}-300`),"--variant-outlinedHoverBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-outlinedActiveBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.24)`,"--variant-outlinedDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-outlinedDisabledBorder":`rgba(${o(`palette-${e}-mainChannel`)} / 0.12)`,"--variant-softColor":o(`palette-${e}-600`),"--variant-softBg":`rgba(${o(`palette-${e}-lightChannel`)} / 0.8)`,"--variant-softHoverColor":o(`palette-${e}-700`),"--variant-softHoverBg":o(`palette-${e}-200`),"--variant-softActiveBg":o(`palette-${e}-300`),"--variant-softDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-softDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`,"--variant-solidColor":o("palette-common-white"),"--variant-solidBg":o(`palette-${e}-${e==="neutral"?"700":"500"}`),"--variant-solidHoverColor":o("palette-common-white"),"--variant-solidHoverBg":o(`palette-${e}-600`),"--variant-solidActiveBg":o(`palette-${e}-600`),"--variant-solidDisabledColor":`rgba(${o(`palette-${e}-mainChannel`)} / 0.6)`,"--variant-solidDisabledBg":`rgba(${o(`palette-${e}-mainChannel`)} / 0.08)`}},[`&, & [${to}]`]:Sp(n)}},a_=["propsToForward","rootStateClasses","inputStateClasses","getRootProps","getInputProps","formControl","focused","error","disabled","fullWidth","size","color","variant","startDecorator","endDecorator","component","slots","slotProps"],s_=e=>{const{disabled:t,fullWidth:n,variant:r,color:i,size:o}=e,a={root:["root",t&&"disabled",n&&"fullWidth",r&&`variant${ye(r)}`,i&&`color${ye(i)}`,o&&`size${ye(o)}`],input:["input"],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ut(a,e_,{})},l_=be("div")(({theme:e,ownerState:t})=>{var n,r,i,o,a,s;const l=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[O({"--Input-radius":e.vars.radius.sm,"--Input-gap":"0.5rem","--Input-placeholderColor":"inherit","--Input-placeholderOpacity":.64,"--Input-decoratorColor":e.vars.palette.text.icon,"--Input-focused":"0","--Input-focusedThickness":e.vars.focus.thickness,"--Input-focusedHighlight":(r=e.vars.palette[t.color==="neutral"?"primary":t.color])==null?void 0:r[500],[`&:not([${to}])`]:O({},t.instanceColor&&{"--_Input-focusedHighlight":(i=e.vars.palette[t.instanceColor==="neutral"?"primary":t.instanceColor])==null?void 0:i[500]},{"--Input-focusedHighlight":`var(--_Input-focusedHighlight, ${e.vars.palette.focusVisible})`})},t.size==="sm"&&{"--Input-minHeight":"2rem","--Input-paddingInline":"0.5rem","--Input-decoratorChildHeight":"min(1.5rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl},t.size==="md"&&{"--Input-minHeight":"2.25rem","--Input-paddingInline":"0.75rem","--Input-decoratorChildHeight":"min(1.75rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},t.size==="lg"&&{"--Input-minHeight":"2.75rem","--Input-paddingInline":"1rem","--Input-gap":"0.75rem","--Input-decoratorChildHeight":"min(2.25rem, var(--Input-minHeight))","--Icon-fontSize":e.vars.fontSize.xl2},{"--Input-decoratorChildOffset":"min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))","--_Input-paddingBlock":"max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)","--Input-decoratorChildRadius":"max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))","--Button-minHeight":"var(--Input-decoratorChildHeight)","--Button-paddingBlock":"0px","--IconButton-size":"var(--Input-decoratorChildHeight)","--Button-radius":"var(--Input-decoratorChildRadius)","--IconButton-radius":"var(--Input-decoratorChildRadius)",boxSizing:"border-box"},t.variant!=="plain"&&{boxShadow:e.shadow.xs},{minWidth:0,minHeight:"var(--Input-minHeight)"},t.fullWidth&&{width:"100%"},{cursor:"text",position:"relative",display:"flex",paddingInline:"var(--Input-paddingInline)",borderRadius:"var(--Input-radius)"},e.typography[`body-${t.size}`],l,{backgroundColor:(o=l==null?void 0:l.backgroundColor)!=null?o:e.vars.palette.background.surface,"&::before":{boxSizing:"border-box",content:'""',display:"block",position:"absolute",pointerEvents:"none",top:0,left:0,right:0,bottom:0,zIndex:1,borderRadius:"inherit",margin:"calc(var(--variant-borderWidth, 0px) * -1)",boxShadow:"var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"}}),{"&:hover":O({},(a=e.variants[`${t.variant}Hover`])==null?void 0:a[t.color],{backgroundColor:null}),[`&.${wp.disabled}`]:(s=e.variants[`${t.variant}Disabled`])==null?void 0:s[t.color],"&:focus-within::before":{"--Input-focused":"1"}}]}),c_=be("input")(({ownerState:e})=>({border:"none",minWidth:0,outline:0,padding:0,flex:1,color:"inherit",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontWeight:"inherit",lineHeight:"inherit",textOverflow:"ellipsis","&:-webkit-autofill":O({paddingInline:"var(--Input-paddingInline)"},!e.startDecorator&&{marginInlineStart:"calc(-1 * var(--Input-paddingInline))",paddingInlineStart:"var(--Input-paddingInline)",borderTopLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomLeftRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"},!e.endDecorator&&{marginInlineEnd:"calc(-1 * var(--Input-paddingInline))",paddingInlineEnd:"var(--Input-paddingInline)",borderTopRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",borderBottomRightRadius:"calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"}),"&::-webkit-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-moz-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&:-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"},"&::-ms-input-placeholder":{color:"var(--Input-placeholderColor)",opacity:"var(--Input-placeholderOpacity)"}})),u_=be("div")({"--Button-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--IconButton-margin":"0 0 0 calc(var(--Input-decoratorChildOffset) * -1)","--Icon-margin":"0 0 0 calc(var(--Input-paddingInline) / -4)",display:"inherit",alignItems:"center",paddingBlock:"var(--unstable_InputPaddingBlock)",flexWrap:"wrap",marginInlineEnd:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),d_=be("div")({"--Button-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--IconButton-margin":"0 calc(var(--Input-decoratorChildOffset) * -1) 0 0","--Icon-margin":"0 calc(var(--Input-paddingInline) / -4) 0 0",display:"inherit",alignItems:"center",marginInlineStart:"var(--Input-gap)",color:"var(--Input-decoratorColor)",cursor:"initial"}),f_=be(l_,{name:"JoyInput",slot:"Root",overridesResolver:(e,t)=>t.root})({}),h_=be(c_,{name:"JoyInput",slot:"Input",overridesResolver:(e,t)=>t.input})({}),p_=be(u_,{name:"JoyInput",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({}),g_=be(d_,{name:"JoyInput",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({}),Wa=V.forwardRef(function(t,n){var r,i,o,a,s,l;const c=dt({props:t,name:"JoyInput"}),d=n_(O({},c,{disabledInProp:t.disabled}),wp),{propsToForward:f,rootStateClasses:h,inputStateClasses:p,getRootProps:m,getInputProps:g,formControl:v,focused:S,error:I=!1,disabled:x,fullWidth:w=!1,size:y="md",color:A="neutral",variant:E="outlined",startDecorator:_,endDecorator:D,component:G,slots:F={},slotProps:T={}}=d,j=Ae(d,a_),Y=(r=(i=t.error)!=null?i:v==null?void 0:v.error)!=null?r:I,z=(o=(a=t.size)!=null?a:v==null?void 0:v.size)!=null?o:y,$=(s=t.color)!=null?s:Y?"danger":(l=v==null?void 0:v.color)!=null?l:A,B=O({instanceColor:Y?"danger":t.color},c,{fullWidth:w,color:$,disabled:x,error:Y,focused:S,size:z,variant:E}),W=s_(B),Q=O({},j,{component:G,slots:F,slotProps:T}),[te,R]=Ie("root",{ref:n,className:[W.root,h],elementType:f_,getSlotProps:m,externalForwardedProps:Q,ownerState:B}),[M,U]=Ie("input",O({},v&&{additionalProps:{id:v.htmlFor,"aria-describedby":v["aria-describedby"]}},{className:[W.input,p],elementType:h_,getSlotProps:g,internalForwardedProps:f,externalForwardedProps:Q,ownerState:B})),[H,ne]=Ie("startDecorator",{className:W.startDecorator,elementType:p_,externalForwardedProps:Q,ownerState:B}),[se,ae]=Ie("endDecorator",{className:W.endDecorator,elementType:g_,externalForwardedProps:Q,ownerState:B});return u.jsxs(te,O({},R,{children:[_&&u.jsx(H,O({},ne,{children:_})),u.jsx(M,O({},U)),D&&u.jsx(se,O({},ae,{children:D}))]}))}),xn=({label:e,placeholder:t,value:n,defaultValue:r,required:i,size:o,readOnly:a=!1,endDecorator:s=void 0,onChange:l})=>u.jsxs(b.FormControl,{size:o||"md",sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{required:i,color:"primary",children:e}),u.jsx(Wa,{placeholder:t,size:"md",variant:"outlined",color:"neutral",value:n||r,defaultValue:r,readOnly:a,endDecorator:s,onChange:l,sx:{backgroundColor:"#fff",borderRadius:"md"}})]}),Ap=Ue(u.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");function m_(e){return it("MuiCircularProgress",e)}Xe("MuiCircularProgress",["root","determinate","svg","track","progress","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);let v_=e=>e,Tp;const b_=["color","backgroundColor"],y_=["children","className","color","size","variant","thickness","determinate","value","component","slots","slotProps"],x_=pe.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(270deg)"}}),C_=e=>{const{determinate:t,color:n,variant:r,size:i}=e,o={root:["root",t&&"determinate",n&&`color${ye(n)}`,r&&`variant${ye(r)}`,i&&`size${ye(i)}`],svg:["svg"],track:["track"],progress:["progress"]};return ut(o,m_,{})};function ei(e,t){return`var(--CircularProgress-${e}Thickness, var(--CircularProgress-thickness, ${t}))`}const w_=be("span",{name:"JoyCircularProgress",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i,o;const a=((n=t.variants[e.variant])==null?void 0:n[e.color])||{},{color:s,backgroundColor:l}=a,c=Ae(a,b_);return O({"--Icon-fontSize":"calc(0.4 * var(--_root-size))","--CircularProgress-trackColor":l,"--CircularProgress-progressColor":s,"--CircularProgress-percent":e.value,"--CircularProgress-linecap":"round"},e.size==="sm"&&{"--_root-size":"var(--CircularProgress-size, 24px)","--_track-thickness":ei("track","3px"),"--_progress-thickness":ei("progress","3px")},e.instanceSize==="sm"&&{"--CircularProgress-size":"24px"},e.size==="md"&&{"--_track-thickness":ei("track","6px"),"--_progress-thickness":ei("progress","6px"),"--_root-size":"var(--CircularProgress-size, 40px)"},e.instanceSize==="md"&&{"--CircularProgress-size":"40px"},e.size==="lg"&&{"--_track-thickness":ei("track","8px"),"--_progress-thickness":ei("progress","8px"),"--_root-size":"var(--CircularProgress-size, 64px)"},e.instanceSize==="lg"&&{"--CircularProgress-size":"64px"},e.thickness&&{"--_track-thickness":`${e.thickness}px`,"--_progress-thickness":`${e.thickness}px`},{"--_thickness-diff":"calc(var(--_track-thickness) - var(--_progress-thickness))","--_inner-size":"calc(var(--_root-size) - 2 * var(--variant-borderWidth, 0px))","--_outlined-inset":"max(var(--_track-thickness), var(--_progress-thickness))",width:"var(--_root-size)",height:"var(--_root-size)",borderRadius:"var(--_root-size)",margin:"var(--CircularProgress-margin)",boxSizing:"border-box",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0,position:"relative",color:s},e.children&&{fontFamily:t.vars.fontFamily.body,fontWeight:t.vars.fontWeight.md,fontSize:"calc(0.2 * var(--_root-size))"},c,e.variant==="outlined"&&{"&::before":O({content:'""',display:"block",position:"absolute",borderRadius:"inherit",top:"var(--_outlined-inset)",left:"var(--_outlined-inset)",right:"var(--_outlined-inset)",bottom:"var(--_outlined-inset)"},c)},e.variant==="soft"&&{"--CircularProgress-trackColor":t.variants.soft.neutral.backgroundColor,"--CircularProgress-progressColor":(r=t.variants.solid)==null?void 0:r[e.color].backgroundColor},e.variant==="solid"&&{"--CircularProgress-trackColor":(i=t.variants.softHover)==null?void 0:i[e.color].backgroundColor,"--CircularProgress-progressColor":(o=t.variants.solid)==null?void 0:o[e.color].backgroundColor})}),I_=be("svg",{name:"JoyCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({width:"inherit",height:"inherit",display:"inherit",boxSizing:"inherit",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))"}),S_=be("circle",{name:"JoyCircularProgress",slot:"track",overridesResolver:(e,t)=>t.track})({cx:"50%",cy:"50%",r:"calc(var(--_inner-size) / 2 - var(--_track-thickness) / 2 + min(0px, var(--_thickness-diff) / 2))",fill:"transparent",strokeWidth:"var(--_track-thickness)",stroke:"var(--CircularProgress-trackColor)"}),A_=be("circle",{name:"JoyCircularProgress",slot:"progress",overridesResolver:(e,t)=>t.progress})({"--_progress-radius":"calc(var(--_inner-size) / 2 - var(--_progress-thickness) / 2 - max(0px, var(--_thickness-diff) / 2))","--_progress-length":"calc(2 * 3.1415926535 * var(--_progress-radius))",cx:"50%",cy:"50%",r:"var(--_progress-radius)",fill:"transparent",strokeWidth:"var(--_progress-thickness)",stroke:"var(--CircularProgress-progressColor)",strokeLinecap:"var(--CircularProgress-linecap, round)",strokeDasharray:"var(--_progress-length)",strokeDashoffset:"calc(var(--_progress-length) - var(--CircularProgress-percent) * var(--_progress-length) / 100)",transformOrigin:"center",transform:"rotate(-90deg)"},({ownerState:e})=>!e.determinate&&pe.css(Tp||(Tp=v_`
|
|
2348
2348
|
animation: var(--CircularProgress-circulation, 0.8s linear 0s infinite normal none running)
|
|
2349
2349
|
${0};
|
|
2350
|
-
`),x_)),Ep=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:s="md",variant:l="soft",thickness:c,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,y_),v=O({},r,{color:a,size:s,variant:l,thickness:c,value:f,determinate:d,instanceSize:t.size}),S=C_(v),I=O({},g,{component:h,slots:p,slotProps:m}),[x,w]=Ie("root",{ref:n,className:Bn(S.root,o),elementType:w_,externalForwardedProps:I,ownerState:v,additionalProps:O({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[y,A]=Ie("svg",{className:S.svg,elementType:I_,externalForwardedProps:I,ownerState:v}),[E,_]=Ie("track",{className:S.track,elementType:S_,externalForwardedProps:I,ownerState:v}),[D,G]=Ie("progress",{className:S.progress,elementType:A_,externalForwardedProps:I,ownerState:v});return u.jsxs(x,O({},w,{children:[u.jsxs(y,O({},A,{children:[u.jsx(E,O({},_)),u.jsx(D,O({},G))]})),i]}))});function T_(e){return it("MuiButton",e)}const kp=Xe("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),_p=V.createContext({}),Pp=V.createContext(void 0),E_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],k_=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:s,loading:l}=e,c={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",s&&`variant${ye(s)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,l&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=ut(c,T_,{});return r&&i&&(d.root+=` ${i}`),d},__=be("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),P_=be("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),D_=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({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})}),O_=({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.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),O({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${kp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${kp.loading}`]:{color:"transparent"}})]},R_=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(O_),ti=V.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyButton"}),{children:o,action:a,color:s="primary",variant:l="solid",size:c="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:v,component:S,slots:I={},slotProps:x={}}=i,w=Ae(i,E_),y=V.useContext(_p),A=V.useContext(Pp),E=t.variant||y.variant||l,_=t.size||y.size||c,D=t.color||y.color||s,G=(r=t.loading||t.disabled)!=null?r:y.disabled||p||v,F=V.useRef(null),T=sn(F,n),{focusVisible:j,setFocusVisible:Y,getRootProps:z}=zl(O({},i,{disabled:G,rootRef:T})),$=g!=null?g:u.jsx(Ep,{color:D,thickness:{sm:2,md:3,lg:4}[_]||3});V.useImperativeHandle(a,()=>({focusVisible:()=>{var re;Y(!0),(re=F.current)==null||re.focus()}}),[Y]);const B=O({},i,{color:D,fullWidth:d,variant:E,size:_,focusVisible:j,loading:p,loadingPosition:m,disabled:G}),W=k_(B),q=re=>{var ge;let Se=i.onClick;if(typeof x.root=="function"?Se=x.root(B).onClick:x.root&&(Se=x.root.onClick),(ge=Se)==null||ge(re),A){var Ve;(Ve=A.onClick)==null||Ve.call(A,re,i.value)}};let ee=i["aria-pressed"];typeof x.root=="function"?ee=x.root(B)["aria-pressed"]:x.root&&(ee=x.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?ee=A.value.indexOf(i.value)!==-1:ee=A.value===i.value);const R=O({},w,{component:S,slots:I,slotProps:x}),[M,U]=Ie("root",{ref:n,className:W.root,elementType:R_,externalForwardedProps:R,getSlotProps:z,ownerState:B,additionalProps:{onClick:q,"aria-pressed":ee}}),[H,ne]=Ie("startDecorator",{className:W.startDecorator,elementType:__,externalForwardedProps:R,ownerState:B}),[se,ae]=Ie("endDecorator",{className:W.endDecorator,elementType:P_,externalForwardedProps:R,ownerState:B}),[X,le]=Ie("loadingIndicatorCenter",{className:W.loadingIndicatorCenter,elementType:D_,externalForwardedProps:R,ownerState:B});return u.jsxs(M,O({},U,{children:[(f||p&&m==="start")&&u.jsx(H,O({},ne,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&u.jsx(X,O({},le,{children:$})),(h||p&&m==="end")&&u.jsx(se,O({},ae,{children:p&&m==="end"?$:h}))]}))});ti.muiName="Button";var Dp={exports:{}};function L_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Oc={exports:{}};const M_=$u(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Op;function Rc(){return Op||(Op=1,function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=n||function(r,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Bt!="undefined"&&Bt.crypto&&(o=Bt.crypto),!o&&typeof L_=="function")try{o=M_}catch(I){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(I){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(I){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function I(){}return function(x){var w;return I.prototype=x,w=new I,I.prototype=null,w}}(),l={},c=l.lib={},d=c.Base=function(){return{extend:function(I){var x=s(this);return I&&x.mixIn(I),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var I=this.extend();return I.init.apply(I,arguments),I},init:function(){},mixIn:function(I){for(var x in I)I.hasOwnProperty(x)&&(this[x]=I[x]);I.hasOwnProperty("toString")&&(this.toString=I.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(I,x){I=this.words=I||[],x!=i?this.sigBytes=x:this.sigBytes=I.length*4},toString:function(I){return(I||p).stringify(this)},concat:function(I){var x=this.words,w=I.words,y=this.sigBytes,A=I.sigBytes;if(this.clamp(),y%4)for(var E=0;E<A;E++){var _=w[E>>>2]>>>24-E%4*8&255;x[y+E>>>2]|=_<<24-(y+E)%4*8}else for(var D=0;D<A;D+=4)x[y+D>>>2]=w[D>>>2];return this.sigBytes+=A,this},clamp:function(){var I=this.words,x=this.sigBytes;I[x>>>2]&=4294967295<<32-x%4*8,I.length=r.ceil(x/4)},clone:function(){var I=d.clone.call(this);return I.words=this.words.slice(0),I},random:function(I){for(var x=[],w=0;w<I;w+=4)x.push(a());return new f.init(x,I)}}),h=l.enc={},p=h.Hex={stringify:function(I){for(var x=I.words,w=I.sigBytes,y=[],A=0;A<w;A++){var E=x[A>>>2]>>>24-A%4*8&255;y.push((E>>>4).toString(16)),y.push((E&15).toString(16))}return y.join("")},parse:function(I){for(var x=I.length,w=[],y=0;y<x;y+=2)w[y>>>3]|=parseInt(I.substr(y,2),16)<<24-y%8*4;return new f.init(w,x/2)}},m=h.Latin1={stringify:function(I){for(var x=I.words,w=I.sigBytes,y=[],A=0;A<w;A++){var E=x[A>>>2]>>>24-A%4*8&255;y.push(String.fromCharCode(E))}return y.join("")},parse:function(I){for(var x=I.length,w=[],y=0;y<x;y++)w[y>>>2]|=(I.charCodeAt(y)&255)<<24-y%4*8;return new f.init(w,x)}},g=h.Utf8={stringify:function(I){try{return decodeURIComponent(escape(m.stringify(I)))}catch(x){throw new Error("Malformed UTF-8 data")}},parse:function(I){return m.parse(unescape(encodeURIComponent(I)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(I){typeof I=="string"&&(I=g.parse(I)),this._data.concat(I),this._nDataBytes+=I.sigBytes},_process:function(I){var x,w=this._data,y=w.words,A=w.sigBytes,E=this.blockSize,_=E*4,D=A/_;I?D=r.ceil(D):D=r.max((D|0)-this._minBufferSize,0);var G=D*E,F=r.min(G*4,A);if(G){for(var T=0;T<G;T+=E)this._doProcessBlock(y,T);x=y.splice(0,G),w.sigBytes-=F}return new f.init(x,F)},clone:function(){var I=d.clone.call(this);return I._data=this._data.clone(),I},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(I){this.cfg=this.cfg.extend(I),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(I){return this._append(I),this._process(),this},finalize:function(I){I&&this._append(I);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(I){return function(x,w){return new I.init(w).finalize(x)}},_createHmacHelper:function(I){return function(x,w){return new S.HMAC.init(I,w).finalize(x)}}});var S=l.algo={};return l}(Math);return n})}(Oc)),Oc.exports}(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,s=o.Hasher,l=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var S=0;S<16;S++){var I=v+S,x=g[I];g[I]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var w=this._hash.words,y=g[v+0],A=g[v+1],E=g[v+2],_=g[v+3],D=g[v+4],G=g[v+5],F=g[v+6],T=g[v+7],j=g[v+8],Y=g[v+9],z=g[v+10],$=g[v+11],B=g[v+12],W=g[v+13],q=g[v+14],ee=g[v+15],R=w[0],M=w[1],U=w[2],H=w[3];R=f(R,M,U,H,y,7,c[0]),H=f(H,R,M,U,A,12,c[1]),U=f(U,H,R,M,E,17,c[2]),M=f(M,U,H,R,_,22,c[3]),R=f(R,M,U,H,D,7,c[4]),H=f(H,R,M,U,G,12,c[5]),U=f(U,H,R,M,F,17,c[6]),M=f(M,U,H,R,T,22,c[7]),R=f(R,M,U,H,j,7,c[8]),H=f(H,R,M,U,Y,12,c[9]),U=f(U,H,R,M,z,17,c[10]),M=f(M,U,H,R,$,22,c[11]),R=f(R,M,U,H,B,7,c[12]),H=f(H,R,M,U,W,12,c[13]),U=f(U,H,R,M,q,17,c[14]),M=f(M,U,H,R,ee,22,c[15]),R=h(R,M,U,H,A,5,c[16]),H=h(H,R,M,U,F,9,c[17]),U=h(U,H,R,M,$,14,c[18]),M=h(M,U,H,R,y,20,c[19]),R=h(R,M,U,H,G,5,c[20]),H=h(H,R,M,U,z,9,c[21]),U=h(U,H,R,M,ee,14,c[22]),M=h(M,U,H,R,D,20,c[23]),R=h(R,M,U,H,Y,5,c[24]),H=h(H,R,M,U,q,9,c[25]),U=h(U,H,R,M,_,14,c[26]),M=h(M,U,H,R,j,20,c[27]),R=h(R,M,U,H,W,5,c[28]),H=h(H,R,M,U,E,9,c[29]),U=h(U,H,R,M,T,14,c[30]),M=h(M,U,H,R,B,20,c[31]),R=p(R,M,U,H,G,4,c[32]),H=p(H,R,M,U,j,11,c[33]),U=p(U,H,R,M,$,16,c[34]),M=p(M,U,H,R,q,23,c[35]),R=p(R,M,U,H,A,4,c[36]),H=p(H,R,M,U,D,11,c[37]),U=p(U,H,R,M,T,16,c[38]),M=p(M,U,H,R,z,23,c[39]),R=p(R,M,U,H,W,4,c[40]),H=p(H,R,M,U,y,11,c[41]),U=p(U,H,R,M,_,16,c[42]),M=p(M,U,H,R,F,23,c[43]),R=p(R,M,U,H,Y,4,c[44]),H=p(H,R,M,U,B,11,c[45]),U=p(U,H,R,M,ee,16,c[46]),M=p(M,U,H,R,E,23,c[47]),R=m(R,M,U,H,y,6,c[48]),H=m(H,R,M,U,T,10,c[49]),U=m(U,H,R,M,q,15,c[50]),M=m(M,U,H,R,G,21,c[51]),R=m(R,M,U,H,B,6,c[52]),H=m(H,R,M,U,_,10,c[53]),U=m(U,H,R,M,z,15,c[54]),M=m(M,U,H,R,A,21,c[55]),R=m(R,M,U,H,j,6,c[56]),H=m(H,R,M,U,ee,10,c[57]),U=m(U,H,R,M,F,15,c[58]),M=m(M,U,H,R,W,21,c[59]),R=m(R,M,U,H,D,6,c[60]),H=m(H,R,M,U,$,10,c[61]),U=m(U,H,R,M,E,15,c[62]),M=m(M,U,H,R,Y,21,c[63]),w[0]=w[0]+R|0,w[1]=w[1]+M|0,w[2]=w[2]+U|0,w[3]=w[3]+H|0},_doFinalize:function(){var g=this._data,v=g.words,S=this._nDataBytes*8,I=g.sigBytes*8;v[I>>>5]|=128<<24-I%32;var x=r.floor(S/4294967296),w=S;v[(I+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,v[(I+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var y=this._hash,A=y.words,E=0;E<4;E++){var _=A[E];A[E]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}return y},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,S,I,x,w,y){var A=g+(v&S|~v&I)+x+y;return(A<<w|A>>>32-w)+v}function h(g,v,S,I,x,w,y){var A=g+(v&I|S&~I)+x+y;return(A<<w|A>>>32-w)+v}function p(g,v,S,I,x,w,y){var A=g+(v^S^I)+x+y;return(A<<w|A>>>32-w)+v}function m(g,v,S,I,x,w,y){var A=g+(S^(v|~I))+x+y;return(A<<w|A>>>32-w)+v}i.MD5=s._createHelper(d),i.HmacMD5=s._createHmacHelper(d)}(Math),n.MD5})})(Dp);var B_=Dp.exports;const Rp=fn(B_);var Lp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var c=l.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=l[f]<<24-f%4*8;a.call(this,d,c)}else a.apply(this,arguments)};s.prototype=o}}(),n.lib.WordArray})})(Lp);var $_=Lp.exports;const Mp=fn($_);var Bp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(l){var c=l.words,d=l.sigBytes,f=this._map;l.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=c[p>>>2]>>>24-p%4*8&255,g=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,S=m<<16|g<<8|v,I=0;I<4&&p+I*.75<d;I++)h.push(f.charAt(S>>>6*(3-I)&63));var x=f.charAt(64);if(x)for(;h.length%4;)h.push(x);return h.join("")},parse:function(l){var c=l.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<d.length;h++)f[d.charCodeAt(h)]=h}var p=d.charAt(64);if(p){var m=l.indexOf(p);m!==-1&&(c=m)}return s(l,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(l,c,d){for(var f=[],h=0,p=0;p<c;p++)if(p%4){var m=d[l.charCodeAt(p-1)]<<p%4*2,g=d[l.charCodeAt(p)]>>>6-p%4*2,v=m|g;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Bp);var N_=Bp.exports;const F_=fn(N_);class $p{constructor(){te(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),c=Rp(s).toString(F_);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));te(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),l=Rp(s).toString();n(l)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Np=({title:e,open:t,imageSrc:n,toggleModal:r})=>u.jsx(b.Modal,{open:t,onClose:r,children:u.jsxs(b.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(b.ModalClose,{}),u.jsx(b.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(b.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Fp=Ue(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),ft=()=>{const e=C.useContext(Zo);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},z_=Ue(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),j_=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(b.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(b.Grid,{xs:5,sm:4,md:3,children:u.jsxs(b.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,s;return n(((s=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:s.embed)||"")},children:[u.jsx(b.Box,{component:"img",src:(o=(i=r.urls)==null?void 0:i.uploaded)==null?void 0:o.thumbnail,alt:`image-${r.id}`,sx:{width:"100%",height:"auto",borderRadius:"8px"}}),u.jsx(b.Box,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:5,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0)",opacity:0,transition:"background-color 0.3s ease, opacity 0.3s ease",borderRadius:"8px",cursor:"pointer"},children:u.jsx(b.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(b.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(b.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),U_=Ue(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),V_=Ue(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),H_=e=>u.jsx(b.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(b.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(b.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(U_,{}),onClick:e.getPreviousPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:"4px 0 0 4px",borderRight:0,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.previous}),e.images&&e.images.length===20&&u.jsx(b.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(V_,{}),onClick:e.getNextPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:e.pageCount!==1?"0 4px 4px 0":"4px",borderLeft:e.pageCount!==1?0:1,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.next})]})}),ni=Ue(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),W_=Ue(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),G_=({color:e})=>e==="warning"?u.jsx(W_,{}):u.jsx(ni,{}),at=e=>u.jsx(b.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(G_,{color:e.color}),children:e.message},e.message),no=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return u.jsxs(b.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{required:n,color:"primary",children:e}),u.jsx(b.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Y_=({labels:e,showFilters:t,onClick:n})=>u.jsx(b.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(b.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(z_,{})})}),zp=({labels:e,onChangeImages:t})=>{const[n,r]=C.useState(!1),[i,o]=C.useState(!1),[a,s]=C.useState(!1),[l,c]=C.useState(!1),[d,f]=C.useState(1),[h,p]=C.useState(""),[m,g]=C.useState(null),[v,S]=C.useState([]),{https:I}=ft();C.useEffect(()=>{E()},[d]);const x=()=>c(!l),w=()=>f(D=>D-1),y=()=>f(D=>D+1),A=()=>k(this,null,function*(){if(h){o(!0);const D=m?N({},m):null,G=yield I.fetchImagesFromSportal365(h,D,d);if(G){const F=yield G.json();G.ok?(S(F.data),f(F.meta.pagination.current_page)):(console.error(F),x())}o(!1)}else S([])}),E=()=>k(this,null,function*(){if(h){s(!0),S([]);const D=m&&m.from&&m.to?N({},m):null,G=yield I.fetchImagesFromSportal365(h,D,d);if(G){const F=yield G.json();G.ok?(S(F.data),f(F.meta.pagination.current_page)):(console.error(F),x())}s(!1)}}),_=(D,G)=>{g(F=>F?Q(N({},F),{[G]:D}):{[G]:D})};return u.jsxs(u.Fragment,{children:[u.jsxs(b.Box,{sx:{marginBottom:"10px"},children:[u.jsx(b.Input,{value:h,onChange:D=>p(D.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Y_,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(b.Grid,{container:!0,spacing:2,children:[u.jsx(b.Grid,{xs:6,children:u.jsx(no,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:D=>_(D,"from")})}),u.jsx(b.Grid,{xs:6,children:u.jsx(no,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:D=>_(D,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(b.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(j_,{images:v,isLoading:a,onClick:t}),u.jsx(H_,{labels:e,pageCount:d,images:v,getPreviousPage:w,getNextPage:y})]}),u.jsx(at,{showToast:l,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:x})]})},jp=Ue(u.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"Loupe"),Up=b.styled("input")`
|
|
2350
|
+
`),x_)),Ep=V.forwardRef(function(t,n){const r=dt({props:t,name:"JoyCircularProgress"}),{children:i,className:o,color:a="primary",size:s="md",variant:l="soft",thickness:c,determinate:d=!1,value:f=d?0:25,component:h,slots:p={},slotProps:m={}}=r,g=Ae(r,y_),v=O({},r,{color:a,size:s,variant:l,thickness:c,value:f,determinate:d,instanceSize:t.size}),S=C_(v),I=O({},g,{component:h,slots:p,slotProps:m}),[x,w]=Ie("root",{ref:n,className:Bn(S.root,o),elementType:w_,externalForwardedProps:I,ownerState:v,additionalProps:O({role:"progressbar",style:{"--CircularProgress-percent":f}},f&&d&&{"aria-valuenow":Math.round(typeof f=="number"?f:Number(f||0))})}),[y,A]=Ie("svg",{className:S.svg,elementType:I_,externalForwardedProps:I,ownerState:v}),[E,_]=Ie("track",{className:S.track,elementType:S_,externalForwardedProps:I,ownerState:v}),[D,G]=Ie("progress",{className:S.progress,elementType:A_,externalForwardedProps:I,ownerState:v});return u.jsxs(x,O({},w,{children:[u.jsxs(y,O({},A,{children:[u.jsx(E,O({},_)),u.jsx(D,O({},G))]})),i]}))});function T_(e){return it("MuiButton",e)}const kp=Xe("MuiButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","fullWidth","startDecorator","endDecorator","loading","loadingIndicatorCenter"]),_p=V.createContext({}),Pp=V.createContext(void 0),E_=["children","action","color","variant","size","fullWidth","startDecorator","endDecorator","loading","loadingPosition","loadingIndicator","disabled","component","slots","slotProps"],k_=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,fullWidth:o,size:a,variant:s,loading:l}=e,c={root:["root",n&&"disabled",r&&"focusVisible",o&&"fullWidth",s&&`variant${ye(s)}`,t&&`color${ye(t)}`,a&&`size${ye(a)}`,l&&"loading"],startDecorator:["startDecorator"],endDecorator:["endDecorator"],loadingIndicatorCenter:["loadingIndicatorCenter"]},d=ut(c,T_,{});return r&&i&&(d.root+=` ${i}`),d},__=be("span",{name:"JoyButton",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({"--Icon-margin":"0 0 0 calc(var(--Button-gap) / -2)","--CircularProgress-margin":"0 0 0 calc(var(--Button-gap) / -2)",display:"inherit",marginRight:"var(--Button-gap)"}),P_=be("span",{name:"JoyButton",slot:"EndDecorator",overridesResolver:(e,t)=>t.endDecorator})({"--Icon-margin":"0 calc(var(--Button-gap) / -2) 0 0","--CircularProgress-margin":"0 calc(var(--Button-gap) / -2) 0 0",display:"inherit",marginLeft:"var(--Button-gap)"}),D_=be("span",{name:"JoyButton",slot:"LoadingCenter",overridesResolver:(e,t)=>t.loadingIndicatorCenter})(({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})}),O_=({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.size==="sm"&&{"--Icon-fontSize":e.vars.fontSize.lg,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.375rem",minHeight:"var(--Button-minHeight, 2rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.25rem)",paddingInline:"0.75rem"},t.size==="md"&&{"--Icon-fontSize":e.vars.fontSize.xl,"--CircularProgress-size":"20px","--CircularProgress-thickness":"2px","--Button-gap":"0.5rem",minHeight:"var(--Button-minHeight, 2.25rem)",fontSize:e.vars.fontSize.sm,paddingBlock:"var(--Button-paddingBlock, 0.375rem)",paddingInline:"1rem"},t.size==="lg"&&{"--Icon-fontSize":e.vars.fontSize.xl2,"--CircularProgress-size":"28px","--CircularProgress-thickness":"4px","--Button-gap":"0.75rem",minHeight:"var(--Button-minHeight, 2.75rem)",fontSize:e.vars.fontSize.md,paddingBlock:"var(--Button-paddingBlock, 0.5rem)",paddingInline:"1.5rem"},{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",borderRadius:`var(--Button-radius, ${e.vars.radius.sm})`,margin:"var(--Button-margin)",border:"none",backgroundColor:"transparent",cursor:"pointer",userSelect:"none",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",textDecoration:"none",fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.lg,lineHeight:e.vars.lineHeight.md},t.fullWidth&&{width:"100%"},{[e.focus.selector]:e.focus.default}),O({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},'&:active, &[aria-pressed="true"]':(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color],[`&.${kp.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]},t.loadingPosition==="center"&&{[`&.${kp.loading}`]:{color:"transparent"}})]},R_=be("button",{name:"JoyButton",slot:"Root",overridesResolver:(e,t)=>t.root})(O_),ti=V.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyButton"}),{children:o,action:a,color:s="primary",variant:l="solid",size:c="md",fullWidth:d=!1,startDecorator:f,endDecorator:h,loading:p=!1,loadingPosition:m="center",loadingIndicator:g,disabled:v,component:S,slots:I={},slotProps:x={}}=i,w=Ae(i,E_),y=V.useContext(_p),A=V.useContext(Pp),E=t.variant||y.variant||l,_=t.size||y.size||c,D=t.color||y.color||s,G=(r=t.loading||t.disabled)!=null?r:y.disabled||p||v,F=V.useRef(null),T=sn(F,n),{focusVisible:j,setFocusVisible:Y,getRootProps:z}=zl(O({},i,{disabled:G,rootRef:T})),$=g!=null?g:u.jsx(Ep,{color:D,thickness:{sm:2,md:3,lg:4}[_]||3});V.useImperativeHandle(a,()=>({focusVisible:()=>{var re;Y(!0),(re=F.current)==null||re.focus()}}),[Y]);const B=O({},i,{color:D,fullWidth:d,variant:E,size:_,focusVisible:j,loading:p,loadingPosition:m,disabled:G}),W=k_(B),Q=re=>{var ge;let Se=i.onClick;if(typeof x.root=="function"?Se=x.root(B).onClick:x.root&&(Se=x.root.onClick),(ge=Se)==null||ge(re),A){var Ve;(Ve=A.onClick)==null||Ve.call(A,re,i.value)}};let te=i["aria-pressed"];typeof x.root=="function"?te=x.root(B)["aria-pressed"]:x.root&&(te=x.root["aria-pressed"]),A!=null&&A.value&&(Array.isArray(A.value)?te=A.value.indexOf(i.value)!==-1:te=A.value===i.value);const R=O({},w,{component:S,slots:I,slotProps:x}),[M,U]=Ie("root",{ref:n,className:W.root,elementType:R_,externalForwardedProps:R,getSlotProps:z,ownerState:B,additionalProps:{onClick:Q,"aria-pressed":te}}),[H,ne]=Ie("startDecorator",{className:W.startDecorator,elementType:__,externalForwardedProps:R,ownerState:B}),[se,ae]=Ie("endDecorator",{className:W.endDecorator,elementType:P_,externalForwardedProps:R,ownerState:B}),[X,le]=Ie("loadingIndicatorCenter",{className:W.loadingIndicatorCenter,elementType:D_,externalForwardedProps:R,ownerState:B});return u.jsxs(M,O({},U,{children:[(f||p&&m==="start")&&u.jsx(H,O({},ne,{children:p&&m==="start"?$:f})),o,p&&m==="center"&&u.jsx(X,O({},le,{children:$})),(h||p&&m==="end")&&u.jsx(se,O({},ae,{children:p&&m==="end"?$:h}))]}))});ti.muiName="Button";var Dp={exports:{}};function L_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Oc={exports:{}};const M_=$u(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Op;function Rc(){return Op||(Op=1,function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=n||function(r,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Bt!="undefined"&&Bt.crypto&&(o=Bt.crypto),!o&&typeof L_=="function")try{o=M_}catch(I){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(I){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(I){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function I(){}return function(x){var w;return I.prototype=x,w=new I,I.prototype=null,w}}(),l={},c=l.lib={},d=c.Base=function(){return{extend:function(I){var x=s(this);return I&&x.mixIn(I),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var I=this.extend();return I.init.apply(I,arguments),I},init:function(){},mixIn:function(I){for(var x in I)I.hasOwnProperty(x)&&(this[x]=I[x]);I.hasOwnProperty("toString")&&(this.toString=I.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=c.WordArray=d.extend({init:function(I,x){I=this.words=I||[],x!=i?this.sigBytes=x:this.sigBytes=I.length*4},toString:function(I){return(I||p).stringify(this)},concat:function(I){var x=this.words,w=I.words,y=this.sigBytes,A=I.sigBytes;if(this.clamp(),y%4)for(var E=0;E<A;E++){var _=w[E>>>2]>>>24-E%4*8&255;x[y+E>>>2]|=_<<24-(y+E)%4*8}else for(var D=0;D<A;D+=4)x[y+D>>>2]=w[D>>>2];return this.sigBytes+=A,this},clamp:function(){var I=this.words,x=this.sigBytes;I[x>>>2]&=4294967295<<32-x%4*8,I.length=r.ceil(x/4)},clone:function(){var I=d.clone.call(this);return I.words=this.words.slice(0),I},random:function(I){for(var x=[],w=0;w<I;w+=4)x.push(a());return new f.init(x,I)}}),h=l.enc={},p=h.Hex={stringify:function(I){for(var x=I.words,w=I.sigBytes,y=[],A=0;A<w;A++){var E=x[A>>>2]>>>24-A%4*8&255;y.push((E>>>4).toString(16)),y.push((E&15).toString(16))}return y.join("")},parse:function(I){for(var x=I.length,w=[],y=0;y<x;y+=2)w[y>>>3]|=parseInt(I.substr(y,2),16)<<24-y%8*4;return new f.init(w,x/2)}},m=h.Latin1={stringify:function(I){for(var x=I.words,w=I.sigBytes,y=[],A=0;A<w;A++){var E=x[A>>>2]>>>24-A%4*8&255;y.push(String.fromCharCode(E))}return y.join("")},parse:function(I){for(var x=I.length,w=[],y=0;y<x;y++)w[y>>>2]|=(I.charCodeAt(y)&255)<<24-y%4*8;return new f.init(w,x)}},g=h.Utf8={stringify:function(I){try{return decodeURIComponent(escape(m.stringify(I)))}catch(x){throw new Error("Malformed UTF-8 data")}},parse:function(I){return m.parse(unescape(encodeURIComponent(I)))}},v=c.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(I){typeof I=="string"&&(I=g.parse(I)),this._data.concat(I),this._nDataBytes+=I.sigBytes},_process:function(I){var x,w=this._data,y=w.words,A=w.sigBytes,E=this.blockSize,_=E*4,D=A/_;I?D=r.ceil(D):D=r.max((D|0)-this._minBufferSize,0);var G=D*E,F=r.min(G*4,A);if(G){for(var T=0;T<G;T+=E)this._doProcessBlock(y,T);x=y.splice(0,G),w.sigBytes-=F}return new f.init(x,F)},clone:function(){var I=d.clone.call(this);return I._data=this._data.clone(),I},_minBufferSize:0});c.Hasher=v.extend({cfg:d.extend(),init:function(I){this.cfg=this.cfg.extend(I),this.reset()},reset:function(){v.reset.call(this),this._doReset()},update:function(I){return this._append(I),this._process(),this},finalize:function(I){I&&this._append(I);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(I){return function(x,w){return new I.init(w).finalize(x)}},_createHmacHelper:function(I){return function(x,w){return new S.HMAC.init(I,w).finalize(x)}}});var S=l.algo={};return l}(Math);return n})}(Oc)),Oc.exports}(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(r){var i=n,o=i.lib,a=o.WordArray,s=o.Hasher,l=i.algo,c=[];(function(){for(var g=0;g<64;g++)c[g]=r.abs(r.sin(g+1))*4294967296|0})();var d=l.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,v){for(var S=0;S<16;S++){var I=v+S,x=g[I];g[I]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}var w=this._hash.words,y=g[v+0],A=g[v+1],E=g[v+2],_=g[v+3],D=g[v+4],G=g[v+5],F=g[v+6],T=g[v+7],j=g[v+8],Y=g[v+9],z=g[v+10],$=g[v+11],B=g[v+12],W=g[v+13],Q=g[v+14],te=g[v+15],R=w[0],M=w[1],U=w[2],H=w[3];R=f(R,M,U,H,y,7,c[0]),H=f(H,R,M,U,A,12,c[1]),U=f(U,H,R,M,E,17,c[2]),M=f(M,U,H,R,_,22,c[3]),R=f(R,M,U,H,D,7,c[4]),H=f(H,R,M,U,G,12,c[5]),U=f(U,H,R,M,F,17,c[6]),M=f(M,U,H,R,T,22,c[7]),R=f(R,M,U,H,j,7,c[8]),H=f(H,R,M,U,Y,12,c[9]),U=f(U,H,R,M,z,17,c[10]),M=f(M,U,H,R,$,22,c[11]),R=f(R,M,U,H,B,7,c[12]),H=f(H,R,M,U,W,12,c[13]),U=f(U,H,R,M,Q,17,c[14]),M=f(M,U,H,R,te,22,c[15]),R=h(R,M,U,H,A,5,c[16]),H=h(H,R,M,U,F,9,c[17]),U=h(U,H,R,M,$,14,c[18]),M=h(M,U,H,R,y,20,c[19]),R=h(R,M,U,H,G,5,c[20]),H=h(H,R,M,U,z,9,c[21]),U=h(U,H,R,M,te,14,c[22]),M=h(M,U,H,R,D,20,c[23]),R=h(R,M,U,H,Y,5,c[24]),H=h(H,R,M,U,Q,9,c[25]),U=h(U,H,R,M,_,14,c[26]),M=h(M,U,H,R,j,20,c[27]),R=h(R,M,U,H,W,5,c[28]),H=h(H,R,M,U,E,9,c[29]),U=h(U,H,R,M,T,14,c[30]),M=h(M,U,H,R,B,20,c[31]),R=p(R,M,U,H,G,4,c[32]),H=p(H,R,M,U,j,11,c[33]),U=p(U,H,R,M,$,16,c[34]),M=p(M,U,H,R,Q,23,c[35]),R=p(R,M,U,H,A,4,c[36]),H=p(H,R,M,U,D,11,c[37]),U=p(U,H,R,M,T,16,c[38]),M=p(M,U,H,R,z,23,c[39]),R=p(R,M,U,H,W,4,c[40]),H=p(H,R,M,U,y,11,c[41]),U=p(U,H,R,M,_,16,c[42]),M=p(M,U,H,R,F,23,c[43]),R=p(R,M,U,H,Y,4,c[44]),H=p(H,R,M,U,B,11,c[45]),U=p(U,H,R,M,te,16,c[46]),M=p(M,U,H,R,E,23,c[47]),R=m(R,M,U,H,y,6,c[48]),H=m(H,R,M,U,T,10,c[49]),U=m(U,H,R,M,Q,15,c[50]),M=m(M,U,H,R,G,21,c[51]),R=m(R,M,U,H,B,6,c[52]),H=m(H,R,M,U,_,10,c[53]),U=m(U,H,R,M,z,15,c[54]),M=m(M,U,H,R,A,21,c[55]),R=m(R,M,U,H,j,6,c[56]),H=m(H,R,M,U,te,10,c[57]),U=m(U,H,R,M,F,15,c[58]),M=m(M,U,H,R,W,21,c[59]),R=m(R,M,U,H,D,6,c[60]),H=m(H,R,M,U,$,10,c[61]),U=m(U,H,R,M,E,15,c[62]),M=m(M,U,H,R,Y,21,c[63]),w[0]=w[0]+R|0,w[1]=w[1]+M|0,w[2]=w[2]+U|0,w[3]=w[3]+H|0},_doFinalize:function(){var g=this._data,v=g.words,S=this._nDataBytes*8,I=g.sigBytes*8;v[I>>>5]|=128<<24-I%32;var x=r.floor(S/4294967296),w=S;v[(I+64>>>9<<4)+15]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,v[(I+64>>>9<<4)+14]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,g.sigBytes=(v.length+1)*4,this._process();for(var y=this._hash,A=y.words,E=0;E<4;E++){var _=A[E];A[E]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}return y},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function f(g,v,S,I,x,w,y){var A=g+(v&S|~v&I)+x+y;return(A<<w|A>>>32-w)+v}function h(g,v,S,I,x,w,y){var A=g+(v&I|S&~I)+x+y;return(A<<w|A>>>32-w)+v}function p(g,v,S,I,x,w,y){var A=g+(v^S^I)+x+y;return(A<<w|A>>>32-w)+v}function m(g,v,S,I,x,w,y){var A=g+(S^(v|~I))+x+y;return(A<<w|A>>>32-w)+v}i.MD5=s._createHelper(d),i.HmacMD5=s._createHmacHelper(d)}(Math),n.MD5})})(Dp);var B_=Dp.exports;const Rp=fn(B_);var Lp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,a=o.init,s=o.init=function(l){if(l instanceof ArrayBuffer&&(l=new Uint8Array(l)),(l instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&l instanceof Uint8ClampedArray||l instanceof Int16Array||l instanceof Uint16Array||l instanceof Int32Array||l instanceof Uint32Array||l instanceof Float32Array||l instanceof Float64Array)&&(l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength)),l instanceof Uint8Array){for(var c=l.byteLength,d=[],f=0;f<c;f++)d[f>>>2]|=l[f]<<24-f%4*8;a.call(this,d,c)}else a.apply(this,arguments)};s.prototype=o}}(),n.lib.WordArray})})(Lp);var $_=Lp.exports;const Mp=fn($_);var Bp={exports:{}};(function(e,t){(function(n,r){e.exports=r(Rc())})(Bt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,a=r.enc;a.Base64={stringify:function(l){var c=l.words,d=l.sigBytes,f=this._map;l.clamp();for(var h=[],p=0;p<d;p+=3)for(var m=c[p>>>2]>>>24-p%4*8&255,g=c[p+1>>>2]>>>24-(p+1)%4*8&255,v=c[p+2>>>2]>>>24-(p+2)%4*8&255,S=m<<16|g<<8|v,I=0;I<4&&p+I*.75<d;I++)h.push(f.charAt(S>>>6*(3-I)&63));var x=f.charAt(64);if(x)for(;h.length%4;)h.push(x);return h.join("")},parse:function(l){var c=l.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var h=0;h<d.length;h++)f[d.charCodeAt(h)]=h}var p=d.charAt(64);if(p){var m=l.indexOf(p);m!==-1&&(c=m)}return s(l,c,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(l,c,d){for(var f=[],h=0,p=0;p<c;p++)if(p%4){var m=d[l.charCodeAt(p-1)]<<p%4*2,g=d[l.charCodeAt(p)]>>>6-p%4*2,v=m|g;f[h>>>2]|=v<<24-h%4*8,h++}return o.create(f,h)}}(),n.enc.Base64})})(Bp);var N_=Bp.exports;const F_=fn(N_);class $p{constructor(){ee(this,"readFileAndHash",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),c=Rp(s).toString(F_);n(c)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}));ee(this,"generateHashFileName",t=>new Promise((n,r)=>{const i=new FileReader;i.onload=o=>{const a=o.target.result,s=Mp.create(new Uint8Array(a)),l=Rp(s).toString();n(l)},i.onerror=o=>{r(o)},i.readAsArrayBuffer(t)}))}}const Np=({title:e,open:t,imageSrc:n,toggleModal:r})=>u.jsx(b.Modal,{open:t,onClose:r,children:u.jsxs(b.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(b.ModalClose,{}),u.jsx(b.DialogTitle,{sx:{marginBottom:"10px"},children:e}),u.jsx(b.DialogContent,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx("img",{src:n,alt:"Image modal",style:{maxWidth:"100%",maxHeight:"100%"}})})]})}),Fp=Ue(u.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),ft=()=>{const e=C.useContext(Zo);if(!e)throw new Error("useAPIContext must be used within a APIProvider");return e},z_=Ue(u.jsx("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterList"),j_=({isLoading:e,images:t,onClick:n})=>u.jsxs(u.Fragment,{children:[u.jsx(b.Grid,{container:!0,spacing:2,children:t.map(r=>{var i,o;return u.jsx(b.Grid,{xs:5,sm:4,md:3,children:u.jsxs(b.Box,{sx:{position:"relative",width:"100%","&:hover .overlay":{backgroundColor:"rgba(0, 0, 0, 0.5)",opacity:1},"&:hover .plusSign":{opacity:1}},onClick:()=>{var a,s;return n(((s=(a=r.urls)==null?void 0:a.uploaded)==null?void 0:s.embed)||"")},children:[u.jsx(b.Box,{component:"img",src:(o=(i=r.urls)==null?void 0:i.uploaded)==null?void 0:o.thumbnail,alt:`image-${r.id}`,sx:{width:"100%",height:"auto",borderRadius:"8px"}}),u.jsx(b.Box,{className:"overlay",sx:{position:"absolute",top:0,left:0,right:0,bottom:5,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0)",opacity:0,transition:"background-color 0.3s ease, opacity 0.3s ease",borderRadius:"8px",cursor:"pointer"},children:u.jsx(b.Typography,{className:"plusSign",level:"h2",sx:{color:"white",opacity:0,transition:"opacity 0.3s ease"},children:"+"})})]})},`sportal-image-${r.id}`)})}),e?u.jsx(b.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:u.jsx(b.CircularProgress,{variant:"solid",color:"neutral"})}):u.jsx(u.Fragment,{})]}),U_=Ue(u.jsx("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),V_=Ue(u.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),H_=e=>u.jsx(b.Box,{display:"flex",alignItems:"baseline",flexWrap:"wrap",children:u.jsxs(b.Box,{display:"flex",children:[e.pageCount&&e.pageCount!==1&&u.jsx(b.Button,{variant:"outlined",color:"neutral",startDecorator:u.jsx(U_,{}),onClick:e.getPreviousPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:"4px 0 0 4px",borderRight:0,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.previous}),e.images&&e.images.length===20&&u.jsx(b.Button,{variant:"outlined",color:"neutral",endDecorator:u.jsx(V_,{}),onClick:e.getNextPage,sx:{textTransform:"none",fontSize:"14px",fontWeight:"bold",paddingX:2,paddingY:1,borderRadius:e.pageCount!==1?"0 4px 4px 0":"4px",borderLeft:e.pageCount!==1?0:1,"&:hover":{backgroundColor:"background.level1"}},children:e.labels.next})]})}),ni=Ue(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),W_=Ue(u.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),G_=({color:e})=>e==="warning"?u.jsx(W_,{}):u.jsx(ni,{}),at=e=>u.jsx(b.Snackbar,{anchorOrigin:{vertical:"top",horizontal:"right"},open:e.showToast,onClose:e.hideToast,autoHideDuration:3e3,color:e.color,startDecorator:u.jsx(G_,{color:e.color}),children:e.message},e.message),no=({label:e,defaultValue:t,required:n,onChange:r})=>{const i=o=>{r(o.target.value)};return u.jsxs(b.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{required:n,color:"primary",children:e}),u.jsx(b.Input,{type:"date",defaultValue:t,onChange:i,sx:{backgroundColor:"#fff",borderRadius:"md"}})]})},Y_=({labels:e,showFilters:t,onClick:n})=>u.jsx(b.Tooltip,{title:t?e.hideFilters:e.showFilters,children:u.jsx(b.IconButton,{"aria-label":"Filters",onClick:n,children:u.jsx(z_,{})})}),zp=({labels:e,onChangeImages:t})=>{const[n,r]=C.useState(!1),[i,o]=C.useState(!1),[a,s]=C.useState(!1),[l,c]=C.useState(!1),[d,f]=C.useState(1),[h,p]=C.useState(""),[m,g]=C.useState(null),[v,S]=C.useState([]),{https:I}=ft();C.useEffect(()=>{E()},[d]);const x=()=>c(!l),w=()=>f(D=>D-1),y=()=>f(D=>D+1),A=()=>k(this,null,function*(){if(h){o(!0);const D=m?N({},m):null,G=yield I.fetchImagesFromSportal365(h,D,d);if(G){const F=yield G.json();G.ok?(S(F.data),f(F.meta.pagination.current_page)):(console.error(F),x())}o(!1)}else S([])}),E=()=>k(this,null,function*(){if(h){s(!0),S([]);const D=m&&m.from&&m.to?N({},m):null,G=yield I.fetchImagesFromSportal365(h,D,d);if(G){const F=yield G.json();G.ok?(S(F.data),f(F.meta.pagination.current_page)):(console.error(F),x())}s(!1)}}),_=(D,G)=>{g(F=>F?q(N({},F),{[G]:D}):{[G]:D})};return u.jsxs(u.Fragment,{children:[u.jsxs(b.Box,{sx:{marginBottom:"10px"},children:[u.jsx(b.Input,{value:h,onChange:D=>p(D.target.value),sx:{mb:2,width:"100%"},placeholder:e.searchImage,endDecorator:u.jsx(Y_,{labels:e,showFilters:n,onClick:()=>r(!n)})}),n?u.jsxs(b.Grid,{container:!0,spacing:2,children:[u.jsx(b.Grid,{xs:6,children:u.jsx(no,{label:e.fromDate,defaultValue:m==null?void 0:m.from,required:!1,onChange:D=>_(D,"from")})}),u.jsx(b.Grid,{xs:6,children:u.jsx(no,{label:e.toDate,defaultValue:m==null?void 0:m.to,required:!1,onChange:D=>_(D,"to")})})]}):u.jsx(u.Fragment,{}),u.jsx(b.Button,{onClick:A,sx:{mb:2,backgroundColor:"#ef8b34","&:hover":{backgroundColor:"#d7772e"},"&:active":{backgroundColor:"#c06c29"}},loading:i,children:e.search}),u.jsx(j_,{images:v,isLoading:a,onClick:t}),u.jsx(H_,{labels:e,pageCount:d,images:v,getPreviousPage:w,getNextPage:y})]}),u.jsx(at,{showToast:l,message:e.searchSportal365ImagesErrorMessage,color:"danger",hideToast:x})]})},jp=Ue(u.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"Loupe"),Up=b.styled("input")`
|
|
2351
2351
|
clip: rect(0 0 0 0);
|
|
2352
2352
|
clip-path: inset(50%);
|
|
2353
2353
|
height: 1px;
|
|
@@ -2357,7 +2357,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
2357
2357
|
left: 0;
|
|
2358
2358
|
white-space: nowrap;
|
|
2359
2359
|
width: 1px;
|
|
2360
|
-
`;var Vp=!1,Cr,Lc,Mc,Ga,Ya,Hp,Ka,Bc,$c,Nc,Wp,Fc,zc,Gp,Yp;function Ft(){if(!Vp){Vp=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Fc=/\b(iPhone|iP[ao]d)/.exec(e),zc=/\b(iP[ao]d)/.exec(e),Nc=/Android/i.exec(e),Gp=/FBAN\/\w+;/i.exec(e),Yp=/Mobile/i.exec(e),Wp=!!/Win64/.exec(e),t){Cr=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Cr&&document&&document.documentMode&&(Cr=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Hp=r?parseFloat(r[1])+4:Cr,Lc=t[2]?parseFloat(t[2]):NaN,Mc=t[3]?parseFloat(t[3]):NaN,Ga=t[4]?parseFloat(t[4]):NaN,Ga?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Ya=t&&t[1]?parseFloat(t[1]):NaN):Ya=NaN}else Cr=Lc=Mc=Ya=Ga=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Ka=i?parseFloat(i[1].replace("_",".")):!0}else Ka=!1;Bc=!!n[2],$c=!!n[3]}else Ka=Bc=$c=!1}}var jc={ie:function(){return Ft()||Cr},ieCompatibilityMode:function(){return Ft()||Hp>Cr},ie64:function(){return jc.ie()&&Wp},firefox:function(){return Ft()||Lc},opera:function(){return Ft()||Mc},webkit:function(){return Ft()||Ga},safari:function(){return jc.webkit()},chrome:function(){return Ft()||Ya},windows:function(){return Ft()||Bc},osx:function(){return Ft()||Ka},linux:function(){return Ft()||$c},iphone:function(){return Ft()||Fc},mobile:function(){return Ft()||Fc||zc||Nc||Yp},nativeApp:function(){return Ft()||Gp},android:function(){return Ft()||Nc},ipad:function(){return Ft()||zc}},K_=jc,
|
|
2360
|
+
`;var Vp=!1,Cr,Lc,Mc,Ga,Ya,Hp,Ka,Bc,$c,Nc,Wp,Fc,zc,Gp,Yp;function Ft(){if(!Vp){Vp=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Fc=/\b(iPhone|iP[ao]d)/.exec(e),zc=/\b(iP[ao]d)/.exec(e),Nc=/Android/i.exec(e),Gp=/FBAN\/\w+;/i.exec(e),Yp=/Mobile/i.exec(e),Wp=!!/Win64/.exec(e),t){Cr=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Cr&&document&&document.documentMode&&(Cr=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Hp=r?parseFloat(r[1])+4:Cr,Lc=t[2]?parseFloat(t[2]):NaN,Mc=t[3]?parseFloat(t[3]):NaN,Ga=t[4]?parseFloat(t[4]):NaN,Ga?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Ya=t&&t[1]?parseFloat(t[1]):NaN):Ya=NaN}else Cr=Lc=Mc=Ya=Ga=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Ka=i?parseFloat(i[1].replace("_",".")):!0}else Ka=!1;Bc=!!n[2],$c=!!n[3]}else Ka=Bc=$c=!1}}var jc={ie:function(){return Ft()||Cr},ieCompatibilityMode:function(){return Ft()||Hp>Cr},ie64:function(){return jc.ie()&&Wp},firefox:function(){return Ft()||Lc},opera:function(){return Ft()||Mc},webkit:function(){return Ft()||Ga},safari:function(){return jc.webkit()},chrome:function(){return Ft()||Ya},windows:function(){return Ft()||Bc},osx:function(){return Ft()||Ka},linux:function(){return Ft()||$c},iphone:function(){return Ft()||Fc},mobile:function(){return Ft()||Fc||zc||Nc||Yp},nativeApp:function(){return Ft()||Gp},android:function(){return Ft()||Nc},ipad:function(){return Ft()||zc}},K_=jc,Qa=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Q_={canUseDOM:Qa,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:Qa&&!!(window.addEventListener||window.attachEvent),canUseViewport:Qa&&!!window.screen,isInWorker:!Qa},q_=Q_,Kp=q_,Qp;Kp.canUseDOM&&(Qp=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/**
|
|
2361
2361
|
* Checks if an event is supported in the current execution environment.
|
|
2362
2362
|
*
|
|
2363
2363
|
* NOTE: This will not work correctly for non-generic events such as `change`,
|
|
@@ -2370,7 +2370,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
2370
2370
|
* @return {boolean} True if the event is supported.
|
|
2371
2371
|
* @internal
|
|
2372
2372
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
2373
|
-
*/function J_(e,t){if(!Kp.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&
|
|
2373
|
+
*/function J_(e,t){if(!Kp.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&Qp&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var X_=J_,Z_=K_,eP=X_,qp=10,Jp=40,Xp=800;function Zp(e){var t=0,n=0,r=0,i=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*qp,i=n*qp,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(e.deltaMode==1?(r*=Jp,i*=Jp):(r*=Xp,i*=Xp)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}}Zp.getEventType=function(){return Z_.firefox()?"DOMMouseScroll":eP("wheel")?"wheel":"mousewheel"};var tP=Zp,nP=tP;const rP=fn(nP);function iP(e,t,n,r,i,o){o===void 0&&(o=0);var a=ri(e,t,o),s=a.width,l=a.height,c=Math.min(s,n),d=Math.min(l,r);return c>d*i?{width:d*i,height:d}:{width:c,height:c/i}}function oP(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function qa(e,t,n,r,i){i===void 0&&(i=0);var o=ri(t.width,t.height,i),a=o.width,s=o.height;return{x:eg(e.x,a,n.width,r),y:eg(e.y,s,n.height,r)}}function eg(e,t,n,r){var i=t*r/2-n/2;return Ja(e,-i,i)}function tg(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function ng(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function aP(e,t,n,r,i,o,a){o===void 0&&(o=0),a===void 0&&(a=!0);var s=a?sP:lP,l=ri(t.width,t.height,o),c=ri(t.naturalWidth,t.naturalHeight,o),d={x:s(100,((l.width-n.width/i)/2-e.x/i)/l.width*100),y:s(100,((l.height-n.height/i)/2-e.y/i)/l.height*100),width:s(100,n.width/l.width*100/i),height:s(100,n.height/l.height*100/i)},f=Math.round(s(c.width,d.width*c.width/100)),h=Math.round(s(c.height,d.height*c.height/100)),p=c.width>=c.height*r,m=p?{width:Math.round(h*r),height:h}:{width:f,height:Math.round(f/r)},g=At(At({},m),{x:Math.round(s(c.width-m.width,d.x*c.width/100)),y:Math.round(s(c.height-m.height,d.y*c.height/100))});return{croppedAreaPercentages:d,croppedAreaPixels:g}}function sP(e,t){return Math.min(e,Math.max(0,t))}function lP(e,t){return t}function cP(e,t,n,r,i,o){var a=ri(t.width,t.height,n),s=Ja(r.width/a.width*(100/e.width),i,o),l={x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)};return{crop:l,zoom:s}}function uP(e,t,n){var r=oP(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function dP(e,t,n,r,i,o){n===void 0&&(n=0);var a=ri(t.naturalWidth,t.naturalHeight,n),s=Ja(uP(e,t,r),i,o),l=r.height>r.width?r.height/e.height:r.width/e.width,c={x:((a.width-e.width)/2-e.x)*l,y:((a.height-e.height)/2-e.y)*l};return{crop:c,zoom:s}}function rg(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function fP(e){return e*Math.PI/180}function ri(e,t,n){var r=fP(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Ja(e,t,n){return Math.min(Math.max(e,t),n)}function Xa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(n){return typeof n=="string"&&n.length>0}).join(" ").trim()}var hP=`.reactEasyCrop_Container {
|
|
2374
2374
|
position: absolute;
|
|
2375
2375
|
top: 0;
|
|
2376
2376
|
left: 0;
|
|
@@ -2450,17 +2450,17 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
2450
2450
|
border-left: 0;
|
|
2451
2451
|
border-right: 0;
|
|
2452
2452
|
}
|
|
2453
|
-
`,pP=1,gP=3,mP=function(e){ay(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=V.createRef(),n.videoRef=V.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=cP(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,a=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}else if(n.props.initialCroppedAreaPixels){var s=dP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=s.crop,a=s.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,s,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,p=c.offsetWidth<f||c.offsetHeight<h,m=f/h,g=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":g=d>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":g={width:n.containerRect.height*m,height:n.containerRect.height};break}else g={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:iP(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==v.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==v.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(v),n.setState({cropSize:v},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(v),v}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,s=r.y;n.dragStartPosition={x:a,y:s},n.dragStartCrop=At({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var a=i-n.dragStartPosition.x,s=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+s},c=n.props.restrictPosition?Qa(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=rP(r).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(a-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,a=n.props,s=a.crop,l=a.zoom;return{x:(i+s.x)/l,y:(o+s.y)/l}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,s=a.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=Ja(r,n.props.minZoom,n.props.maxZoom);if(l){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=n.props.restrictPosition?Qa(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?Qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return aP(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?Qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver=="undefined"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=hP,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver=="undefined"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,a,s,l,c,d,f;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var a=this.imageRef.current||this.videoRef.current;if(a&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,d=l/c;return d<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=tg(r,i),this.lastPinchRotation=ng(r,i),this.onDragStart(rg(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),a=rg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=tg(i,o),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var c=ng(i,o),d=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=c})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,s=i.mediaProps,l=i.transform,c=i.crop,d=c.x,f=c.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,v=i.style,S=v.containerStyle,I=v.cropAreaStyle,x=v.mediaStyle,w=i.classes,y=w.containerClassName,A=w.cropAreaClassName,E=w.mediaClassName,_=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return V.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:S,className:Xa("reactEasyCrop_Container",y)},o?V.createElement("img",At({alt:"",className:Xa("reactEasyCrop_Image",_==="contain"&&"reactEasyCrop_Contain",_==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",_==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:o,ref:this.imageRef,style:At(At({},x),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&V.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Xa("reactEasyCrop_Video",_==="contain"&&"reactEasyCrop_Contain",_==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",_==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},x),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(D){return V.createElement("source",At({key:D.src},D))})),this.state.cropSize&&V.createElement("div",{style:At(At({},I),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Xa("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:gP,minZoom:pP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(V.Component);const vP=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.crossOrigin="Anonymous",r.src=e});function bP(e){return e*Math.PI/180}function yP(e,t,n=0){return k(this,null,function*(){const r=yield vP(e),i=document.createElement("canvas"),o=i.getContext("2d"),s=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=s,i.height=s,o.translate(s/2,s/2),o.rotate(bP(n)),o.translate(-s/2,-s/2),o.drawImage(r,s/2-r.width*.5,s/2-r.height*.5);const l=o.getImageData(0,0,s,s);return i.width=t.width,i.height=t.height,o.putImageData(l,Math.round(0-s/2+r.width*.5-t.x),Math.round(0-s/2+r.height*.5-t.y)),new Promise(c=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});c(f)},"image/jpeg"))})}const ig=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,s]=C.useState({x:0,y:0}),[l,c]=C.useState(1),[d,f]=C.useState(16/9),[h,p]=C.useState(null),m=(x,w)=>{p(w)},g=(x,w)=>f(w),v=()=>k(this,null,function*(){const x=yield yP(n,h);I(),o(x)}),S=()=>{I(),r()},I=()=>{s({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(b.Modal,{open:t,onClose:i,children:u.jsxs(b.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(b.ModalClose,{}),u.jsx(b.DialogTitle,{children:e.cropImage}),u.jsxs(b.DialogContent,{sx:{width:"100%"},children:[u.jsx(b.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(mP,{image:n,crop:a,zoom:l,aspect:d,onCropChange:s,onCropComplete:m,onZoomChange:c})}),u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(b.Select,{value:d,onChange:g,children:[u.jsx(b.Option,{value:4/3,children:"4 / 3"}),u.jsx(b.Option,{value:16/9,children:"16 / 9"}),u.jsx(b.Option,{value:1,children:"1"})]})]}),u.jsx(b.Box,{mb:1,mx:2,children:u.jsx(b.Slider,{value:l,min:1,max:3,step:.1,onChange:(x,w)=>c(w)})}),u.jsxs(b.DialogActions,{children:[u.jsx(b.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(b.Button,{color:"primary",variant:"outlined",onClick:S,loading:!1,children:e.reset})]})]})]})})},og=Ue(u.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),ag=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=C.useState(!1),[s,l]=C.useState(!1),[c,d]=C.useState(!1),[f,h]=C.useState(!1),[p,m]=C.useState(""),[g,v]=C.useState("primary"),[S,I]=C.useState(""),x=C.useRef(null),w=()=>h(!f),y=()=>{x.current&&x.current.click()},A=new $p,E=C.useContext(Zo),_=()=>{m(""),l(!1)},D=B=>{let W="",q="primary";switch(B){case"copy_url":W=e.urlCopiedToClipboardMessage,q="primary";break;case"image_deleted":W=e.imageDeletedMessage,q="primary";break;case"image_reset":W=e.imageResetMessage,q="primary";break;case"upload_success":W=e.uploadingImageMessage,q="success";break;case"upload_failed":W=e.uploadingImageErrorMessage,q="danger";break;case"sign_in_url_failed":W=e.generateSignedInUrlErrorMessage,q="danger";break;case"encrypting_file_failed":W=e.encryptingImageErrorMessage,q="danger";break}v(q),m(W),l(!0)},G=()=>d(!c),F=()=>{i(),D("image_deleted")},T=B=>{navigator.clipboard.writeText(B),D("copy_url")},j=B=>k(this,null,function*(){B.persist();const W=B.target.files?B.target.files[0]:null;if(W){a(!0);try{const q=W.type.split("/")[1],ee=yield A.readFileAndHash(W),R=(yield A.generateHashFileName(W))+"."+q,M={image_type:q,image_file_name:R,image_size:W.size,base64_sum:ee},U=yield E==null?void 0:E.https.generateSignedInUrl(M);if(U!=null&&U.ok){const H=yield U.json(),ne={"Content-Type":W.type,"Content-MD5":ee};try{const se=new File([W],R,{type:W.type}),ae=yield E==null?void 0:E.https.storeInBucket(H.data.signed_url,se,ne);r(ae||""),I(ae),D("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),D("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),D("sign_in_url_failed")}catch(q){console.error("There was a problem with encrypting file...",q),D("encrypting_file_failed")}a(!1)}}),Y=B=>k(this,null,function*(){if(B){a(!0);try{const W=B.type.split("/")[1],q=yield A.readFileAndHash(B),ee=(yield A.generateHashFileName(B))+"."+W,R={image_type:W,image_file_name:ee,image_size:B.size,base64_sum:q},M=yield E==null?void 0:E.https.generateSignedInUrl(R);if(M!=null&&M.ok){const U=yield M.json(),H={"Content-Type":B.type,"Content-MD5":q};try{const ne=new File([B],ee,{type:B.type}),se=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,ne,H);r(se||""),D("upload_success")}catch(ne){console.error("There was a problem with uploading the file: ",ne),D("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield M==null?void 0:M.json()),D("sign_in_url_failed")}catch(W){console.error("There was a problem with encrypting file...",W),D("encrypting_file_failed")}a(!1)}}),z=()=>{r(S),D("image_reset")},$=B=>{r(B),I(B)};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:t}),u.jsx(b.Tooltip,{title:e.clearImage,children:u.jsx(b.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:F,children:u.jsx(Ap,{})})})]}),u.jsxs(b.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(b.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(b.Box,{component:"img",src:n,loading:"lazy",alt:t,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}}),n?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(Fp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(b.Tooltip,{title:e.copyUrl,children:u.jsx(ti,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Oe.ContentCopy,{})})}),u.jsx(b.Tooltip,{title:e.viewImage,children:u.jsx(ti,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(jp,{})})}),u.jsx(b.Tooltip,{title:e.cropImage,children:u.jsx(ti,{onClick:w,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(og,{})})})]}),u.jsx(b.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(ti,{sx:{width:"100%"},onClick:y,children:[u.jsx(Oe.Upload,{})," ",e.uploadImage,u.jsx(Up,{type:"file",accept:"image/*",onChange:j,ref:x})]})}),E!=null&&E.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.sportal365Images})}),u.jsx(b.AccordionDetails,{children:u.jsx(zp,{labels:e,onChangeImages:$})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(at,{showToast:s,message:p,color:g,hideToast:_}),u.jsx(Np,{title:e.viewImage,open:c,imageSrc:n,toggleModal:G}),u.jsx(ig,{labels:e,open:f,imageSrc:n,toggleModal:w,uploadImage:Y,resetDefaultImageUrl:z})]})},xP=e=>new Map().set("main_logo",e.mainLogo).set("mobile_logo",e.mobileLogo).set("background_image",e.backgroundImage).set("mobile_background_image",e.mobileBackgroundImage).set("additional_image",e.additionalImage),CP=e=>new Map().set("primary_color",e.primaryColor).set("secondary_color",e.secondaryColor).set("content_color",e.contentColor).set("background_color",e.backgroundColor).set("border_color",e.borderColor).set("additional_color",e.additionalColor),wP=e=>new Map().set("primary_url",e.primaryUrl).set("secondary_url",e.secondaryUrl).set("privacy_policy_url",e.privacyPolicyUrl).set("terms_and_conditions_url",e.termsAndConditionsUrl).set("additional_url",e.additionalUrl),IP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=C.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],s=xP(e),l=CP(e),c=wP(e),d=(m,g)=>{const v=m.target.value;o.colors[g]=v,n(o)},f=(m,g)=>{const v=m.target.value;o.urls[g]=v,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return u.jsx(b.Box,{children:u.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[u.jsxs(Hr,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(Pc,{sx:{width:"20px"}})}),e.images]}),u.jsxs(Hr,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(Kk,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(Hr,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(qk,{sx:{width:"20px"}})}),e.urls]})]}),u.jsxs(Zr,{value:0,sx:{px:0},children:[u.jsx(ag,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(b.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(m=>u.jsx(ag,{labels:e,title:s.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Zr,{value:1,sx:{px:0},children:u.jsx(b.Box,{children:Object.keys(o.colors).map(m=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{size:"sm",label:l.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),u.jsx(Zr,{value:2,sx:{px:0},children:u.jsx(b.Box,{children:Object.keys(o.urls).map(m=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{size:"sm",label:c.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Uc=Ue(u.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutlineOutlined"),sg=e=>{const t=()=>k(this,null,function*(){yield Ui(e.environment).signOut()});return u.jsx(b.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},SP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>u.jsx(u.Fragment,{children:u.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(b.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(b.Button,{startDecorator:u.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(b.Button,{startDecorator:u.jsx(Uc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(b.Button,{startDecorator:u.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(sg,{signOutLabel:n,environment:r}):u.jsx(u.Fragment,{})]})});var lg={},Vc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ii={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},ro={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},zt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},rn=function(e){return e===!0?1:0};function cg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Hc=function(e){return e instanceof Array?e:[e]};function Ot(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function Le(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function Za(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ug(e,t){if(t(e))return e;if(e.parentNode)return ug(e.parentNode,t)}function es(e,t){var n=Le("div","numInputWrapper"),r=Le("input","numInput "+e),i=Le("span","arrowUp"),o=Le("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Yt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Wc=function(){},ts=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},AP={D:Wc,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*rn(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Wc,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Wc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},wr={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},io={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[io.w(e,t,n)]},F:function(e,t,n){return ts(io.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(io.h(e,t,n))},H:function(e){return zt(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[rn(e.getHours()>11)]},M:function(e,t){return ts(e.getMonth(),!0,t)},S:function(e){return zt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return zt(e.getFullYear(),4)},d:function(e){return zt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return zt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return zt(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},dg=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?ro:r,o=e.isMobile,a=o===void 0?!1:o;return function(s,l,c){var d=c||i;return n.formatDate!==void 0&&!a?n.formatDate(s,l,d):l.split("").map(function(f,h,p){return io[f]&&p[h-1]!=="\\"?io[f](s,d,n):f!=="\\"?f:""}).join("")}},Gc=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?ro:r;return function(o,a,s,l){if(!(o!==0&&!o)){var c=l||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=a||(n||ii).dateFormat,p=String(o).trim();if(p==="today")d=new Date,s=!0;else if(n&&n.parseDate)d=n.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,g=[],v=0,S=0,I="";v<h.length;v++){var x=h[v],w=x==="\\",y=h[v-1]==="\\"||w;if(wr[x]&&!y){I+=wr[x];var A=new RegExp(I).exec(o);A&&(m=!0)&&g[x!=="Y"?"push":"unshift"]({fn:AP[x],val:A[++S]})}else w||(I+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(E){var _=E.fn,D=E.val;return d=_(d,D,c)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&d.setHours(0,0,0,0),d}}};function Kt(e,t,n){return n===void 0&&(n=!0),n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var TP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},Yc=function(e,t,n){return e*3600+t*60+n},EP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},kP={DAY:864e5};function Kc(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),l=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(l,n)),t===s&&n===l&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(l){return e[l]=s[l]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Et=function(){return Et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Et.apply(this,arguments)},fg=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},_P=300;function PP(e,t){var n={config:Et(Et({},ii),ht.defaultConfig),l10n:ro};n.parseDate=Gc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=xe,n.changeMonth=R,n.changeYear=ae,n.clear=M,n.close=U,n.onMouseOver=Se,n._createElement=Le,n.createDay=A,n.destroy=H,n.isEnabled=X,n.jumpToDate=I,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=qt,n.toggle=Lu;function r(){n.utils={getDaysInMonth:function(P,L){return P===void 0&&(P=n.currentMonth),L===void 0&&(L=n.currentYear),P===1&&(L%4===0&&L%100!==0||L%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,_t(),he(),In(),Rs(),r(),n.isMobile||y(),S(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),s();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&xe(),ze("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function s(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var L=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=L+"px",n.calendarContainer.style.width=L+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function l(P){if(n.selectedDates.length===0){var L=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=Kc(n.config);L.setHours(K.hours,K.minutes,K.seconds,L.getMilliseconds()),n.selectedDates=[L],n.latestSelectedDateObj=L}P!==void 0&&P.type!=="blur"&&Ct(P);var J=n._input.value;f(),un(),n._input.value!==J&&n._debouncedChange()}function c(P,L){return P%12+12*rn(L===n.l10n.amPM[1])}function d(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,L=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=c(P,n.amPM.textContent));var J=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,ie=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ce=Yc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=Yc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=Yc(P,L,K);if(ue>Ce&&ue<ce){var we=EP(ce);P=we[0],L=we[1],K=we[2]}}else{if(ie){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,fe.getHours()),P===fe.getHours()&&(L=Math.min(L,fe.getMinutes())),L===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(J){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,me.getHours()),P===me.getHours()&&L<me.getMinutes()&&(L=me.getMinutes()),L===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(P,L,K)}}function h(P){var L=P||n.latestSelectedDateObj;L&&L instanceof Date&&p(L.getHours(),L.getMinutes(),L.getSeconds())}function p(P,L,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,L,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?P:(12+P)%12+12*rn(P%12===0)),n.minuteElement.value=zt(L),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(P){var L=Yt(P),K=parseInt(L.value)+(P.delta||0);(K/1e3>1||P.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(P,L,K,J){if(L instanceof Array)return L.forEach(function(ie){return g(P,ie,K,J)});if(P instanceof Array)return P.forEach(function(ie){return g(ie,L,K,J)});P.addEventListener(L,K,J),n._handlers.push({remove:function(){return P.removeEventListener(L,K,J)}})}function v(){ze("onChange")}function S(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(J){return g(J,"click",n[K])})}),n.isMobile){Ru();return}var P=cg(Ve,50);if(n._debouncedChange=cg(v,_P),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),g(n._input,"keydown",ge),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&g(window,"resize",P),window.ontouchstart!==void 0?g(window.document,"touchstart",se):g(window.document,"mousedown",se),g(window.document,"focus",se,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",Ms),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var L=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],l),g(n.timeContainer,"blur",l,{capture:!0}),g(n.timeContainer,"click",x),g([n.hourElement,n.minuteElement],["focus","click"],L),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(K){l(K)})}n.config.allowInput&&g(n._input,"blur",re)}function I(P,L){var K=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),J=n.currentYear,ie=n.currentMonth;try{K!==void 0&&(n.currentYear=K.getFullYear(),n.currentMonth=K.getMonth())}catch(ce){ce.message="Invalid date supplied: "+K,n.config.errorHandler(ce)}L&&n.currentYear!==J&&(ze("onYearChange"),j()),L&&(n.currentYear!==J||n.currentMonth!==ie)&&ze("onMonthChange"),n.redraw()}function x(P){var L=Yt(P);~L.className.indexOf("arrow")&&w(P,L.classList.contains("arrowUp")?1:-1)}function w(P,L,K){var J=P&&Yt(P),ie=K||J&&J.parentNode&&J.parentNode.firstChild,ce=mi("increment");ce.delta=L,ie&&ie.dispatchEvent(ce)}function y(){var P=window.document.createDocumentFragment();if(n.calendarContainer=Le("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild($()),n.innerContainer=Le("div","flatpickr-innerContainer"),n.config.weekNumbers){var L=ee(),K=L.weekWrapper,J=L.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=J,n.weekWrapper=K}n.rContainer=Le("div","flatpickr-rContainer"),n.rContainer.appendChild(W()),n.daysContainer||(n.daysContainer=Le("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(B()),Ot(n.calendarContainer,"rangeMode",n.config.mode==="range"),Ot(n.calendarContainer,"animate",n.config.animate===!0),Ot(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var ie=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!ie&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ce=Le("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ce,n.element),ce.appendChild(n.element),n.altInput&&ce.appendChild(n.altInput),ce.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,L,K,J){var ie=X(L,!0),ce=Le("span",P,L.getDate().toString());return ce.dateObj=L,ce.$i=J,ce.setAttribute("aria-label",n.formatDate(L,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Kt(L,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),ie?(ce.tabIndex=-1,So(L)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(L,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(L,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Ls(L)&&!So(L)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&J%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(L)+"</span>"),ze("onDayCreate",ce),ce}function E(P){P.focus(),n.config.mode==="range"&&Se(P)}function _(P){for(var L=P>0?0:n.config.showMonths-1,K=P>0?n.config.showMonths:-1,J=L;J!=K;J+=P)for(var ie=n.daysContainer.children[J],ce=P>0?0:ie.children.length-1,Ce=P>0?ie.children.length:-1,ue=ce;ue!=Ce;ue+=P){var we=ie.children[ue];if(we.className.indexOf("hidden")===-1&&X(we.dateObj))return we}}function D(P,L){for(var K=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,J=L>0?n.config.showMonths:-1,ie=L>0?1:-1,ce=K-n.currentMonth;ce!=J;ce+=ie)for(var Ce=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?P.$i+L:L<0?Ce.children.length-1:0,we=Ce.children.length,fe=ue;fe>=0&&fe<we&&fe!=(L>0?we:-1);fe+=ie){var me=Ce.children[fe];if(me.className.indexOf("hidden")===-1&&X(me.dateObj)&&Math.abs(P.$i-fe)>=Math.abs(L))return E(me)}n.changeMonth(ie),G(_(ie),0)}function G(P,L){var K=o(),J=le(K||document.body),ie=P!==void 0?P:J?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:_(L>0?1:-1);ie===void 0?n._input.focus():J?D(ie,L):E(ie)}function F(P,L){for(var K=(new Date(P,L,1).getDay()-n.l10n.firstDayOfWeek+7)%7,J=n.utils.getDaysInMonth((L-1+12)%12,P),ie=n.utils.getDaysInMonth(L,P),ce=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,ue=Ce?"prevMonthDay hidden":"prevMonthDay",we=Ce?"nextMonthDay hidden":"nextMonthDay",fe=J+1-K,me=0;fe<=J;fe++,me++)ce.appendChild(A("flatpickr-day "+ue,new Date(P,L-1,fe),fe,me));for(fe=1;fe<=ie;fe++,me++)ce.appendChild(A("flatpickr-day",new Date(P,L,fe),fe,me));for(var De=ie+1;De<=42-K&&(n.config.showMonths===1||me%7!==0);De++,me++)ce.appendChild(A("flatpickr-day "+we,new Date(P,L+1,De%ie),De,me));var Pt=Le("div","dayContainer");return Pt.appendChild(ce),Pt}function T(){if(n.daysContainer!==void 0){Za(n.daysContainer),n.weekNumbers&&Za(n.weekNumbers);for(var P=document.createDocumentFragment(),L=0;L<n.config.showMonths;L++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+L),P.appendChild(F(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function j(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(J){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&J<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&J>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var L=0;L<12;L++)if(P(L)){var K=Le("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,L).getMonth().toString(),K.textContent=ts(L,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===L&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function Y(){var P=Le("div","flatpickr-month"),L=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Le("span","cur-month"):(n.monthsDropdownContainer=Le("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Ce){var ue=Yt(Ce),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),j(),K=n.monthsDropdownContainer);var J=es("cur-year",{tabindex:"-1"}),ie=J.getElementsByTagName("input")[0];ie.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&ie.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ie.setAttribute("max",n.config.maxDate.getFullYear().toString()),ie.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Le("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(J),L.appendChild(ce),P.appendChild(L),{container:P,yearElement:ie,monthElement:K}}function z(){Za(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var L=Y();n.yearElements.push(L.yearElement),n.monthElements.push(L.monthElement),n.monthNav.appendChild(L.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Le("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Le("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Le("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,z(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&(Ot(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&(Ot(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],vi(),n.monthNav}function B(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=Kc(n.config);n.timeContainer=Le("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var L=Le("span","flatpickr-time-separator",":"),K=es("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var J=es("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=J.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:d(P.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(K),n.timeContainer.appendChild(L),n.timeContainer.appendChild(J),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var ie=es("flatpickr-second");n.secondElement=ie.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(Le("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(ie)}return n.config.time_24hr||(n.amPM=Le("span","flatpickr-am-pm",n.l10n.amPM[rn((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function W(){n.weekdayContainer?Za(n.weekdayContainer):n.weekdayContainer=Le("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var L=Le("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(L)}return q(),n.weekdayContainer}function q(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,L=fg(n.l10n.weekdays.shorthand);P>0&&P<L.length&&(L=fg(L.splice(P,L.length),L.splice(0,P)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2453
|
+
`,pP=1,gP=3,mP=function(e){ay(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.imageRef=V.createRef(),n.videoRef=V.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document!="undefined"?document:null,n.currentWindow=typeof window!="undefined"?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(typeof window.ResizeObserver=="undefined"||!n.containerRef)){var r=!0;n.resizeObserver=new window.ResizeObserver(function(i){if(r){r=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(r){return r.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var r=n.computeSizes();r&&(n.emitCropData(),n.setInitialCrop(r)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(r){if(n.props.initialCroppedAreaPercentages){var i=cP(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=i.crop,a=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}else if(n.props.initialCroppedAreaPixels){var s=dP(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,r,n.props.minZoom,n.props.maxZoom),o=s.crop,a=s.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(a)}},n.computeSizes=function(){var r,i,o,a,s,l,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var d=n.containerRect.width/n.containerRect.height,f=((r=n.imageRef.current)===null||r===void 0?void 0:r.naturalWidth)||((i=n.videoRef.current)===null||i===void 0?void 0:i.videoWidth)||0,h=((o=n.imageRef.current)===null||o===void 0?void 0:o.naturalHeight)||((a=n.videoRef.current)===null||a===void 0?void 0:a.videoHeight)||0,p=c.offsetWidth<f||c.offsetHeight<h,m=f/h,g=void 0;if(p)switch(n.state.mediaObjectFit){default:case"contain":g=d>m?{width:n.containerRect.height*m,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/m};break;case"horizontal-cover":g={width:n.containerRect.width,height:n.containerRect.width/m};break;case"vertical-cover":g={width:n.containerRect.height*m,height:n.containerRect.height};break}else g={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=At(At({},g),{naturalWidth:f,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var v=n.props.cropSize?n.props.cropSize:iP(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(((s=n.state.cropSize)===null||s===void 0?void 0:s.height)!==v.height||((l=n.state.cropSize)===null||l===void 0?void 0:l.width)!==v.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(v),n.setState({cropSize:v},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(v),v}},n.saveContainerPosition=function(){if(n.containerRef){var r=n.containerRef.getBoundingClientRect();n.containerPosition={x:r.left,y:r.top}}},n.onMouseDown=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(r)))},n.onMouseMove=function(r){return n.onDrag(t.getMousePoint(r))},n.onScroll=function(r){n.currentDoc&&(r.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(r){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(r))&&(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),r.touches.length===2?n.onPinchStart(r):r.touches.length===1&&n.onDragStart(t.getTouchPoint(r.touches[0]))))},n.onTouchMove=function(r){r.preventDefault(),r.touches.length===2?n.onPinchMove(r):r.touches.length===1&&n.onDrag(t.getTouchPoint(r.touches[0]))},n.onGestureStart=function(r){n.currentDoc&&(r.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(r){if(r.preventDefault(),!n.isTouching){var i=t.getMousePoint(r),o=n.gestureZoomStart-1+r.scale;if(n.setNewZoom(o,i,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+r.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(r){n.cleanEvents()},n.onDragStart=function(r){var i,o,a=r.x,s=r.y;n.dragStartPosition={x:a,y:s},n.dragStartCrop=At({},n.props.crop),(o=(i=n.props).onInteractionStart)===null||o===void 0||o.call(i)},n.onDrag=function(r){var i=r.x,o=r.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(i===void 0||o===void 0)){var a=i-n.dragStartPosition.x,s=o-n.dragStartPosition.y,l={x:n.dragStartCrop.x+a,y:n.dragStartCrop.y+s},c=n.props.restrictPosition?qa(l,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):l;n.props.onCropChange(c)}}))},n.onDragStopped=function(){var r,i;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(i=(r=n.props).onInteractionEnd)===null||i===void 0||i.call(r)},n.onWheel=function(r){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(r))){r.preventDefault();var i=t.getMousePoint(r),o=rP(r).pixelY,a=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(a,i,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var s,l;return(l=(s=n.props).onInteractionStart)===null||l===void 0?void 0:l.call(s)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var s,l;return(l=(s=n.props).onInteractionEnd)===null||l===void 0?void 0:l.call(s)})},250)}},n.getPointOnContainer=function(r,i){var o=r.x,a=r.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-i.x),y:n.containerRect.height/2-(a-i.y)}},n.getPointOnMedia=function(r){var i=r.x,o=r.y,a=n.props,s=a.crop,l=a.zoom;return{x:(i+s.x)/l,y:(o+s.y)/l}},n.setNewZoom=function(r,i,o){var a=o===void 0?{}:o,s=a.shouldUpdatePosition,l=s===void 0?!0:s;if(!(!n.state.cropSize||!n.props.onZoomChange)){var c=Ja(r,n.props.minZoom,n.props.maxZoom);if(l){var d=n.getPointOnContainer(i,n.containerPosition),f=n.getPointOnMedia(d),h={x:f.x*c-d.x,y:f.y*c-d.y},p=n.props.restrictPosition?qa(h,n.mediaSize,n.state.cropSize,c,n.props.rotation):h;n.props.onCropChange(p)}n.props.onZoomChange(c)}},n.getCropData=function(){if(!n.state.cropSize)return null;var r=n.props.restrictPosition?qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;return aP(r,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition)},n.emitCropData=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(i,o),n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.emitCropAreaChange=function(){var r=n.getCropData();if(r){var i=r.croppedAreaPercentages,o=r.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(i,o)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var r=n.props.restrictPosition?qa(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(r),n.emitCropData()}},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),typeof window.ResizeObserver=="undefined"&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=hP,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var n,r;!this.currentDoc||!this.currentWindow||(typeof window.ResizeObserver=="undefined"&&this.currentWindow.removeEventListener("resize",this.computeSizes),(n=this.resizeObserver)===null||n===void 0||n.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&((r=this.styleRef.parentNode)===null||r===void 0||r.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(n){var r,i,o,a,s,l,c,d,f;n.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):n.aspect!==this.props.aspect?this.computeSizes():n.objectFit!==this.props.objectFit?this.computeSizes():n.zoom!==this.props.zoom?this.recomputeCropPosition():((r=n.cropSize)===null||r===void 0?void 0:r.height)!==((i=this.props.cropSize)===null||i===void 0?void 0:i.height)||((o=n.cropSize)===null||o===void 0?void 0:o.width)!==((a=this.props.cropSize)===null||a===void 0?void 0:a.width)?this.computeSizes():(((s=n.crop)===null||s===void 0?void 0:s.x)!==((l=this.props.crop)===null||l===void 0?void 0:l.x)||((c=n.crop)===null||c===void 0?void 0:c.y)!==((d=this.props.crop)===null||d===void 0?void 0:d.y))&&this.emitCropAreaChange(),n.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),n.video!==this.props.video&&((f=this.videoRef.current)===null||f===void 0||f.load());var h=this.getObjectFit();h!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:h},this.computeSizes)},t.prototype.getAspect=function(){var n=this.props,r=n.cropSize,i=n.aspect;return r?r.width/r.height:i},t.prototype.getObjectFit=function(){var n,r,i,o;if(this.props.objectFit==="cover"){var a=this.imageRef.current||this.videoRef.current;if(a&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var s=this.containerRect.width/this.containerRect.height,l=((n=this.imageRef.current)===null||n===void 0?void 0:n.naturalWidth)||((r=this.videoRef.current)===null||r===void 0?void 0:r.videoWidth)||0,c=((i=this.imageRef.current)===null||i===void 0?void 0:i.naturalHeight)||((o=this.videoRef.current)===null||o===void 0?void 0:o.videoHeight)||0,d=l/c;return d<s?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(n){var r=t.getTouchPoint(n.touches[0]),i=t.getTouchPoint(n.touches[1]);this.lastPinchDistance=tg(r,i),this.lastPinchRotation=ng(r,i),this.onDragStart(rg(r,i))},t.prototype.onPinchMove=function(n){var r=this;if(!(!this.currentDoc||!this.currentWindow)){var i=t.getTouchPoint(n.touches[0]),o=t.getTouchPoint(n.touches[1]),a=rg(i,o);this.onDrag(a),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var s=tg(i,o),l=r.props.zoom*(s/r.lastPinchDistance);r.setNewZoom(l,a,{shouldUpdatePosition:!1}),r.lastPinchDistance=s;var c=ng(i,o),d=r.props.rotation+(c-r.lastPinchRotation);r.props.onRotationChange&&r.props.onRotationChange(d),r.lastPinchRotation=c})}},t.prototype.render=function(){var n=this,r,i=this.props,o=i.image,a=i.video,s=i.mediaProps,l=i.transform,c=i.crop,d=c.x,f=c.y,h=i.rotation,p=i.zoom,m=i.cropShape,g=i.showGrid,v=i.style,S=v.containerStyle,I=v.cropAreaStyle,x=v.mediaStyle,w=i.classes,y=w.containerClassName,A=w.cropAreaClassName,E=w.mediaClassName,_=(r=this.state.mediaObjectFit)!==null&&r!==void 0?r:this.getObjectFit();return V.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(G){return n.containerRef=G},"data-testid":"container",style:S,className:Xa("reactEasyCrop_Container",y)},o?V.createElement("img",At({alt:"",className:Xa("reactEasyCrop_Image",_==="contain"&&"reactEasyCrop_Contain",_==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",_==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{src:o,ref:this.imageRef,style:At(At({},x),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):a&&V.createElement("video",At({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Xa("reactEasyCrop_Video",_==="contain"&&"reactEasyCrop_Contain",_==="horizontal-cover"&&"reactEasyCrop_Cover_Horizontal",_==="vertical-cover"&&"reactEasyCrop_Cover_Vertical",E)},s,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:At(At({},x),{transform:l||"translate(".concat(d,"px, ").concat(f,"px) rotate(").concat(h,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(a)?a:[{src:a}]).map(function(D){return V.createElement("source",At({key:D.src},D))})),this.state.cropSize&&V.createElement("div",{style:At(At({},I),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:Xa("reactEasyCrop_CropArea",m==="round"&&"reactEasyCrop_CropAreaRound",g&&"reactEasyCrop_CropAreaGrid",A)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:gP,minZoom:pP,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t.getTouchPoint=function(n){return{x:Number(n.clientX),y:Number(n.clientY)}},t}(V.Component);const vP=e=>new Promise((t,n)=>{const r=new Image;r.addEventListener("load",()=>t(r)),r.addEventListener("error",i=>n(i)),r.crossOrigin="Anonymous",r.src=e});function bP(e){return e*Math.PI/180}function yP(e,t,n=0){return k(this,null,function*(){const r=yield vP(e),i=document.createElement("canvas"),o=i.getContext("2d"),s=2*(Math.max(r.width,r.height)/2*Math.sqrt(2));i.width=s,i.height=s,o.translate(s/2,s/2),o.rotate(bP(n)),o.translate(-s/2,-s/2),o.drawImage(r,s/2-r.width*.5,s/2-r.height*.5);const l=o.getImageData(0,0,s,s);return i.width=t.width,i.height=t.height,o.putImageData(l,Math.round(0-s/2+r.width*.5-t.x),Math.round(0-s/2+r.height*.5-t.y)),new Promise(c=>i.toBlob(d=>{const f=new File([d],`cropped_image_${Date.now()}.jpeg`,{type:"image/jpeg"});c(f)},"image/jpeg"))})}const ig=({labels:e,open:t,imageSrc:n,resetDefaultImageUrl:r,toggleModal:i,uploadImage:o})=>{const[a,s]=C.useState({x:0,y:0}),[l,c]=C.useState(1),[d,f]=C.useState(16/9),[h,p]=C.useState(null),m=(x,w)=>{p(w)},g=(x,w)=>f(w),v=()=>k(this,null,function*(){const x=yield yP(n,h);I(),o(x)}),S=()=>{I(),r()},I=()=>{s({x:0,y:0}),c(1),f(16/9),p(null)};return u.jsx(b.Modal,{open:t,onClose:i,children:u.jsxs(b.ModalDialog,{layout:"fullscreen",variant:"soft",sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[u.jsx(b.ModalClose,{}),u.jsx(b.DialogTitle,{children:e.cropImage}),u.jsxs(b.DialogContent,{sx:{width:"100%"},children:[u.jsx(b.Box,{position:"relative",height:"100%",width:"100%",mb:2,children:u.jsx(mP,{image:n,crop:a,zoom:l,aspect:d,onCropChange:s,onCropComplete:m,onZoomChange:c})}),u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.aspectRatio}),u.jsxs(b.Select,{value:d,onChange:g,children:[u.jsx(b.Option,{value:4/3,children:"4 / 3"}),u.jsx(b.Option,{value:16/9,children:"16 / 9"}),u.jsx(b.Option,{value:1,children:"1"})]})]}),u.jsx(b.Box,{mb:1,mx:2,children:u.jsx(b.Slider,{value:l,min:1,max:3,step:.1,onChange:(x,w)=>c(w)})}),u.jsxs(b.DialogActions,{children:[u.jsx(b.Button,{color:"primary",onClick:v,loading:!1,children:e.crop}),u.jsx(b.Button,{color:"primary",variant:"outlined",onClick:S,loading:!1,children:e.reset})]})]})]})})},og=Ue(u.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"CropOutlined"),ag=({labels:e,title:t,image:n,onChangeImages:r,clearImage:i})=>{const[o,a]=C.useState(!1),[s,l]=C.useState(!1),[c,d]=C.useState(!1),[f,h]=C.useState(!1),[p,m]=C.useState(""),[g,v]=C.useState("primary"),[S,I]=C.useState(""),x=C.useRef(null),w=()=>h(!f),y=()=>{x.current&&x.current.click()},A=new $p,E=C.useContext(Zo),_=()=>{m(""),l(!1)},D=B=>{let W="",Q="primary";switch(B){case"copy_url":W=e.urlCopiedToClipboardMessage,Q="primary";break;case"image_deleted":W=e.imageDeletedMessage,Q="primary";break;case"image_reset":W=e.imageResetMessage,Q="primary";break;case"upload_success":W=e.uploadingImageMessage,Q="success";break;case"upload_failed":W=e.uploadingImageErrorMessage,Q="danger";break;case"sign_in_url_failed":W=e.generateSignedInUrlErrorMessage,Q="danger";break;case"encrypting_file_failed":W=e.encryptingImageErrorMessage,Q="danger";break}v(Q),m(W),l(!0)},G=()=>d(!c),F=()=>{i(),D("image_deleted")},T=B=>{navigator.clipboard.writeText(B),D("copy_url")},j=B=>k(this,null,function*(){B.persist();const W=B.target.files?B.target.files[0]:null;if(W){a(!0);try{const Q=W.type.split("/")[1],te=yield A.readFileAndHash(W),R=(yield A.generateHashFileName(W))+"."+Q,M={image_type:Q,image_file_name:R,image_size:W.size,base64_sum:te},U=yield E==null?void 0:E.https.generateSignedInUrl(M);if(U!=null&&U.ok){const H=yield U.json(),ne={"Content-Type":W.type,"Content-MD5":te};try{const se=new File([W],R,{type:W.type}),ae=yield E==null?void 0:E.https.storeInBucket(H.data.signed_url,se,ne);r(ae||""),I(ae),D("upload_success")}catch(se){console.error("There was a problem with uploading the file: ",se),D("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield U==null?void 0:U.json()),D("sign_in_url_failed")}catch(Q){console.error("There was a problem with encrypting file...",Q),D("encrypting_file_failed")}a(!1)}}),Y=B=>k(this,null,function*(){if(B){a(!0);try{const W=B.type.split("/")[1],Q=yield A.readFileAndHash(B),te=(yield A.generateHashFileName(B))+"."+W,R={image_type:W,image_file_name:te,image_size:B.size,base64_sum:Q},M=yield E==null?void 0:E.https.generateSignedInUrl(R);if(M!=null&&M.ok){const U=yield M.json(),H={"Content-Type":B.type,"Content-MD5":Q};try{const ne=new File([B],te,{type:B.type}),se=yield E==null?void 0:E.https.storeInBucket(U.data.signed_url,ne,H);r(se||""),D("upload_success")}catch(ne){console.error("There was a problem with uploading the file: ",ne),D("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield M==null?void 0:M.json()),D("sign_in_url_failed")}catch(W){console.error("There was a problem with encrypting file...",W),D("encrypting_file_failed")}a(!1)}}),z=()=>{r(S),D("image_reset")},$=B=>{r(B),I(B)};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:t}),u.jsx(b.Tooltip,{title:e.clearImage,children:u.jsx(b.IconButton,{"aria-label":e.clearImage,variant:"plain",color:"danger",size:"sm",onClick:F,children:u.jsx(Ap,{})})})]}),u.jsxs(b.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(b.Skeleton,{loading:o,animation:"wave",children:[n?u.jsx(b.Box,{component:"img",src:n,loading:"lazy",alt:t,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}}),n?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(Fp,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(b.Tooltip,{title:e.copyUrl,children:u.jsx(ti,{onClick:()=>T(n),disabled:!n,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Oe.ContentCopy,{})})}),u.jsx(b.Tooltip,{title:e.viewImage,children:u.jsx(ti,{onClick:G,disabled:!n,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(jp,{})})}),u.jsx(b.Tooltip,{title:e.cropImage,children:u.jsx(ti,{onClick:w,disabled:!n,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(og,{})})})]}),u.jsx(b.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(ti,{sx:{width:"100%"},onClick:y,children:[u.jsx(Oe.Upload,{})," ",e.uploadImage,u.jsx(Up,{type:"file",accept:"image/*",onChange:j,ref:x})]})}),E!=null&&E.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.sportal365Images})}),u.jsx(b.AccordionDetails,{children:u.jsx(zp,{labels:e,onChangeImages:$})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(at,{showToast:s,message:p,color:g,hideToast:_}),u.jsx(Np,{title:e.viewImage,open:c,imageSrc:n,toggleModal:G}),u.jsx(ig,{labels:e,open:f,imageSrc:n,toggleModal:w,uploadImage:Y,resetDefaultImageUrl:z})]})},xP=e=>new Map().set("main_logo",e.mainLogo).set("mobile_logo",e.mobileLogo).set("background_image",e.backgroundImage).set("mobile_background_image",e.mobileBackgroundImage).set("additional_image",e.additionalImage),CP=e=>new Map().set("primary_color",e.primaryColor).set("secondary_color",e.secondaryColor).set("content_color",e.contentColor).set("background_color",e.backgroundColor).set("border_color",e.borderColor).set("additional_color",e.additionalColor),wP=e=>new Map().set("primary_url",e.primaryUrl).set("secondary_url",e.secondaryUrl).set("privacy_policy_url",e.privacyPolicyUrl).set("terms_and_conditions_url",e.termsAndConditionsUrl).set("additional_url",e.additionalUrl),IP=({labels:e,defaultValue:t,onChange:n})=>{const[r,i]=C.useState(!1),o=JSON.parse(JSON.stringify(t)),a=["mobile_logo","background_image","mobile_background_image","additional_image"],s=xP(e),l=CP(e),c=wP(e),d=(m,g)=>{const v=m.target.value;o.colors[g]=v,n(o)},f=(m,g)=>{const v=m.target.value;o.urls[g]=v,n(o)},h=(m,g)=>{o.images[g]=m,n(o)},p=m=>{o.images[m]="",n(o)};return u.jsx(b.Box,{children:u.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[u.jsxs(Hr,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(Pc,{sx:{width:"20px"}})}),e.images]}),u.jsxs(Hr,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(Kk,{sx:{width:"20px"}})}),e.colors]}),u.jsxs(Hr,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(Qk,{sx:{width:"20px"}})}),e.urls]})]}),u.jsxs(Zr,{value:0,sx:{px:0},children:[u.jsx(ag,{labels:e,title:e.mainLogo,image:o.images.main_logo,onChangeImages:m=>h(m,"main_logo"),clearImage:()=>p("main_logo")}),u.jsx(b.Link,{underline:"hover",onClick:()=>i(!r),sx:{marginBottom:"10px"},children:r?e.hideMoreImages:e.showMoreImages}),r?u.jsx(u.Fragment,{children:a.map(m=>u.jsx(ag,{labels:e,title:s.get(m),image:o.images[m],onChangeImages:g=>h(g,m),clearImage:()=>p(m)},`branding-image-${m}`))}):u.jsx(u.Fragment,{})]}),u.jsx(Zr,{value:1,sx:{px:0},children:u.jsx(b.Box,{children:Object.keys(o.colors).map(m=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{size:"sm",label:l.get(m),placeholder:"",defaultValue:o.colors[m],required:!1,onChange:g=>d(g,m)})},`branding-color-${m}`))})}),u.jsx(Zr,{value:2,sx:{px:0},children:u.jsx(b.Box,{children:Object.keys(o.urls).map(m=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{size:"sm",label:c.get(m),placeholder:"",defaultValue:o.urls[m],required:!1,onChange:g=>f(g,m)})},`branding-url-${m}`))})})]})})},Uc=Ue(u.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutlineOutlined"),sg=e=>{const t=()=>k(this,null,function*(){yield Ui(e.environment).signOut()});return u.jsx(b.Button,{variant:"outlined",color:"danger",onClick:t,children:e.signOutLabel})},SP=({createLabel:e,createFromTemplateLabel:t,signOutLabel:n,environment:r,onClickCreate:i,onClickCreateFromTemplate:o})=>u.jsx(u.Fragment,{children:u.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",p:1,sx:()=>({marginBottom:"16px"}),children:[t?u.jsxs(b.Stack,{direction:"row",alignItems:"center",spacing:2,children:[u.jsx(b.Button,{startDecorator:u.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),u.jsx(b.Button,{startDecorator:u.jsx(Uc,{}),variant:"outlined",color:"primary",onClick:o,children:t})]}):u.jsx(b.Button,{startDecorator:u.jsx(Uc,{}),variant:"solid",color:"primary",onClick:i,children:e}),n?u.jsx(sg,{signOutLabel:n,environment:r}):u.jsx(u.Fragment,{})]})});var lg={},Vc=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ii={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return typeof console!="undefined"&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},ro={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},zt=function(e,t){return t===void 0&&(t=2),("000"+e).slice(t*-1)},rn=function(e){return e===!0?1:0};function cg(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,i)},t)}}var Hc=function(e){return e instanceof Array?e:[e]};function Ot(e,t,n){if(n===!0)return e.classList.add(t);e.classList.remove(t)}function Le(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,n!==void 0&&(r.textContent=n),r}function Za(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ug(e,t){if(t(e))return e;if(e.parentNode)return ug(e.parentNode,t)}function es(e,t){var n=Le("div","numInputWrapper"),r=Le("input","numInput "+e),i=Le("span","arrowUp"),o=Le("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(i),n.appendChild(o),n}function Yt(e){try{if(typeof e.composedPath=="function"){var t=e.composedPath();return t[0]}return e.target}catch(n){return e.target}}var Wc=function(){},ts=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},AP={D:Wc,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*rn(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(parseFloat(t)*1e3)},W:function(e,t,n){var r=parseInt(t),i=new Date(e.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+n.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:Wc,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:Wc,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},wr={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},io={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[io.w(e,t,n)]},F:function(e,t,n){return ts(io.n(e,t,n)-1,!1,t)},G:function(e,t,n){return zt(io.h(e,t,n))},H:function(e){return zt(e.getHours())},J:function(e,t){return t.ordinal!==void 0?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[rn(e.getHours()>11)]},M:function(e,t){return ts(e.getMonth(),!0,t)},S:function(e){return zt(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return zt(e.getFullYear(),4)},d:function(e){return zt(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return zt(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return zt(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},dg=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?ro:r,o=e.isMobile,a=o===void 0?!1:o;return function(s,l,c){var d=c||i;return n.formatDate!==void 0&&!a?n.formatDate(s,l,d):l.split("").map(function(f,h,p){return io[f]&&p[h-1]!=="\\"?io[f](s,d,n):f!=="\\"?f:""}).join("")}},Gc=function(e){var t=e.config,n=t===void 0?ii:t,r=e.l10n,i=r===void 0?ro:r;return function(o,a,s,l){if(!(o!==0&&!o)){var c=l||i,d,f=o;if(o instanceof Date)d=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)d=new Date(o);else if(typeof o=="string"){var h=a||(n||ii).dateFormat,p=String(o).trim();if(p==="today")d=new Date,s=!0;else if(n&&n.parseDate)d=n.parseDate(o,h);else if(/Z$/.test(p)||/GMT$/.test(p))d=new Date(o);else{for(var m=void 0,g=[],v=0,S=0,I="";v<h.length;v++){var x=h[v],w=x==="\\",y=h[v-1]==="\\"||w;if(wr[x]&&!y){I+=wr[x];var A=new RegExp(I).exec(o);A&&(m=!0)&&g[x!=="Y"?"push":"unshift"]({fn:AP[x],val:A[++S]})}else w||(I+=".")}d=!n||!n.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),g.forEach(function(E){var _=E.fn,D=E.val;return d=_(d,D,c)||d}),d=m?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){n.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&d.setHours(0,0,0,0),d}}};function Kt(e,t,n){return n===void 0&&(n=!0),n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var TP=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},Yc=function(e,t,n){return e*3600+t*60+n},EP=function(e){var t=Math.floor(e/3600),n=(e-t*3600)/60;return[t,n,e-t*3600-n*60]},kP={DAY:864e5};function Kc(e){var t=e.defaultHour,n=e.defaultMinute,r=e.defaultSeconds;if(e.minDate!==void 0){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<i&&(t=i),t===i&&n<o&&(n=o),t===i&&n===o&&r<a&&(r=e.minDate.getSeconds())}if(e.maxDate!==void 0){var s=e.maxDate.getHours(),l=e.maxDate.getMinutes();t=Math.min(t,s),t===s&&(n=Math.min(l,n)),t===s&&n===l&&(r=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(l){return e[l]=s[l]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return e});var Et=function(){return Et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Et.apply(this,arguments)},fg=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},_P=300;function PP(e,t){var n={config:Et(Et({},ii),ht.defaultConfig),l10n:ro};n.parseDate=Gc({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=g,n._setHoursFromDate=h,n._positionCalendar=xe,n.changeMonth=R,n.changeYear=ae,n.clear=M,n.close=U,n.onMouseOver=Se,n._createElement=Le,n.createDay=A,n.destroy=H,n.isEnabled=X,n.jumpToDate=I,n.updateValue=un,n.open=wt,n.redraw=Pe,n.set=jt,n.setDate=Qt,n.toggle=Lu;function r(){n.utils={getDaysInMonth:function(P,L){return P===void 0&&(P=n.currentMonth),L===void 0&&(L=n.currentYear),P===1&&(L%4===0&&L%100!==0||L%400===0)?29:n.l10n.daysInMonth[P]}}}function i(){n.element=n.input=e,n.isOpen=!1,_t(),he(),In(),Rs(),r(),n.isMobile||y(),S(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&h(n.config.noCalendar?n.latestSelectedDateObj:void 0),un(!1)),s();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&P&&xe(),ze("onReady")}function o(){var P;return((P=n.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function a(P){return P.bind(n)}function s(){var P=n.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(n.calendarContainer!==void 0&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),n.daysContainer!==void 0){var L=(n.days.offsetWidth+1)*P.showMonths;n.daysContainer.style.width=L+"px",n.calendarContainer.style.width=L+(n.weekWrapper!==void 0?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}})}function l(P){if(n.selectedDates.length===0){var L=n.config.minDate===void 0||Kt(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),K=Kc(n.config);L.setHours(K.hours,K.minutes,K.seconds,L.getMilliseconds()),n.selectedDates=[L],n.latestSelectedDateObj=L}P!==void 0&&P.type!=="blur"&&Ct(P);var J=n._input.value;f(),un(),n._input.value!==J&&n._debouncedChange()}function c(P,L){return P%12+12*rn(L===n.l10n.amPM[1])}function d(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function f(){if(!(n.hourElement===void 0||n.minuteElement===void 0)){var P=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,L=(parseInt(n.minuteElement.value,10)||0)%60,K=n.secondElement!==void 0?(parseInt(n.secondElement.value,10)||0)%60:0;n.amPM!==void 0&&(P=c(P,n.amPM.textContent));var J=n.config.minTime!==void 0||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.minDate,!0)===0,ie=n.config.maxTime!==void 0||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&Kt(n.latestSelectedDateObj,n.config.maxDate,!0)===0;if(n.config.maxTime!==void 0&&n.config.minTime!==void 0&&n.config.minTime>n.config.maxTime){var ce=Yc(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),Ce=Yc(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),ue=Yc(P,L,K);if(ue>Ce&&ue<ce){var we=EP(ce);P=we[0],L=we[1],K=we[2]}}else{if(ie){var fe=n.config.maxTime!==void 0?n.config.maxTime:n.config.maxDate;P=Math.min(P,fe.getHours()),P===fe.getHours()&&(L=Math.min(L,fe.getMinutes())),L===fe.getMinutes()&&(K=Math.min(K,fe.getSeconds()))}if(J){var me=n.config.minTime!==void 0?n.config.minTime:n.config.minDate;P=Math.max(P,me.getHours()),P===me.getHours()&&L<me.getMinutes()&&(L=me.getMinutes()),L===me.getMinutes()&&(K=Math.max(K,me.getSeconds()))}}p(P,L,K)}}function h(P){var L=P||n.latestSelectedDateObj;L&&L instanceof Date&&p(L.getHours(),L.getMinutes(),L.getSeconds())}function p(P,L,K){n.latestSelectedDateObj!==void 0&&n.latestSelectedDateObj.setHours(P%24,L,K||0,0),!(!n.hourElement||!n.minuteElement||n.isMobile)&&(n.hourElement.value=zt(n.config.time_24hr?P:(12+P)%12+12*rn(P%12===0)),n.minuteElement.value=zt(L),n.amPM!==void 0&&(n.amPM.textContent=n.l10n.amPM[rn(P>=12)]),n.secondElement!==void 0&&(n.secondElement.value=zt(K)))}function m(P){var L=Yt(P),K=parseInt(L.value)+(P.delta||0);(K/1e3>1||P.key==="Enter"&&!/[^\d]/.test(K.toString()))&&ae(K)}function g(P,L,K,J){if(L instanceof Array)return L.forEach(function(ie){return g(P,ie,K,J)});if(P instanceof Array)return P.forEach(function(ie){return g(ie,L,K,J)});P.addEventListener(L,K,J),n._handlers.push({remove:function(){return P.removeEventListener(L,K,J)}})}function v(){ze("onChange")}function S(){if(n.config.wrap&&["open","close","toggle","clear"].forEach(function(K){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+K+"]"),function(J){return g(J,"click",n[K])})}),n.isMobile){Ru();return}var P=cg(Ve,50);if(n._debouncedChange=cg(v,_P),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(n.daysContainer,"mouseover",function(K){n.config.mode==="range"&&Se(Yt(K))}),g(n._input,"keydown",ge),n.calendarContainer!==void 0&&g(n.calendarContainer,"keydown",ge),!n.config.inline&&!n.config.static&&g(window,"resize",P),window.ontouchstart!==void 0?g(window.document,"touchstart",se):g(window.document,"mousedown",se),g(window.document,"focus",se,{capture:!0}),n.config.clickOpens===!0&&(g(n._input,"focus",n.open),g(n._input,"click",n.open)),n.daysContainer!==void 0&&(g(n.monthNav,"click",Ms),g(n.monthNav,["keyup","increment"],m),g(n.daysContainer,"click",It)),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0){var L=function(K){return Yt(K).select()};g(n.timeContainer,["increment"],l),g(n.timeContainer,"blur",l,{capture:!0}),g(n.timeContainer,"click",x),g([n.hourElement,n.minuteElement],["focus","click"],L),n.secondElement!==void 0&&g(n.secondElement,"focus",function(){return n.secondElement&&n.secondElement.select()}),n.amPM!==void 0&&g(n.amPM,"click",function(K){l(K)})}n.config.allowInput&&g(n._input,"blur",re)}function I(P,L){var K=P!==void 0?n.parseDate(P):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),J=n.currentYear,ie=n.currentMonth;try{K!==void 0&&(n.currentYear=K.getFullYear(),n.currentMonth=K.getMonth())}catch(ce){ce.message="Invalid date supplied: "+K,n.config.errorHandler(ce)}L&&n.currentYear!==J&&(ze("onYearChange"),j()),L&&(n.currentYear!==J||n.currentMonth!==ie)&&ze("onMonthChange"),n.redraw()}function x(P){var L=Yt(P);~L.className.indexOf("arrow")&&w(P,L.classList.contains("arrowUp")?1:-1)}function w(P,L,K){var J=P&&Yt(P),ie=K||J&&J.parentNode&&J.parentNode.firstChild,ce=mi("increment");ce.delta=L,ie&&ie.dispatchEvent(ce)}function y(){var P=window.document.createDocumentFragment();if(n.calendarContainer=Le("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(P.appendChild($()),n.innerContainer=Le("div","flatpickr-innerContainer"),n.config.weekNumbers){var L=te(),K=L.weekWrapper,J=L.weekNumbers;n.innerContainer.appendChild(K),n.weekNumbers=J,n.weekWrapper=K}n.rContainer=Le("div","flatpickr-rContainer"),n.rContainer.appendChild(W()),n.daysContainer||(n.daysContainer=Le("div","flatpickr-days"),n.daysContainer.tabIndex=-1),T(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),P.appendChild(n.innerContainer)}n.config.enableTime&&P.appendChild(B()),Ot(n.calendarContainer,"rangeMode",n.config.mode==="range"),Ot(n.calendarContainer,"animate",n.config.animate===!0),Ot(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(P);var ie=n.config.appendTo!==void 0&&n.config.appendTo.nodeType!==void 0;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!ie&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):n.config.appendTo!==void 0&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var ce=Le("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(ce,n.element),ce.appendChild(n.element),n.altInput&&ce.appendChild(n.altInput),ce.appendChild(n.calendarContainer)}!n.config.static&&!n.config.inline&&(n.config.appendTo!==void 0?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}function A(P,L,K,J){var ie=X(L,!0),ce=Le("span",P,L.getDate().toString());return ce.dateObj=L,ce.$i=J,ce.setAttribute("aria-label",n.formatDate(L,n.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Kt(L,n.now)===0&&(n.todayDateElem=ce,ce.classList.add("today"),ce.setAttribute("aria-current","date")),ie?(ce.tabIndex=-1,So(L)&&(ce.classList.add("selected"),n.selectedDateElem=ce,n.config.mode==="range"&&(Ot(ce,"startRange",n.selectedDates[0]&&Kt(L,n.selectedDates[0],!0)===0),Ot(ce,"endRange",n.selectedDates[1]&&Kt(L,n.selectedDates[1],!0)===0),P==="nextMonthDay"&&ce.classList.add("inRange")))):ce.classList.add("flatpickr-disabled"),n.config.mode==="range"&&Ls(L)&&!So(L)&&ce.classList.add("inRange"),n.weekNumbers&&n.config.showMonths===1&&P!=="prevMonthDay"&&J%7===6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(L)+"</span>"),ze("onDayCreate",ce),ce}function E(P){P.focus(),n.config.mode==="range"&&Se(P)}function _(P){for(var L=P>0?0:n.config.showMonths-1,K=P>0?n.config.showMonths:-1,J=L;J!=K;J+=P)for(var ie=n.daysContainer.children[J],ce=P>0?0:ie.children.length-1,Ce=P>0?ie.children.length:-1,ue=ce;ue!=Ce;ue+=P){var we=ie.children[ue];if(we.className.indexOf("hidden")===-1&&X(we.dateObj))return we}}function D(P,L){for(var K=P.className.indexOf("Month")===-1?P.dateObj.getMonth():n.currentMonth,J=L>0?n.config.showMonths:-1,ie=L>0?1:-1,ce=K-n.currentMonth;ce!=J;ce+=ie)for(var Ce=n.daysContainer.children[ce],ue=K-n.currentMonth===ce?P.$i+L:L<0?Ce.children.length-1:0,we=Ce.children.length,fe=ue;fe>=0&&fe<we&&fe!=(L>0?we:-1);fe+=ie){var me=Ce.children[fe];if(me.className.indexOf("hidden")===-1&&X(me.dateObj)&&Math.abs(P.$i-fe)>=Math.abs(L))return E(me)}n.changeMonth(ie),G(_(ie),0)}function G(P,L){var K=o(),J=le(K||document.body),ie=P!==void 0?P:J?K:n.selectedDateElem!==void 0&&le(n.selectedDateElem)?n.selectedDateElem:n.todayDateElem!==void 0&&le(n.todayDateElem)?n.todayDateElem:_(L>0?1:-1);ie===void 0?n._input.focus():J?D(ie,L):E(ie)}function F(P,L){for(var K=(new Date(P,L,1).getDay()-n.l10n.firstDayOfWeek+7)%7,J=n.utils.getDaysInMonth((L-1+12)%12,P),ie=n.utils.getDaysInMonth(L,P),ce=window.document.createDocumentFragment(),Ce=n.config.showMonths>1,ue=Ce?"prevMonthDay hidden":"prevMonthDay",we=Ce?"nextMonthDay hidden":"nextMonthDay",fe=J+1-K,me=0;fe<=J;fe++,me++)ce.appendChild(A("flatpickr-day "+ue,new Date(P,L-1,fe),fe,me));for(fe=1;fe<=ie;fe++,me++)ce.appendChild(A("flatpickr-day",new Date(P,L,fe),fe,me));for(var De=ie+1;De<=42-K&&(n.config.showMonths===1||me%7!==0);De++,me++)ce.appendChild(A("flatpickr-day "+we,new Date(P,L+1,De%ie),De,me));var Pt=Le("div","dayContainer");return Pt.appendChild(ce),Pt}function T(){if(n.daysContainer!==void 0){Za(n.daysContainer),n.weekNumbers&&Za(n.weekNumbers);for(var P=document.createDocumentFragment(),L=0;L<n.config.showMonths;L++){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+L),P.appendChild(F(K.getFullYear(),K.getMonth()))}n.daysContainer.appendChild(P),n.days=n.daysContainer.firstChild,n.config.mode==="range"&&n.selectedDates.length===1&&Se()}}function j(){if(!(n.config.showMonths>1||n.config.monthSelectorType!=="dropdown")){var P=function(J){return n.config.minDate!==void 0&&n.currentYear===n.config.minDate.getFullYear()&&J<n.config.minDate.getMonth()?!1:!(n.config.maxDate!==void 0&&n.currentYear===n.config.maxDate.getFullYear()&&J>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var L=0;L<12;L++)if(P(L)){var K=Le("option","flatpickr-monthDropdown-month");K.value=new Date(n.currentYear,L).getMonth().toString(),K.textContent=ts(L,n.config.shorthandCurrentMonth,n.l10n),K.tabIndex=-1,n.currentMonth===L&&(K.selected=!0),n.monthsDropdownContainer.appendChild(K)}}}function Y(){var P=Le("div","flatpickr-month"),L=window.document.createDocumentFragment(),K;n.config.showMonths>1||n.config.monthSelectorType==="static"?K=Le("span","cur-month"):(n.monthsDropdownContainer=Le("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),g(n.monthsDropdownContainer,"change",function(Ce){var ue=Yt(Ce),we=parseInt(ue.value,10);n.changeMonth(we-n.currentMonth),ze("onMonthChange")}),j(),K=n.monthsDropdownContainer);var J=es("cur-year",{tabindex:"-1"}),ie=J.getElementsByTagName("input")[0];ie.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&ie.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(ie.setAttribute("max",n.config.maxDate.getFullYear().toString()),ie.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var ce=Le("div","flatpickr-current-month");return ce.appendChild(K),ce.appendChild(J),L.appendChild(ce),P.appendChild(L),{container:P,yearElement:ie,monthElement:K}}function z(){Za(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var P=n.config.showMonths;P--;){var L=Y();n.yearElements.push(L.yearElement),n.monthElements.push(L.monthElement),n.monthNav.appendChild(L.container)}n.monthNav.appendChild(n.nextMonthNav)}function $(){return n.monthNav=Le("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=Le("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=Le("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,z(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(P){n.__hidePrevMonthArrow!==P&&(Ot(n.prevMonthNav,"flatpickr-disabled",P),n.__hidePrevMonthArrow=P)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(P){n.__hideNextMonthArrow!==P&&(Ot(n.nextMonthNav,"flatpickr-disabled",P),n.__hideNextMonthArrow=P)}}),n.currentYearElement=n.yearElements[0],vi(),n.monthNav}function B(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var P=Kc(n.config);n.timeContainer=Le("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var L=Le("span","flatpickr-time-separator",":"),K=es("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=K.getElementsByTagName("input")[0];var J=es("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=J.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?P.hours:d(P.hours)),n.minuteElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():P.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(K),n.timeContainer.appendChild(L),n.timeContainer.appendChild(J),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var ie=es("flatpickr-second");n.secondElement=ie.getElementsByTagName("input")[0],n.secondElement.value=zt(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():P.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(Le("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(ie)}return n.config.time_24hr||(n.amPM=Le("span","flatpickr-am-pm",n.l10n.amPM[rn((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}function W(){n.weekdayContainer?Za(n.weekdayContainer):n.weekdayContainer=Le("div","flatpickr-weekdays");for(var P=n.config.showMonths;P--;){var L=Le("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(L)}return Q(),n.weekdayContainer}function Q(){if(n.weekdayContainer){var P=n.l10n.firstDayOfWeek,L=fg(n.l10n.weekdays.shorthand);P>0&&P<L.length&&(L=fg(L.splice(P,L.length),L.splice(0,P)));for(var K=n.config.showMonths;K--;)n.weekdayContainer.children[K].innerHTML=`
|
|
2454
2454
|
<span class='flatpickr-weekday'>
|
|
2455
2455
|
`+L.join("</span><span class='flatpickr-weekday'>")+`
|
|
2456
2456
|
</span>
|
|
2457
|
-
`}}function ee(){n.calendarContainer.classList.add("hasWeeks");var P=Le("div","flatpickr-weekwrapper");P.appendChild(Le("span","flatpickr-weekday",n.l10n.weekAbbreviation));var L=Le("div","flatpickr-weeks");return P.appendChild(L),{weekWrapper:P,weekNumbers:L}}function R(P,L){L===void 0&&(L=!0);var K=L?P:P-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ze("onYearChange"),j()),T(),ze("onMonthChange"),vi())}function M(P,L){if(P===void 0&&(P=!0),L===void 0&&(L=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,L===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=Kc(n.config),J=K.hours,ie=K.minutes,ce=K.seconds;p(J,ie,ce)}n.redraw(),P&&ze("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ze("onClose")}function H(){n.config!==void 0&&ze("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var L=n.calendarContainer.parentNode;if(L.lastChild&&L.removeChild(L.lastChild),L.parentNode){for(;L.firstChild;)L.parentNode.insertBefore(L.firstChild,L);L.parentNode.removeChild(L)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(K){try{delete n[K]}catch(J){}})}function ne(P){return n.calendarContainer.contains(P)}function se(P){if(n.isOpen&&!n.config.inline){var L=Yt(P),K=ne(L),J=L===n.input||L===n.altInput||n.element.contains(L)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),ie=!J&&!K&&!ne(P.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(L)});ie&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var L=P,K=n.currentYear!==L;n.currentYear=L||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),K&&(n.redraw(),ze("onYearChange"),j())}}function X(P,L){var K;L===void 0&&(L=!0);var J=n.parseDate(P,void 0,L);if(n.config.minDate&&J&&Kt(J,n.config.minDate,L!==void 0?L:!n.minDateHasTime)<0||n.config.maxDate&&J&&Kt(J,n.config.maxDate,L!==void 0?L:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(J===void 0)return!1;for(var ie=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,Ce=0,ue=void 0;Ce<ce.length;Ce++){if(ue=ce[Ce],typeof ue=="function"&&ue(J))return ie;if(ue instanceof Date&&J!==void 0&&ue.getTime()===J.getTime())return ie;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===J.getTime()?ie:!ie}else if(typeof ue=="object"&&J!==void 0&&ue.from&&ue.to&&J.getTime()>=ue.from.getTime()&&J.getTime()<=ue.to.getTime())return ie}return!ie}function le(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function re(P){var L=P.target===n._input,K=n._input.value.trimEnd()!==Ao();L&&K&&!(P.relatedTarget&&ne(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(P){var L=Yt(P),K=n.config.wrap?e.contains(L):L===n._input,J=n.config.allowInput,ie=n.isOpen&&(!J||!K),ce=n.config.inline&&K&&!J;if(P.keyCode===13&&K){if(J)return n.setDate(n._input.value,!0,L===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),L.blur();n.open()}else if(ne(L)||ie||ce){var Ce=!!n.timeContainer&&n.timeContainer.contains(L);switch(P.keyCode){case 13:Ce?(P.preventDefault(),l(),Ee()):It(P);break;case 27:P.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!K){P.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(J===!1||ue&&le(ue))){var we=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),R(we),G(_(1),0)):G(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var fe=P.keyCode===40?1:-1;n.daysContainer&&L.$i!==void 0||L===n.input||L===n.altInput?P.ctrlKey?(P.stopPropagation(),ae(n.currentYear-fe),G(_(1),0)):Ce||G(void 0,fe*7):L===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),l(P),n._debouncedChange());break;case 9:if(Ce){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(nt){return nt}),De=me.indexOf(L);if(De!==-1){var Pt=me[De+(P.shiftKey?-1:1)];P.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(L)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&L===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),un();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),un();break}(K||ne(L))&&ze("onKeyDown",P)}function Se(P,L){if(L===void 0&&(L="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(L)||P.classList.contains("flatpickr-disabled")))){for(var K=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),J=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ie=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),Ce=!1,ue=0,we=0,fe=ie;fe<ce;fe+=kP.DAY)X(new Date(fe),!0)||(Ce=Ce||fe>ie&&fe<ce,fe<J&&(!ue||fe>ue)?ue=fe:fe>J&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+L));me.forEach(function(De){var Pt=De.dateObj,nt=Pt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){De.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Sn){De.classList.remove(Sn)});return}else if(Ce&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Sn){De.classList.remove(Sn)}),P!==void 0&&(P.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),J<K&&nt===J?De.classList.add("startRange"):J>K&&nt===J&&De.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&TP(nt,J,K)&&De.classList.add("inRange"))})}}function Ve(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function wt(P,L){if(L===void 0&&(L=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var K=Yt(P);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ze("onOpen");return}else if(n._input.disabled||n.config.inline)return;var J=n.isOpen;n.isOpen=!0,J||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ze("onOpen"),xe(L)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function lt(P){return function(L){var K=n.config["_"+P+"Date"]=n.parseDate(L,n.config.dateFormat),J=n.config["_"+(P==="min"?"max":"min")+"Date"];K!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(ie){return X(ie)}),!n.selectedDates.length&&P==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[P]=K.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!J&&K!==void 0&&J.getFullYear()===K.getFullYear())}}function _t(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],L=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=L.parseDate,n.config.formatDate=L.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=ar(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=ar(me)}});var J=L.mode==="time";if(!L.dateFormat&&(L.enableTime||J)){var ie=ht.defaultConfig.dateFormat||ii.dateFormat;K.dateFormat=L.noCalendar||J?"H:i"+(L.enableSeconds?":S":""):ie+" H:i"+(L.enableSeconds?":S":"")}if(L.altInput&&(L.enableTime||J)&&!L.altFormat){var ce=ht.defaultConfig.altFormat||ii.altFormat;K.altFormat=L.noCalendar||J?"h:i"+(L.enableSeconds?":S K":" K"):ce+(" h:i"+(L.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:lt("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:lt("max")});var Ce=function(me){return function(De){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(De,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Ce("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Ce("max")}),L.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,L);for(var ue=0;ue<P.length;ue++)n.config[P[ue]]=n.config[P[ue]]===!0||n.config[P[ue]]==="true";Vc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=Hc(n.config[me]||[]).map(a)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ue=0;ue<n.config.plugins.length;ue++){var we=n.config.plugins[ue](n)||{};for(var fe in we)Vc.indexOf(fe)>-1?n.config[fe]=Hc(we[fe]).map(a).concat(n.config[fe]):typeof L[fe]=="undefined"&&(n.config[fe]=we[fe])}L.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),ze("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function he(){typeof n.config.locale!="object"&&typeof ht.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},ht.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?ht.l10ns[n.config.locale]:void 0),wr.D="("+n.l10n.weekdays.shorthand.join("|")+")",wr.l="("+n.l10n.weekdays.longhand.join("|")+")",wr.M="("+n.l10n.months.shorthand.join("|")+")",wr.F="("+n.l10n.months.longhand.join("|")+")",wr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&ht.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=dg(n),n.parseDate=Gc({config:n.config,l10n:n.l10n})}function xe(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){ze("onPreCalendarPosition");var L=P||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(TF,EF){return TF+EF.offsetHeight},0),J=n.calendarContainer.offsetWidth,ie=n.config.position.split(" "),ce=ie[0],Ce=ie.length>1?ie[1]:null,ue=L.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:L.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var De=window.pageXOffset+ue.left,Pt=!1,nt=!1;Ce==="center"?(De-=(J-ue.width)/2,Pt=!0):Ce==="right"&&(De-=J-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!nt),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),Sn=De+J>window.document.body.offsetWidth,yF=dn+J>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",Sn),!n.config.static)if(n.calendarContainer.style.top=me+"px",!Sn)n.calendarContainer.style.left=De+"px",n.calendarContainer.style.right="auto";else if(!yF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Mu=Te();if(Mu===void 0)return;var xF=window.document.body.offsetWidth,CF=Math.max(0,xF/2-J/2),wF=".flatpickr-calendar.centerMost:before",IF=".flatpickr-calendar.centerMost:after",SF=Mu.cssRules.length,AF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Mu.insertRule(wF+","+IF+AF,SF),n.calendarContainer.style.left=CF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var P=null,L=0;L<document.styleSheets.length;L++){var K=document.styleSheets[L];if(K.cssRules){try{K.cssRules}catch(J){continue}P=K;break}}return P!=null?P:He()}function He(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function Pe(){n.config.noCalendar||n.isMobile||(j(),vi(),T())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(P){P.preventDefault(),P.stopPropagation();var L=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=ug(Yt(P),L);if(K!==void 0){var J=K,ie=n.latestSelectedDateObj=new Date(J.dateObj.getTime()),ce=(ie.getMonth()<n.currentMonth||ie.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=J,n.config.mode==="single")n.selectedDates=[ie];else if(n.config.mode==="multiple"){var Ce=So(ie);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(ie)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ie,n.selectedDates.push(ie),Kt(ie,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,De){return me.getTime()-De.getTime()}));if(f(),ce){var ue=n.currentYear!==ie.getFullYear();n.currentYear=ie.getFullYear(),n.currentMonth=ie.getMonth(),ue&&(ze("onYearChange"),j()),ze("onMonthChange")}if(vi(),T(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(J):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var we=n.config.mode==="single"&&!n.config.enableTime,fe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(we||fe)&&Ee()}v()}}var St={locale:[he,q],showMonths:[z,s,W],minDate:[I],maxDate:[I],positionElement:[Io],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(P,L){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var K in P)St[K]!==void 0&&St[K].forEach(function(J){return J()})}else n.config[P]=L,St[P]!==void 0?St[P].forEach(function(J){return J()}):Vc.indexOf(P)>-1&&(n.config[P]=Hc(L));n.redraw(),un(!0)}function Lt(P,L){var K=[];if(P instanceof Array)K=P.map(function(J){return n.parseDate(J,L)});else if(P instanceof Date||typeof P=="number")K=[n.parseDate(P,L)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(P,L)];break;case"multiple":K=P.split(n.config.conjunction).map(function(J){return n.parseDate(J,L)});break;case"range":K=P.split(n.l10n.rangeSeparator).map(function(J){return n.parseDate(J,L)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(J){return J instanceof Date&&X(J,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(J,ie){return J.getTime()-ie.getTime()})}function qt(P,L,K){if(L===void 0&&(L=!1),K===void 0&&(K=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(L);Lt(P,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),I(void 0,L),h(),n.selectedDates.length===0&&n.clear(!1),un(L),L&&ze("onChange")}function ar(P){return P.slice().map(function(L){return typeof L=="string"||typeof L=="number"||L instanceof Date?n.parseDate(L,void 0,!0):L&&typeof L=="object"&&L.from&&L.to?{from:n.parseDate(L.from,void 0),to:n.parseDate(L.to,void 0)}:L}).filter(function(L){return L})}function Rs(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&Lt(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function In(){if(n.input=de(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=Le(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),Io()}function Io(){n._positionElement=n.config.positionElement||n._input}function Ru(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Le("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(L){}g(n.mobileInput,"change",function(L){n.setDate(Yt(L).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function Lu(P){if(n.isOpen===!0)return n.close();n.open(P)}function ze(P,L){if(n.config!==void 0){var K=n.config[P];if(K!==void 0&&K.length>0)for(var J=0;K[J]&&J<K.length;J++)K[J](n.selectedDates,n.input.value,n,L);P==="onChange"&&(n.input.dispatchEvent(mi("change")),n.input.dispatchEvent(mi("input")))}}function mi(P){var L=document.createEvent("Event");return L.initEvent(P,!0,!0),L}function So(P){for(var L=0;L<n.selectedDates.length;L++){var K=n.selectedDates[L];if(K instanceof Date&&Kt(K,P)===0)return""+L}return!1}function Ls(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(P,n.selectedDates[0])>=0&&Kt(P,n.selectedDates[1])<=0}function vi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,L){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+L),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[L].textContent=ts(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),P.value=K.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Ao(P){var L=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,L)}).filter(function(K,J,ie){return n.config.mode!=="range"||n.config.enableTime||ie.indexOf(K)===J}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Ao(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=Ao(n.config.altFormat)),P!==!1&&ze("onValueUpdate")}function Ms(P){var L=Yt(P),K=n.prevMonthNav.contains(L),J=n.nextMonthNav.contains(L);K||J?R(K?-1:1):n.yearElements.indexOf(L)>=0?L.select():L.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):L.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Ct(P){P.preventDefault();var L=P.type==="keydown",K=Yt(P),J=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var ie=parseFloat(J.getAttribute("min")),ce=parseFloat(J.getAttribute("max")),Ce=parseFloat(J.getAttribute("step")),ue=parseInt(J.value,10),we=P.delta||(L?P.which===38?1:-1:0),fe=ue+Ce*we;if(typeof J.value!="undefined"&&J.value.length===2){var me=J===n.hourElement,De=J===n.minuteElement;fe<ie?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),De&&w(void 0,-1,n.hourElement)):fe>ce&&(fe=J===n.hourElement?fe-ce-rn(!n.amPM):ie,De&&w(void 0,1,n.hourElement)),n.amPM&&me&&(Ce===1?fe+ue===23:Math.abs(fe-ue)>Ce)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),J.value=zt(fe)}}return i(),n}function oi(e,t){for(var n=Array.prototype.slice.call(e).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var o=n[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=PP(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return oi(this,e)},HTMLElement.prototype.flatpickr=function(e){return oi([this],e)});var ht=function(e,t){return typeof e=="string"?oi(window.document.querySelectorAll(e),t):e instanceof Node?oi([e],t):oi(e,t)};ht.defaultConfig={},ht.l10ns={en:Et({},ro),default:Et({},ro)},ht.localize=function(e){ht.l10ns.default=Et(Et({},ht.l10ns.default),e)},ht.setDefaults=function(e){ht.defaultConfig=Et(Et({},ht.defaultConfig),e)},ht.parseDate=Gc({}),ht.formatDate=dg({}),ht.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return oi(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))},typeof window!="undefined"&&(window.flatpickr=ht);const DP=$u(Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(C),r=o(DI),i=o(DP);function o(R){return R&&R.__esModule?R:{default:R}}function a(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return a=function(){return R},R}function s(R){if(R&&R.__esModule)return R;if(R===null||t(R)!=="object"&&typeof R!="function")return{default:R};var M=a();if(M&&M.has(R))return M.get(R);var U={},H=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ne in R)if(Object.prototype.hasOwnProperty.call(R,ne)){var se=H?Object.getOwnPropertyDescriptor(R,ne):null;se&&(se.get||se.set)?Object.defineProperty(U,ne,se):U[ne]=R[ne]}return U.default=R,M&&M.set(R,U),U}function l(R){return h(R)||f(R)||d(R)||c()}function c(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2458
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(R,M){if(R){if(typeof R=="string")return p(R,M);var U=Object.prototype.toString.call(R).slice(8,-1);if(U==="Object"&&R.constructor&&(U=R.constructor.name),U==="Map"||U==="Set")return Array.from(R);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return p(R,M)}}function f(R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R))return Array.from(R)}function h(R){if(Array.isArray(R))return p(R)}function p(R,M){(M==null||M>R.length)&&(M=R.length);for(var U=0,H=new Array(M);U<M;U++)H[U]=R[U];return H}function m(){return m=Object.assign||function(R){for(var M=1;M<arguments.length;M++){var U=arguments[M];for(var H in U)Object.prototype.hasOwnProperty.call(U,H)&&(R[H]=U[H])}return R},m.apply(this,arguments)}function g(R,M){if(R==null)return{};var U=v(R,M),H,ne;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(ne=0;ne<se.length;ne++)H=se[ne],!(M.indexOf(H)>=0)&&Object.prototype.propertyIsEnumerable.call(R,H)&&(U[H]=R[H])}return U}function v(R,M){if(R==null)return{};var U={},H=Object.keys(R),ne,se;for(se=0;se<H.length;se++)ne=H[se],!(M.indexOf(ne)>=0)&&(U[ne]=R[ne]);return U}function S(R,M){var U=Object.keys(R);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(R);M&&(H=H.filter(function(ne){return Object.getOwnPropertyDescriptor(R,ne).enumerable})),U.push.apply(U,H)}return U}function I(R){for(var M=1;M<arguments.length;M++){var U=arguments[M]!=null?arguments[M]:{};M%2?S(Object(U),!0).forEach(function(H){j(R,H,U[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(U)):S(Object(U)).forEach(function(H){Object.defineProperty(R,H,Object.getOwnPropertyDescriptor(U,H))})}return R}function x(R,M){if(!(R instanceof M))throw new TypeError("Cannot call a class as a function")}function w(R,M){for(var U=0;U<M.length;U++){var H=M[U];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(R,H.key,H)}}function y(R,M,U){return M&&w(R.prototype,M),R}function A(R,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(M&&M.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),M&&E(R,M)}function E(R,M){return E=Object.setPrototypeOf||function(H,ne){return H.__proto__=ne,H},E(R,M)}function _(R){var M=F();return function(){var H=T(R),ne;if(M){var se=T(this).constructor;ne=Reflect.construct(H,arguments,se)}else ne=H.apply(this,arguments);return D(this,ne)}}function D(R,M){return M&&(t(M)==="object"||typeof M=="function")?M:G(R)}function G(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function F(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(R){return!1}}function T(R){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(R)}function j(R,M,U){return M in R?Object.defineProperty(R,M,{value:U,enumerable:!0,configurable:!0,writable:!0}):R[M]=U,R}var Y=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],z=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],B=r.default.func,W=function(R){A(U,R);var M=_(U);function U(){var H;x(this,U);for(var ne=arguments.length,se=new Array(ne),ae=0;ae<ne;ae++)se[ae]=arguments[ae];return H=M.call.apply(M,[this].concat(se)),j(G(H),"createFlatpickrInstance",function(){var X=I({onClose:function(){H.node.blur&&H.node.blur()}},H.props.options);X=q(X,H.props),H.flatpickr=(0,i.default)(H.node,X),H.props.hasOwnProperty("value")&&H.flatpickr.setDate(H.props.value,!1);var le=H.props.onCreate;le&&le(H.flatpickr)}),j(G(H),"destroyFlatpickrInstance",function(){var X=H.props.onDestroy;X&&X(H.flatpickr),H.flatpickr.destroy(),H.flatpickr=null}),j(G(H),"handleNodeChange",function(X){H.node=X,H.flatpickr&&(H.destroyFlatpickrInstance(),H.createFlatpickrInstance())}),H}return y(U,[{key:"componentDidUpdate",value:function(ne){var se=this.props.options,ae=ne.options;se=q(se,this.props),ae=q(ae,ne);for(var X=Object.getOwnPropertyNames(se),le=X.length-1;le>=0;le--){var re=X[le],ge=se[re];ge!==ae[re]&&(Y.indexOf(re)!==-1&&!Array.isArray(ge)&&(ge=[ge]),this.flatpickr.set(re,ge))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&ne.value&&Array.isArray(ne.value)&&this.props.value.every(function(Se,Ve){ne[Ve]}))&&this.props.value!==ne.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var ne=this.props,se=ne.options,ae=ne.defaultValue,X=ne.value,le=ne.children,re=ne.render,ge=g(ne,["options","defaultValue","value","children","render"]);return Y.forEach(function(Se){delete ge[Se]}),$.forEach(function(Se){delete ge[Se]}),re?re(I(I({},ge),{},{defaultValue:ae,value:X}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},ge,{defaultValue:ae,ref:this.handleNodeChange}))}}]),U}(n.Component);j(W,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:z,onOpen:z,onClose:z,onMonthChange:z,onYearChange:z,onReady:z,onValueUpdate:z,onDayCreate:z,onCreate:B,onDestroy:B,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),j(W,"defaultProps",{options:{}});function q(R,M){var U=I({},R);return Y.forEach(function(H){if(M.hasOwnProperty(H)){var ne;U[H]&&!Array.isArray(U[H])?U[H]=[U[H]]:U[H]||(U[H]=[]);var se=Array.isArray(M[H])?M[H]:[M[H]];(ne=U[H]).push.apply(ne,l(se))}}),U}var ee=W;e.default=ee})(lg);const hg=fn(lg);var pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var z=["th","st","nd","rd"],$=Y%100;return"["+Y+(z[($-20)%10]||z[$]||z[0])+"]"}},x=function(Y,z,$){var B=String(Y);return!B||B.length>=z?Y:""+Array(z+1-B.length).join($)+Y},w={s:x,z:function(Y){var z=-Y.utcOffset(),$=Math.abs(z),B=Math.floor($/60),W=$%60;return(z<=0?"+":"-")+x(B,2,"0")+":"+x(W,2,"0")},m:function Y(z,$){if(z.date()<$.date())return-Y($,z);var B=12*($.year()-z.year())+($.month()-z.month()),W=z.clone().add(B,f),q=$-W<0,ee=z.clone().add(B+(q?-1:1),f);return+(-(B+($-W)/(q?W-ee:ee-W))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:c,D:m,h:l,m:s,s:a,ms:o,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},y="en",A={};A[y]=I;var E="$isDayjsObject",_=function(Y){return Y instanceof T||!(!Y||!Y[E])},D=function Y(z,$,B){var W;if(!z)return y;if(typeof z=="string"){var q=z.toLowerCase();A[q]&&(W=q),$&&(A[q]=$,W=q);var ee=z.split("-");if(!W&&ee.length>1)return Y(ee[0])}else{var R=z.name;A[R]=z,W=R}return!B&&W&&(y=W),W||!B&&y},G=function(Y,z){if(_(Y))return Y.clone();var $=typeof z=="object"?z:{};return $.date=Y,$.args=arguments,new T($)},F=w;F.l=D,F.i=_,F.w=function(Y,z){return G(Y,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var T=function(){function Y($){this.$L=D($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var z=Y.prototype;return z.parse=function($){this.$d=function(B){var W=B.date,q=B.utc;if(W===null)return new Date(NaN);if(F.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var ee=W.match(v);if(ee){var R=ee[2]-1||0,M=(ee[7]||"0").substring(0,3);return q?new Date(Date.UTC(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)):new Date(ee[1],R,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,M)}}return new Date(W)}($),this.init()},z.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},z.$utils=function(){return F},z.isValid=function(){return this.$d.toString()!==g},z.isSame=function($,B){var W=G($);return this.startOf(B)<=W&&W<=this.endOf(B)},z.isAfter=function($,B){return G($)<this.startOf(B)},z.isBefore=function($,B){return this.endOf(B)<G($)},z.$g=function($,B,W){return F.u($)?this[B]:this.set(W,$)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function($,B){var W=this,q=!!F.u(B)||B,ee=F.p($),R=function(le,re){var ge=F.w(W.$u?Date.UTC(W.$y,re,le):new Date(W.$y,re,le),W);return q?ge:ge.endOf(c)},M=function(le,re){return F.w(W.toDate()[le].apply(W.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(re)),W)},U=this.$W,H=this.$M,ne=this.$D,se="set"+(this.$u?"UTC":"");switch(ee){case p:return q?R(1,0):R(31,11);case f:return q?R(1,H):R(0,H+1);case d:var ae=this.$locale().weekStart||0,X=(U<ae?U+7:U)-ae;return R(q?ne-X:ne+(6-X),H);case c:case m:return M(se+"Hours",0);case l:return M(se+"Minutes",1);case s:return M(se+"Seconds",2);case a:return M(se+"Milliseconds",3);default:return this.clone()}},z.endOf=function($){return this.startOf($,!1)},z.$set=function($,B){var W,q=F.p($),ee="set"+(this.$u?"UTC":""),R=(W={},W[c]=ee+"Date",W[m]=ee+"Date",W[f]=ee+"Month",W[p]=ee+"FullYear",W[l]=ee+"Hours",W[s]=ee+"Minutes",W[a]=ee+"Seconds",W[o]=ee+"Milliseconds",W)[q],M=q===c?this.$D+(B-this.$W):B;if(q===f||q===p){var U=this.clone().set(m,1);U.$d[R](M),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](M);return this.init(),this},z.set=function($,B){return this.clone().$set($,B)},z.get=function($){return this[F.p($)]()},z.add=function($,B){var W,q=this;$=Number($);var ee=F.p(B),R=function(H){var ne=G(q);return F.w(ne.date(ne.date()+Math.round(H*$)),q)};if(ee===f)return this.set(f,this.$M+$);if(ee===p)return this.set(p,this.$y+$);if(ee===c)return R(1);if(ee===d)return R(7);var M=(W={},W[s]=r,W[l]=i,W[a]=n,W)[ee]||1,U=this.$d.getTime()+$*M;return F.w(U,this)},z.subtract=function($,B){return this.add(-1*$,B)},z.format=function($){var B=this,W=this.$locale();if(!this.isValid())return W.invalidDate||g;var q=$||"YYYY-MM-DDTHH:mm:ssZ",ee=F.z(this),R=this.$H,M=this.$m,U=this.$M,H=W.weekdays,ne=W.months,se=W.meridiem,ae=function(re,ge,Se,Ve){return re&&(re[ge]||re(B,q))||Se[ge].slice(0,Ve)},X=function(re){return F.s(R%12||12,re,"0")},le=se||function(re,ge,Se){var Ve=re<12?"AM":"PM";return Se?Ve.toLowerCase():Ve};return q.replace(S,function(re,ge){return ge||function(Se){switch(Se){case"YY":return String(B.$y).slice(-2);case"YYYY":return F.s(B.$y,4,"0");case"M":return U+1;case"MM":return F.s(U+1,2,"0");case"MMM":return ae(W.monthsShort,U,ne,3);case"MMMM":return ae(ne,U);case"D":return B.$D;case"DD":return F.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ae(W.weekdaysMin,B.$W,H,2);case"ddd":return ae(W.weekdaysShort,B.$W,H,3);case"dddd":return H[B.$W];case"H":return String(R);case"HH":return F.s(R,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return le(R,M,!0);case"A":return le(R,M,!1);case"m":return String(M);case"mm":return F.s(M,2,"0");case"s":return String(B.$s);case"ss":return F.s(B.$s,2,"0");case"SSS":return F.s(B.$ms,3,"0");case"Z":return ee}return null}(re)||ee.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function($,B,W){var q,ee=this,R=F.p(B),M=G($),U=(M.utcOffset()-this.utcOffset())*r,H=this-M,ne=function(){return F.m(ee,M)};switch(R){case p:q=ne()/12;break;case f:q=ne();break;case h:q=ne()/3;break;case d:q=(H-U)/6048e5;break;case c:q=(H-U)/864e5;break;case l:q=H/i;break;case s:q=H/r;break;case a:q=H/n;break;default:q=H}return W?q:F.a(q)},z.daysInMonth=function(){return this.endOf(f).$D},z.$locale=function(){return A[this.$L]},z.locale=function($,B){if(!$)return this.$L;var W=this.clone(),q=D($,B,!0);return q&&(W.$L=q),W},z.clone=function(){return F.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},Y}(),j=T.prototype;return G.prototype=j,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(Y){j[Y[1]]=function(z){return this.$g(z,Y[0],Y[1])}}),G.extend=function(Y,z){return Y.$i||(Y(z,T,G),Y.$i=!0),G},G.locale=D,G.isDayjs=_,G.unix=function(Y){return G(1e3*Y)},G.en=A[y],G.Ls=A,G.p={},G})})(pg);var OP=pg.exports;const kt=fn(OP);var gg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var s,l=function(h,p,m){m===void 0&&(m={});var g=new Date(h),v=function(S,I){I===void 0&&(I={});var x=I.timeZoneName||"short",w=S+"|"+x,y=r[w];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),r[w]=y),y}(p,m);return v.formatToParts(g)},c=function(h,p){for(var m=l(h,p),g=[],v=0;v<m.length;v+=1){var S=m[v],I=S.type,x=S.value,w=n[I];w>=0&&(g[w]=parseInt(x,10))}var y=g[3],A=y===24?0:y,E=g[0]+"-"+g[1]+"-"+g[2]+" "+A+":"+g[4]+":"+g[5]+":000",_=+h;return(a.utc(E).valueOf()-(_-=_%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=s);var m,g=this.utcOffset(),v=this.toDate(),S=v.toLocaleString("en-US",{timeZone:h}),I=Math.round((v-new Date(S))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-I;if(!Number(x))m=this.utcOffset(0,p);else if(m=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),p){var w=m.utcOffset();m=m.add(g-w,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=l(this.valueOf(),p,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return m&&m.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(m,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,m){var g=m&&p,v=m||p||s,S=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var I=function(A,E,_){var D=A-60*E*1e3,G=c(D,_);if(E===G)return[D,E];var F=c(D-=60*(G-E)*1e3,_);return G===F?[D,G]:[A-60*Math.min(G,F)*1e3,Math.max(G,F)]}(a.utc(h,g).valueOf(),S,v),x=I[0],w=I[1],y=a(x).utcOffset(w);return y.$x.$timezone=v,y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){s=h}}})})(gg);var RP=gg.exports;const LP=fn(RP);var mg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var l=a.prototype;s.utc=function(g){var v={date:g,utc:!0,args:arguments};return new a(v)},l.utc=function(g){var v=s(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),n):v},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var d=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(g,v){var S=this.$utils().u;if(S(g))return this.$u?0:S(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(y){y===void 0&&(y="");var A=y.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],_=E[0],D=60*+E[1]+ +E[2];return D===0?0:_==="+"?D:-D}(g),g===null))return this;var I=Math.abs(g)<=16?60*g:g,x=this;if(v)return x.$offset=I,x.$u=g===0,x;if(g!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(I+w,n)).$offset=I,x.$x.$localOffset=w}else x=this.utc();return x};var h=l.format;l.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=l.diff;l.diff=function(g,v,S){if(g&&this.$u===g.$u)return m.call(this,g,v,S);var I=this.local(),x=s(g).local();return m.call(I,x,v,S)}}})})(mg);var MP=mg.exports;const BP=fn(MP);kt.extend(LP),kt.extend(BP);const $P=e=>{if(!kt(e).isAfter(kt(Date.now()).subtract(15,"minute")))return kt(Date.now()).add(15,"minute").toDate()},qc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const s=kt.utc(a[0]).toISOString();i(s)}else i("")};return u.jsx(b.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",paddingLeft:"0.5rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,minHeight:"37px",color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:u.jsx(hg,{value:e&&kt(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||$P(e),maxDate:n,parseDate:(a,s)=>kt(a,s).toDate(),formatDate:(a,s)=>kt(a).format(s),time_24hr:!0,minuteIncrement:1}})})},NP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(b.Box,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormControl,{children:u.jsx(b.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(b.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[u.jsx(no,{label:"From date",defaultValue:i,required:e,onChange:n}),u.jsx(no,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},vg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(kt(t).toDate()),n&&r.push(kt(n).toDate()),r},FP=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=C.useState(vg(t)),[a,s]=C.useState(!1),l=()=>s(!a),c=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=kt(d[0]).format(f),p=kt(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),l());o(d)};return u.jsxs(b.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{required:n,color:"primary",children:e}),u.jsx(b.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",padding:"0.5rem 0.75rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:u.jsx(hg,{value:i,onChange:c,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>kt(d,f).toDate(),formatDate:(d,f)=>kt(d).format(f),defaultDate:vg(t)||void 0}})}),u.jsx(at,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:l})]})},zP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{Ui(e).signOut().then(()=>n(null)).catch(s=>{console.error("There was a problem logging out the user:",s)})};return u.jsx(b.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(b.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(b.CardContent,{children:[u.jsx(b.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(b.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(b.Box,{display:"flex",justifyContent:"center",children:u.jsx(b.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},bg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],Qc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),jP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=C.useState(bg(n)),[a,s]=C.useState(null),[l,c]=C.useState(""),[d,f]=C.useState(""),[h,p]=C.useState(""),[m,g]=C.useState("");C.useEffect(()=>o(bg(n)),[n]);const v=()=>{const w=[...i];w.push({key:l,value:h}),o(w),c(""),p(""),r(Qc(w))},S=w=>{const y=i.filter((A,E)=>E!==w);o(y),r(Qc(y))},I=(w,y)=>{f(y.key),g(y.value),s(w)},x=w=>{const y=[...i];y[w]={key:d,value:m},o(y),s(null),f(""),g(""),r(Qc(y))};return u.jsxs(b.Box,{children:[i.map((w,y)=>u.jsx(b.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(b.CardContent,{style:{flex:1},children:a===y?u.jsxs(b.Box,{display:"flex",alignItems:"center",children:[u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:A=>f(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:A=>g(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Tooltip,{title:e.save,children:d&&m?u.jsx(b.IconButton,{onClick:()=>x(y),children:u.jsx(Oe.Check,{})}):u.jsx("span",{children:u.jsx(b.IconButton,{disabled:!0,children:u.jsx(Oe.Check,{})})})})]}):u.jsxs(b.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:w.key})]}),u.jsxs(b.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:w.value})]})]}),u.jsxs(b.Box,{children:[u.jsx(b.Tooltip,{title:e.edit,children:u.jsx(b.IconButton,{onClick:()=>I(y,w),children:u.jsx(Oe.Edit,{})})}),u.jsx(b.Tooltip,{title:e.delete,children:u.jsx(b.IconButton,{onClick:()=>S(y),children:u.jsx(Oe.Delete,{})})})]})]})})},`dynamic-fields-${t}-${y}`)),u.jsxs(b.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",value:l,placeholder:e.keyDynamicFields,onChange:w=>c(w.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:w=>p(w.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Tooltip,{title:e.add,children:l&&h?u.jsx(b.Button,{onClick:v,children:u.jsx(Oe.Add,{})}):u.jsx("span",{children:u.jsx(b.Button,{disabled:!0,children:u.jsx(Oe.Add,{})})})})]})]})};function oo(e,t,n){return(t=tc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yg(Object(n),!0).forEach(function(r){oo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tc(r.key),r)}}function VP(e,t,n){return t&&xg(e.prototype,t),n&&xg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jc(e,t)}function HP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(e)}function Cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Cg=function(){return!!e})()}function WP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GP(e,t){if(t&&(br(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WP(e)}function YP(e){var t=Cg();return function(){var n,r=ns(e);if(t){var i=ns(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return GP(this,n)}}function Xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KP(e){if(Array.isArray(e))return Xc(e)}function qP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wg(e,t){if(e){if(typeof e=="string")return Xc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xc(e,t):void 0}}function QP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2459
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ai(e){return KP(e)||
|
|
2457
|
+
`}}function te(){n.calendarContainer.classList.add("hasWeeks");var P=Le("div","flatpickr-weekwrapper");P.appendChild(Le("span","flatpickr-weekday",n.l10n.weekAbbreviation));var L=Le("div","flatpickr-weeks");return P.appendChild(L),{weekWrapper:P,weekNumbers:L}}function R(P,L){L===void 0&&(L=!0);var K=L?P:P-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ze("onYearChange"),j()),T(),ze("onMonthChange"),vi())}function M(P,L){if(P===void 0&&(P=!0),L===void 0&&(L=!0),n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,L===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){var K=Kc(n.config),J=K.hours,ie=K.minutes,ce=K.seconds;p(J,ie,ce)}n.redraw(),P&&ze("onChange")}function U(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ze("onClose")}function H(){n.config!==void 0&&ze("onDestroy");for(var P=n._handlers.length;P--;)n._handlers[P].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var L=n.calendarContainer.parentNode;if(L.lastChild&&L.removeChild(L.lastChild),L.parentNode){for(;L.firstChild;)L.parentNode.insertBefore(L.firstChild,L);L.parentNode.removeChild(L)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(K){try{delete n[K]}catch(J){}})}function ne(P){return n.calendarContainer.contains(P)}function se(P){if(n.isOpen&&!n.config.inline){var L=Yt(P),K=ne(L),J=L===n.input||L===n.altInput||n.element.contains(L)||P.path&&P.path.indexOf&&(~P.path.indexOf(n.input)||~P.path.indexOf(n.altInput)),ie=!J&&!K&&!ne(P.relatedTarget),ce=!n.config.ignoredFocusElements.some(function(Ce){return Ce.contains(L)});ie&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function ae(P){if(!(!P||n.config.minDate&&P<n.config.minDate.getFullYear()||n.config.maxDate&&P>n.config.maxDate.getFullYear())){var L=P,K=n.currentYear!==L;n.currentYear=L||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),K&&(n.redraw(),ze("onYearChange"),j())}}function X(P,L){var K;L===void 0&&(L=!0);var J=n.parseDate(P,void 0,L);if(n.config.minDate&&J&&Kt(J,n.config.minDate,L!==void 0?L:!n.minDateHasTime)<0||n.config.maxDate&&J&&Kt(J,n.config.maxDate,L!==void 0?L:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(J===void 0)return!1;for(var ie=!!n.config.enable,ce=(K=n.config.enable)!==null&&K!==void 0?K:n.config.disable,Ce=0,ue=void 0;Ce<ce.length;Ce++){if(ue=ce[Ce],typeof ue=="function"&&ue(J))return ie;if(ue instanceof Date&&J!==void 0&&ue.getTime()===J.getTime())return ie;if(typeof ue=="string"){var we=n.parseDate(ue,void 0,!0);return we&&we.getTime()===J.getTime()?ie:!ie}else if(typeof ue=="object"&&J!==void 0&&ue.from&&ue.to&&J.getTime()>=ue.from.getTime()&&J.getTime()<=ue.to.getTime())return ie}return!ie}function le(P){return n.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(P):!1}function re(P){var L=P.target===n._input,K=n._input.value.trimEnd()!==Ao();L&&K&&!(P.relatedTarget&&ne(P.relatedTarget))&&n.setDate(n._input.value,!0,P.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function ge(P){var L=Yt(P),K=n.config.wrap?e.contains(L):L===n._input,J=n.config.allowInput,ie=n.isOpen&&(!J||!K),ce=n.config.inline&&K&&!J;if(P.keyCode===13&&K){if(J)return n.setDate(n._input.value,!0,L===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),L.blur();n.open()}else if(ne(L)||ie||ce){var Ce=!!n.timeContainer&&n.timeContainer.contains(L);switch(P.keyCode){case 13:Ce?(P.preventDefault(),l(),Ee()):It(P);break;case 27:P.preventDefault(),Ee();break;case 8:case 46:K&&!n.config.allowInput&&(P.preventDefault(),n.clear());break;case 37:case 39:if(!Ce&&!K){P.preventDefault();var ue=o();if(n.daysContainer!==void 0&&(J===!1||ue&&le(ue))){var we=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),R(we),G(_(1),0)):G(void 0,we)}}else n.hourElement&&n.hourElement.focus();break;case 38:case 40:P.preventDefault();var fe=P.keyCode===40?1:-1;n.daysContainer&&L.$i!==void 0||L===n.input||L===n.altInput?P.ctrlKey?(P.stopPropagation(),ae(n.currentYear-fe),G(_(1),0)):Ce||G(void 0,fe*7):L===n.currentYearElement?ae(n.currentYear-fe):n.config.enableTime&&(!Ce&&n.hourElement&&n.hourElement.focus(),l(P),n._debouncedChange());break;case 9:if(Ce){var me=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter(function(nt){return nt}),De=me.indexOf(L);if(De!==-1){var Pt=me[De+(P.shiftKey?-1:1)];P.preventDefault(),(Pt||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(L)&&P.shiftKey&&(P.preventDefault(),n._input.focus());break}}if(n.amPM!==void 0&&L===n.amPM)switch(P.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],f(),un();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],f(),un();break}(K||ne(L))&&ze("onKeyDown",P)}function Se(P,L){if(L===void 0&&(L="flatpickr-day"),!(n.selectedDates.length!==1||P&&(!P.classList.contains(L)||P.classList.contains("flatpickr-disabled")))){for(var K=P?P.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),J=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),ie=Math.min(K,n.selectedDates[0].getTime()),ce=Math.max(K,n.selectedDates[0].getTime()),Ce=!1,ue=0,we=0,fe=ie;fe<ce;fe+=kP.DAY)X(new Date(fe),!0)||(Ce=Ce||fe>ie&&fe<ce,fe<J&&(!ue||fe>ue)?ue=fe:fe>J&&(!we||fe<we)&&(we=fe));var me=Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+L));me.forEach(function(De){var Pt=De.dateObj,nt=Pt.getTime(),dn=ue>0&&nt<ue||we>0&&nt>we;if(dn){De.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Sn){De.classList.remove(Sn)});return}else if(Ce&&!dn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Sn){De.classList.remove(Sn)}),P!==void 0&&(P.classList.add(K<=n.selectedDates[0].getTime()?"startRange":"endRange"),J<K&&nt===J?De.classList.add("startRange"):J>K&&nt===J&&De.classList.add("endRange"),nt>=ue&&(we===0||nt<=we)&&TP(nt,J,K)&&De.classList.add("inRange"))})}}function Ve(){n.isOpen&&!n.config.static&&!n.config.inline&&xe()}function wt(P,L){if(L===void 0&&(L=n._positionElement),n.isMobile===!0){if(P){P.preventDefault();var K=Yt(P);K&&K.blur()}n.mobileInput!==void 0&&(n.mobileInput.focus(),n.mobileInput.click()),ze("onOpen");return}else if(n._input.disabled||n.config.inline)return;var J=n.isOpen;n.isOpen=!0,J||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ze("onOpen"),xe(L)),n.config.enableTime===!0&&n.config.noCalendar===!0&&n.config.allowInput===!1&&(P===void 0||!n.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return n.hourElement.select()},50)}function lt(P){return function(L){var K=n.config["_"+P+"Date"]=n.parseDate(L,n.config.dateFormat),J=n.config["_"+(P==="min"?"max":"min")+"Date"];K!==void 0&&(n[P==="min"?"minDateHasTime":"maxDateHasTime"]=K.getHours()>0||K.getMinutes()>0||K.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter(function(ie){return X(ie)}),!n.selectedDates.length&&P==="min"&&h(K),un()),n.daysContainer&&(Pe(),K!==void 0?n.currentYearElement[P]=K.getFullYear().toString():n.currentYearElement.removeAttribute(P),n.currentYearElement.disabled=!!J&&K!==void 0&&J.getFullYear()===K.getFullYear())}}function _t(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],L=Et(Et({},JSON.parse(JSON.stringify(e.dataset||{}))),t),K={};n.config.parseDate=L.parseDate,n.config.formatDate=L.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(me){n.config._enable=ar(me)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(me){n.config._disable=ar(me)}});var J=L.mode==="time";if(!L.dateFormat&&(L.enableTime||J)){var ie=ht.defaultConfig.dateFormat||ii.dateFormat;K.dateFormat=L.noCalendar||J?"H:i"+(L.enableSeconds?":S":""):ie+" H:i"+(L.enableSeconds?":S":"")}if(L.altInput&&(L.enableTime||J)&&!L.altFormat){var ce=ht.defaultConfig.altFormat||ii.altFormat;K.altFormat=L.noCalendar||J?"h:i"+(L.enableSeconds?":S K":" K"):ce+(" h:i"+(L.enableSeconds?":S":"")+" K")}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:lt("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:lt("max")});var Ce=function(me){return function(De){n.config[me==="min"?"_minTime":"_maxTime"]=n.parseDate(De,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:Ce("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:Ce("max")}),L.mode==="time"&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,K,L);for(var ue=0;ue<P.length;ue++)n.config[P[ue]]=n.config[P[ue]]===!0||n.config[P[ue]]==="true";Vc.filter(function(me){return n.config[me]!==void 0}).forEach(function(me){n.config[me]=Hc(n.config[me]||[]).map(a)}),n.isMobile=!n.config.disableMobile&&!n.config.inline&&n.config.mode==="single"&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ue=0;ue<n.config.plugins.length;ue++){var we=n.config.plugins[ue](n)||{};for(var fe in we)Vc.indexOf(fe)>-1?n.config[fe]=Hc(we[fe]).map(a).concat(n.config[fe]):typeof L[fe]=="undefined"&&(n.config[fe]=we[fe])}L.altInputClass||(n.config.altInputClass=de().className+" "+n.config.altInputClass),ze("onParseConfig")}function de(){return n.config.wrap?e.querySelector("[data-input]"):e}function he(){typeof n.config.locale!="object"&&typeof ht.l10ns[n.config.locale]=="undefined"&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Et(Et({},ht.l10ns.default),typeof n.config.locale=="object"?n.config.locale:n.config.locale!=="default"?ht.l10ns[n.config.locale]:void 0),wr.D="("+n.l10n.weekdays.shorthand.join("|")+")",wr.l="("+n.l10n.weekdays.longhand.join("|")+")",wr.M="("+n.l10n.months.shorthand.join("|")+")",wr.F="("+n.l10n.months.longhand.join("|")+")",wr.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")";var P=Et(Et({},t),JSON.parse(JSON.stringify(e.dataset||{})));P.time_24hr===void 0&&ht.defaultConfig.time_24hr===void 0&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=dg(n),n.parseDate=Gc({config:n.config,l10n:n.l10n})}function xe(P){if(typeof n.config.position=="function")return void n.config.position(n,P);if(n.calendarContainer!==void 0){ze("onPreCalendarPosition");var L=P||n._positionElement,K=Array.prototype.reduce.call(n.calendarContainer.children,function(TF,EF){return TF+EF.offsetHeight},0),J=n.calendarContainer.offsetWidth,ie=n.config.position.split(" "),ce=ie[0],Ce=ie.length>1?ie[1]:null,ue=L.getBoundingClientRect(),we=window.innerHeight-ue.bottom,fe=ce==="above"||ce!=="below"&&we<K&&ue.top>K,me=window.pageYOffset+ue.top+(fe?-K-2:L.offsetHeight+2);if(Ot(n.calendarContainer,"arrowTop",!fe),Ot(n.calendarContainer,"arrowBottom",fe),!n.config.inline){var De=window.pageXOffset+ue.left,Pt=!1,nt=!1;Ce==="center"?(De-=(J-ue.width)/2,Pt=!0):Ce==="right"&&(De-=J-ue.width,nt=!0),Ot(n.calendarContainer,"arrowLeft",!Pt&&!nt),Ot(n.calendarContainer,"arrowCenter",Pt),Ot(n.calendarContainer,"arrowRight",nt);var dn=window.document.body.offsetWidth-(window.pageXOffset+ue.right),Sn=De+J>window.document.body.offsetWidth,yF=dn+J>window.document.body.offsetWidth;if(Ot(n.calendarContainer,"rightMost",Sn),!n.config.static)if(n.calendarContainer.style.top=me+"px",!Sn)n.calendarContainer.style.left=De+"px",n.calendarContainer.style.right="auto";else if(!yF)n.calendarContainer.style.left="auto",n.calendarContainer.style.right=dn+"px";else{var Mu=Te();if(Mu===void 0)return;var xF=window.document.body.offsetWidth,CF=Math.max(0,xF/2-J/2),wF=".flatpickr-calendar.centerMost:before",IF=".flatpickr-calendar.centerMost:after",SF=Mu.cssRules.length,AF="{left:"+ue.left+"px;right:auto;}";Ot(n.calendarContainer,"rightMost",!1),Ot(n.calendarContainer,"centerMost",!0),Mu.insertRule(wF+","+IF+AF,SF),n.calendarContainer.style.left=CF+"px",n.calendarContainer.style.right="auto"}}}}function Te(){for(var P=null,L=0;L<document.styleSheets.length;L++){var K=document.styleSheets[L];if(K.cssRules){try{K.cssRules}catch(J){continue}P=K;break}}return P!=null?P:He()}function He(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function Pe(){n.config.noCalendar||n.isMobile||(j(),vi(),T())}function Ee(){n._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(n.close,0):n.close()}function It(P){P.preventDefault(),P.stopPropagation();var L=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},K=ug(Yt(P),L);if(K!==void 0){var J=K,ie=n.latestSelectedDateObj=new Date(J.dateObj.getTime()),ce=(ie.getMonth()<n.currentMonth||ie.getMonth()>n.currentMonth+n.config.showMonths-1)&&n.config.mode!=="range";if(n.selectedDateElem=J,n.config.mode==="single")n.selectedDates=[ie];else if(n.config.mode==="multiple"){var Ce=So(ie);Ce?n.selectedDates.splice(parseInt(Ce),1):n.selectedDates.push(ie)}else n.config.mode==="range"&&(n.selectedDates.length===2&&n.clear(!1,!1),n.latestSelectedDateObj=ie,n.selectedDates.push(ie),Kt(ie,n.selectedDates[0],!0)!==0&&n.selectedDates.sort(function(me,De){return me.getTime()-De.getTime()}));if(f(),ce){var ue=n.currentYear!==ie.getFullYear();n.currentYear=ie.getFullYear(),n.currentMonth=ie.getMonth(),ue&&(ze("onYearChange"),j()),ze("onMonthChange")}if(vi(),T(),un(),!ce&&n.config.mode!=="range"&&n.config.showMonths===1?E(J):n.selectedDateElem!==void 0&&n.hourElement===void 0&&n.selectedDateElem&&n.selectedDateElem.focus(),n.hourElement!==void 0&&n.hourElement!==void 0&&n.hourElement.focus(),n.config.closeOnSelect){var we=n.config.mode==="single"&&!n.config.enableTime,fe=n.config.mode==="range"&&n.selectedDates.length===2&&!n.config.enableTime;(we||fe)&&Ee()}v()}}var St={locale:[he,Q],showMonths:[z,s,W],minDate:[I],maxDate:[I],positionElement:[Io],clickOpens:[function(){n.config.clickOpens===!0?(g(n._input,"focus",n.open),g(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function jt(P,L){if(P!==null&&typeof P=="object"){Object.assign(n.config,P);for(var K in P)St[K]!==void 0&&St[K].forEach(function(J){return J()})}else n.config[P]=L,St[P]!==void 0?St[P].forEach(function(J){return J()}):Vc.indexOf(P)>-1&&(n.config[P]=Hc(L));n.redraw(),un(!0)}function Lt(P,L){var K=[];if(P instanceof Array)K=P.map(function(J){return n.parseDate(J,L)});else if(P instanceof Date||typeof P=="number")K=[n.parseDate(P,L)];else if(typeof P=="string")switch(n.config.mode){case"single":case"time":K=[n.parseDate(P,L)];break;case"multiple":K=P.split(n.config.conjunction).map(function(J){return n.parseDate(J,L)});break;case"range":K=P.split(n.l10n.rangeSeparator).map(function(J){return n.parseDate(J,L)});break}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));n.selectedDates=n.config.allowInvalidPreload?K:K.filter(function(J){return J instanceof Date&&X(J,!1)}),n.config.mode==="range"&&n.selectedDates.sort(function(J,ie){return J.getTime()-ie.getTime()})}function Qt(P,L,K){if(L===void 0&&(L=!1),K===void 0&&(K=n.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return n.clear(L);Lt(P,K),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),I(void 0,L),h(),n.selectedDates.length===0&&n.clear(!1),un(L),L&&ze("onChange")}function ar(P){return P.slice().map(function(L){return typeof L=="string"||typeof L=="number"||L instanceof Date?n.parseDate(L,void 0,!0):L&&typeof L=="object"&&L.from&&L.to?{from:n.parseDate(L.from,void 0),to:n.parseDate(L.to,void 0)}:L}).filter(function(L){return L})}function Rs(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var P=n.config.defaultDate||((n.input.nodeName==="INPUT"||n.input.nodeName==="TEXTAREA")&&n.input.placeholder&&n.input.value===n.input.placeholder?null:n.input.value);P&&Lt(P,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),n.config.minTime!==void 0&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),n.config.maxTime!==void 0&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}function In(){if(n.input=de(),!n.input){n.config.errorHandler(new Error("Invalid input element specified"));return}n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=Le(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),Io()}function Io(){n._positionElement=n.config.positionElement||n._input}function Ru(){var P=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=Le("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=P,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",n.altInput!==void 0&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(L){}g(n.mobileInput,"change",function(L){n.setDate(Yt(L).value,!1,n.mobileFormatStr),ze("onChange"),ze("onClose")})}function Lu(P){if(n.isOpen===!0)return n.close();n.open(P)}function ze(P,L){if(n.config!==void 0){var K=n.config[P];if(K!==void 0&&K.length>0)for(var J=0;K[J]&&J<K.length;J++)K[J](n.selectedDates,n.input.value,n,L);P==="onChange"&&(n.input.dispatchEvent(mi("change")),n.input.dispatchEvent(mi("input")))}}function mi(P){var L=document.createEvent("Event");return L.initEvent(P,!0,!0),L}function So(P){for(var L=0;L<n.selectedDates.length;L++){var K=n.selectedDates[L];if(K instanceof Date&&Kt(K,P)===0)return""+L}return!1}function Ls(P){return n.config.mode!=="range"||n.selectedDates.length<2?!1:Kt(P,n.selectedDates[0])>=0&&Kt(P,n.selectedDates[1])<=0}function vi(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach(function(P,L){var K=new Date(n.currentYear,n.currentMonth,1);K.setMonth(n.currentMonth+L),n.config.showMonths>1||n.config.monthSelectorType==="static"?n.monthElements[L].textContent=ts(K.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=K.getMonth().toString(),P.value=K.getFullYear().toString()}),n._hidePrevMonthArrow=n.config.minDate!==void 0&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=n.config.maxDate!==void 0&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Ao(P){var L=P||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map(function(K){return n.formatDate(K,L)}).filter(function(K,J,ie){return n.config.mode!=="range"||n.config.enableTime||ie.indexOf(K)===J}).join(n.config.mode!=="range"?n.config.conjunction:n.l10n.rangeSeparator)}function un(P){P===void 0&&(P=!0),n.mobileInput!==void 0&&n.mobileFormatStr&&(n.mobileInput.value=n.latestSelectedDateObj!==void 0?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Ao(n.config.dateFormat),n.altInput!==void 0&&(n.altInput.value=Ao(n.config.altFormat)),P!==!1&&ze("onValueUpdate")}function Ms(P){var L=Yt(P),K=n.prevMonthNav.contains(L),J=n.nextMonthNav.contains(L);K||J?R(K?-1:1):n.yearElements.indexOf(L)>=0?L.select():L.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):L.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}function Ct(P){P.preventDefault();var L=P.type==="keydown",K=Yt(P),J=K;n.amPM!==void 0&&K===n.amPM&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]);var ie=parseFloat(J.getAttribute("min")),ce=parseFloat(J.getAttribute("max")),Ce=parseFloat(J.getAttribute("step")),ue=parseInt(J.value,10),we=P.delta||(L?P.which===38?1:-1:0),fe=ue+Ce*we;if(typeof J.value!="undefined"&&J.value.length===2){var me=J===n.hourElement,De=J===n.minuteElement;fe<ie?(fe=ce+fe+rn(!me)+(rn(me)&&rn(!n.amPM)),De&&w(void 0,-1,n.hourElement)):fe>ce&&(fe=J===n.hourElement?fe-ce-rn(!n.amPM):ie,De&&w(void 0,1,n.hourElement)),n.amPM&&me&&(Ce===1?fe+ue===23:Math.abs(fe-ue)>Ce)&&(n.amPM.textContent=n.l10n.amPM[rn(n.amPM.textContent===n.l10n.amPM[0])]),J.value=zt(fe)}}return i(),n}function oi(e,t){for(var n=Array.prototype.slice.call(e).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<n.length;i++){var o=n[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=PP(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return oi(this,e)},HTMLElement.prototype.flatpickr=function(e){return oi([this],e)});var ht=function(e,t){return typeof e=="string"?oi(window.document.querySelectorAll(e),t):e instanceof Node?oi([e],t):oi(e,t)};ht.defaultConfig={},ht.l10ns={en:Et({},ro),default:Et({},ro)},ht.localize=function(e){ht.l10ns.default=Et(Et({},ht.l10ns.default),e)},ht.setDefaults=function(e){ht.defaultConfig=Et(Et({},ht.defaultConfig),e)},ht.parseDate=Gc({}),ht.formatDate=dg({}),ht.compareDates=Kt,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(e){return oi(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof e=="string"?parseInt(e,10):e))},typeof window!="undefined"&&(window.flatpickr=ht);const DP=$u(Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"})));(function(e){function t(R){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(U){return typeof U}:t=function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(R)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(C),r=o(DI),i=o(DP);function o(R){return R&&R.__esModule?R:{default:R}}function a(){if(typeof WeakMap!="function")return null;var R=new WeakMap;return a=function(){return R},R}function s(R){if(R&&R.__esModule)return R;if(R===null||t(R)!=="object"&&typeof R!="function")return{default:R};var M=a();if(M&&M.has(R))return M.get(R);var U={},H=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ne in R)if(Object.prototype.hasOwnProperty.call(R,ne)){var se=H?Object.getOwnPropertyDescriptor(R,ne):null;se&&(se.get||se.set)?Object.defineProperty(U,ne,se):U[ne]=R[ne]}return U.default=R,M&&M.set(R,U),U}function l(R){return h(R)||f(R)||d(R)||c()}function c(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2458
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(R,M){if(R){if(typeof R=="string")return p(R,M);var U=Object.prototype.toString.call(R).slice(8,-1);if(U==="Object"&&R.constructor&&(U=R.constructor.name),U==="Map"||U==="Set")return Array.from(R);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return p(R,M)}}function f(R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(R))return Array.from(R)}function h(R){if(Array.isArray(R))return p(R)}function p(R,M){(M==null||M>R.length)&&(M=R.length);for(var U=0,H=new Array(M);U<M;U++)H[U]=R[U];return H}function m(){return m=Object.assign||function(R){for(var M=1;M<arguments.length;M++){var U=arguments[M];for(var H in U)Object.prototype.hasOwnProperty.call(U,H)&&(R[H]=U[H])}return R},m.apply(this,arguments)}function g(R,M){if(R==null)return{};var U=v(R,M),H,ne;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(R);for(ne=0;ne<se.length;ne++)H=se[ne],!(M.indexOf(H)>=0)&&Object.prototype.propertyIsEnumerable.call(R,H)&&(U[H]=R[H])}return U}function v(R,M){if(R==null)return{};var U={},H=Object.keys(R),ne,se;for(se=0;se<H.length;se++)ne=H[se],!(M.indexOf(ne)>=0)&&(U[ne]=R[ne]);return U}function S(R,M){var U=Object.keys(R);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(R);M&&(H=H.filter(function(ne){return Object.getOwnPropertyDescriptor(R,ne).enumerable})),U.push.apply(U,H)}return U}function I(R){for(var M=1;M<arguments.length;M++){var U=arguments[M]!=null?arguments[M]:{};M%2?S(Object(U),!0).forEach(function(H){j(R,H,U[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(U)):S(Object(U)).forEach(function(H){Object.defineProperty(R,H,Object.getOwnPropertyDescriptor(U,H))})}return R}function x(R,M){if(!(R instanceof M))throw new TypeError("Cannot call a class as a function")}function w(R,M){for(var U=0;U<M.length;U++){var H=M[U];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(R,H.key,H)}}function y(R,M,U){return M&&w(R.prototype,M),R}function A(R,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(M&&M.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),M&&E(R,M)}function E(R,M){return E=Object.setPrototypeOf||function(H,ne){return H.__proto__=ne,H},E(R,M)}function _(R){var M=F();return function(){var H=T(R),ne;if(M){var se=T(this).constructor;ne=Reflect.construct(H,arguments,se)}else ne=H.apply(this,arguments);return D(this,ne)}}function D(R,M){return M&&(t(M)==="object"||typeof M=="function")?M:G(R)}function G(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function F(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(R){return!1}}function T(R){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(U){return U.__proto__||Object.getPrototypeOf(U)},T(R)}function j(R,M,U){return M in R?Object.defineProperty(R,M,{value:U,enumerable:!0,configurable:!0,writable:!0}):R[M]=U,R}var Y=["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"],z=r.default.oneOfType([r.default.func,r.default.arrayOf(r.default.func)]),$=["onCreate","onDestroy"],B=r.default.func,W=function(R){A(U,R);var M=_(U);function U(){var H;x(this,U);for(var ne=arguments.length,se=new Array(ne),ae=0;ae<ne;ae++)se[ae]=arguments[ae];return H=M.call.apply(M,[this].concat(se)),j(G(H),"createFlatpickrInstance",function(){var X=I({onClose:function(){H.node.blur&&H.node.blur()}},H.props.options);X=Q(X,H.props),H.flatpickr=(0,i.default)(H.node,X),H.props.hasOwnProperty("value")&&H.flatpickr.setDate(H.props.value,!1);var le=H.props.onCreate;le&&le(H.flatpickr)}),j(G(H),"destroyFlatpickrInstance",function(){var X=H.props.onDestroy;X&&X(H.flatpickr),H.flatpickr.destroy(),H.flatpickr=null}),j(G(H),"handleNodeChange",function(X){H.node=X,H.flatpickr&&(H.destroyFlatpickrInstance(),H.createFlatpickrInstance())}),H}return y(U,[{key:"componentDidUpdate",value:function(ne){var se=this.props.options,ae=ne.options;se=Q(se,this.props),ae=Q(ae,ne);for(var X=Object.getOwnPropertyNames(se),le=X.length-1;le>=0;le--){var re=X[le],ge=se[re];ge!==ae[re]&&(Y.indexOf(re)!==-1&&!Array.isArray(ge)&&(ge=[ge]),this.flatpickr.set(re,ge))}this.props.hasOwnProperty("value")&&!(this.props.value&&Array.isArray(this.props.value)&&ne.value&&Array.isArray(ne.value)&&this.props.value.every(function(Se,Ve){ne[Ve]}))&&this.props.value!==ne.value&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentDidMount",value:function(){this.createFlatpickrInstance()}},{key:"componentWillUnmount",value:function(){this.destroyFlatpickrInstance()}},{key:"render",value:function(){var ne=this.props,se=ne.options,ae=ne.defaultValue,X=ne.value,le=ne.children,re=ne.render,ge=g(ne,["options","defaultValue","value","children","render"]);return Y.forEach(function(Se){delete ge[Se]}),$.forEach(function(Se){delete ge[Se]}),re?re(I(I({},ge),{},{defaultValue:ae,value:X}),this.handleNodeChange):se.wrap?n.default.createElement("div",m({},ge,{ref:this.handleNodeChange}),le):n.default.createElement("input",m({},ge,{defaultValue:ae,ref:this.handleNodeChange}))}}]),U}(n.Component);j(W,"propTypes",{defaultValue:r.default.string,options:r.default.object,onChange:z,onOpen:z,onClose:z,onMonthChange:z,onYearChange:z,onReady:z,onValueUpdate:z,onDayCreate:z,onCreate:B,onDestroy:B,value:r.default.oneOfType([r.default.string,r.default.array,r.default.object,r.default.number]),children:r.default.node,className:r.default.string,render:r.default.func}),j(W,"defaultProps",{options:{}});function Q(R,M){var U=I({},R);return Y.forEach(function(H){if(M.hasOwnProperty(H)){var ne;U[H]&&!Array.isArray(U[H])?U[H]=[U[H]]:U[H]||(U[H]=[]);var se=Array.isArray(M[H])?M[H]:[M[H]];(ne=U[H]).push.apply(ne,l(se))}}),U}var te=W;e.default=te})(lg);const hg=fn(lg);var pg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var z=["th","st","nd","rd"],$=Y%100;return"["+Y+(z[($-20)%10]||z[$]||z[0])+"]"}},x=function(Y,z,$){var B=String(Y);return!B||B.length>=z?Y:""+Array(z+1-B.length).join($)+Y},w={s:x,z:function(Y){var z=-Y.utcOffset(),$=Math.abs(z),B=Math.floor($/60),W=$%60;return(z<=0?"+":"-")+x(B,2,"0")+":"+x(W,2,"0")},m:function Y(z,$){if(z.date()<$.date())return-Y($,z);var B=12*($.year()-z.year())+($.month()-z.month()),W=z.clone().add(B,f),Q=$-W<0,te=z.clone().add(B+(Q?-1:1),f);return+(-(B+($-W)/(Q?W-te:te-W))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:c,D:m,h:l,m:s,s:a,ms:o,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},y="en",A={};A[y]=I;var E="$isDayjsObject",_=function(Y){return Y instanceof T||!(!Y||!Y[E])},D=function Y(z,$,B){var W;if(!z)return y;if(typeof z=="string"){var Q=z.toLowerCase();A[Q]&&(W=Q),$&&(A[Q]=$,W=Q);var te=z.split("-");if(!W&&te.length>1)return Y(te[0])}else{var R=z.name;A[R]=z,W=R}return!B&&W&&(y=W),W||!B&&y},G=function(Y,z){if(_(Y))return Y.clone();var $=typeof z=="object"?z:{};return $.date=Y,$.args=arguments,new T($)},F=w;F.l=D,F.i=_,F.w=function(Y,z){return G(Y,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var T=function(){function Y($){this.$L=D($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[E]=!0}var z=Y.prototype;return z.parse=function($){this.$d=function(B){var W=B.date,Q=B.utc;if(W===null)return new Date(NaN);if(F.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var te=W.match(v);if(te){var R=te[2]-1||0,M=(te[7]||"0").substring(0,3);return Q?new Date(Date.UTC(te[1],R,te[3]||1,te[4]||0,te[5]||0,te[6]||0,M)):new Date(te[1],R,te[3]||1,te[4]||0,te[5]||0,te[6]||0,M)}}return new Date(W)}($),this.init()},z.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},z.$utils=function(){return F},z.isValid=function(){return this.$d.toString()!==g},z.isSame=function($,B){var W=G($);return this.startOf(B)<=W&&W<=this.endOf(B)},z.isAfter=function($,B){return G($)<this.startOf(B)},z.isBefore=function($,B){return this.endOf(B)<G($)},z.$g=function($,B,W){return F.u($)?this[B]:this.set(W,$)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function($,B){var W=this,Q=!!F.u(B)||B,te=F.p($),R=function(le,re){var ge=F.w(W.$u?Date.UTC(W.$y,re,le):new Date(W.$y,re,le),W);return Q?ge:ge.endOf(c)},M=function(le,re){return F.w(W.toDate()[le].apply(W.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(re)),W)},U=this.$W,H=this.$M,ne=this.$D,se="set"+(this.$u?"UTC":"");switch(te){case p:return Q?R(1,0):R(31,11);case f:return Q?R(1,H):R(0,H+1);case d:var ae=this.$locale().weekStart||0,X=(U<ae?U+7:U)-ae;return R(Q?ne-X:ne+(6-X),H);case c:case m:return M(se+"Hours",0);case l:return M(se+"Minutes",1);case s:return M(se+"Seconds",2);case a:return M(se+"Milliseconds",3);default:return this.clone()}},z.endOf=function($){return this.startOf($,!1)},z.$set=function($,B){var W,Q=F.p($),te="set"+(this.$u?"UTC":""),R=(W={},W[c]=te+"Date",W[m]=te+"Date",W[f]=te+"Month",W[p]=te+"FullYear",W[l]=te+"Hours",W[s]=te+"Minutes",W[a]=te+"Seconds",W[o]=te+"Milliseconds",W)[Q],M=Q===c?this.$D+(B-this.$W):B;if(Q===f||Q===p){var U=this.clone().set(m,1);U.$d[R](M),U.init(),this.$d=U.set(m,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](M);return this.init(),this},z.set=function($,B){return this.clone().$set($,B)},z.get=function($){return this[F.p($)]()},z.add=function($,B){var W,Q=this;$=Number($);var te=F.p(B),R=function(H){var ne=G(Q);return F.w(ne.date(ne.date()+Math.round(H*$)),Q)};if(te===f)return this.set(f,this.$M+$);if(te===p)return this.set(p,this.$y+$);if(te===c)return R(1);if(te===d)return R(7);var M=(W={},W[s]=r,W[l]=i,W[a]=n,W)[te]||1,U=this.$d.getTime()+$*M;return F.w(U,this)},z.subtract=function($,B){return this.add(-1*$,B)},z.format=function($){var B=this,W=this.$locale();if(!this.isValid())return W.invalidDate||g;var Q=$||"YYYY-MM-DDTHH:mm:ssZ",te=F.z(this),R=this.$H,M=this.$m,U=this.$M,H=W.weekdays,ne=W.months,se=W.meridiem,ae=function(re,ge,Se,Ve){return re&&(re[ge]||re(B,Q))||Se[ge].slice(0,Ve)},X=function(re){return F.s(R%12||12,re,"0")},le=se||function(re,ge,Se){var Ve=re<12?"AM":"PM";return Se?Ve.toLowerCase():Ve};return Q.replace(S,function(re,ge){return ge||function(Se){switch(Se){case"YY":return String(B.$y).slice(-2);case"YYYY":return F.s(B.$y,4,"0");case"M":return U+1;case"MM":return F.s(U+1,2,"0");case"MMM":return ae(W.monthsShort,U,ne,3);case"MMMM":return ae(ne,U);case"D":return B.$D;case"DD":return F.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ae(W.weekdaysMin,B.$W,H,2);case"ddd":return ae(W.weekdaysShort,B.$W,H,3);case"dddd":return H[B.$W];case"H":return String(R);case"HH":return F.s(R,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return le(R,M,!0);case"A":return le(R,M,!1);case"m":return String(M);case"mm":return F.s(M,2,"0");case"s":return String(B.$s);case"ss":return F.s(B.$s,2,"0");case"SSS":return F.s(B.$ms,3,"0");case"Z":return te}return null}(re)||te.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function($,B,W){var Q,te=this,R=F.p(B),M=G($),U=(M.utcOffset()-this.utcOffset())*r,H=this-M,ne=function(){return F.m(te,M)};switch(R){case p:Q=ne()/12;break;case f:Q=ne();break;case h:Q=ne()/3;break;case d:Q=(H-U)/6048e5;break;case c:Q=(H-U)/864e5;break;case l:Q=H/i;break;case s:Q=H/r;break;case a:Q=H/n;break;default:Q=H}return W?Q:F.a(Q)},z.daysInMonth=function(){return this.endOf(f).$D},z.$locale=function(){return A[this.$L]},z.locale=function($,B){if(!$)return this.$L;var W=this.clone(),Q=D($,B,!0);return Q&&(W.$L=Q),W},z.clone=function(){return F.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},Y}(),j=T.prototype;return G.prototype=j,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(Y){j[Y[1]]=function(z){return this.$g(z,Y[0],Y[1])}}),G.extend=function(Y,z){return Y.$i||(Y(z,T,G),Y.$i=!0),G},G.locale=D,G.isDayjs=_,G.unix=function(Y){return G(1e3*Y)},G.en=A[y],G.Ls=A,G.p={},G})})(pg);var OP=pg.exports;const kt=fn(OP);var gg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(i,o,a){var s,l=function(h,p,m){m===void 0&&(m={});var g=new Date(h),v=function(S,I){I===void 0&&(I={});var x=I.timeZoneName||"short",w=S+"|"+x,y=r[w];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),r[w]=y),y}(p,m);return v.formatToParts(g)},c=function(h,p){for(var m=l(h,p),g=[],v=0;v<m.length;v+=1){var S=m[v],I=S.type,x=S.value,w=n[I];w>=0&&(g[w]=parseInt(x,10))}var y=g[3],A=y===24?0:y,E=g[0]+"-"+g[1]+"-"+g[2]+" "+A+":"+g[4]+":"+g[5]+":000",_=+h;return(a.utc(E).valueOf()-(_-=_%1e3))/6e4},d=o.prototype;d.tz=function(h,p){h===void 0&&(h=s);var m,g=this.utcOffset(),v=this.toDate(),S=v.toLocaleString("en-US",{timeZone:h}),I=Math.round((v-new Date(S))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-I;if(!Number(x))m=this.utcOffset(0,p);else if(m=a(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),p){var w=m.utcOffset();m=m.add(g-w,"minute")}return m.$x.$timezone=h,m},d.offsetName=function(h){var p=this.$x.$timezone||a.tz.guess(),m=l(this.valueOf(),p,{timeZoneName:h}).find(function(g){return g.type.toLowerCase()==="timezonename"});return m&&m.value};var f=d.startOf;d.startOf=function(h,p){if(!this.$x||!this.$x.$timezone)return f.call(this,h,p);var m=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(m,h,p).tz(this.$x.$timezone,!0)},a.tz=function(h,p,m){var g=m&&p,v=m||p||s,S=c(+a(),v);if(typeof h!="string")return a(h).tz(v);var I=function(A,E,_){var D=A-60*E*1e3,G=c(D,_);if(E===G)return[D,E];var F=c(D-=60*(G-E)*1e3,_);return G===F?[D,G]:[A-60*Math.min(G,F)*1e3,Math.max(G,F)]}(a.utc(h,g).valueOf(),S,v),x=I[0],w=I[1],y=a(x).utcOffset(w);return y.$x.$timezone=v,y},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(h){s=h}}})})(gg);var RP=gg.exports;const LP=fn(RP);var mg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Bt,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(o,a,s){var l=a.prototype;s.utc=function(g){var v={date:g,utc:!0,args:arguments};return new a(v)},l.utc=function(g){var v=s(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),n):v},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),c.call(this,g)};var d=l.init;l.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(g,v){var S=this.$utils().u;if(S(g))return this.$u?0:S(this.$offset)?f.call(this):this.$offset;if(typeof g=="string"&&(g=function(y){y===void 0&&(y="");var A=y.match(r);if(!A)return null;var E=(""+A[0]).match(i)||["-",0,0],_=E[0],D=60*+E[1]+ +E[2];return D===0?0:_==="+"?D:-D}(g),g===null))return this;var I=Math.abs(g)<=16?60*g:g,x=this;if(v)return x.$offset=I,x.$u=g===0,x;if(g!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(I+w,n)).$offset=I,x.$x.$localOffset=w}else x=this.utc();return x};var h=l.format;l.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},l.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(g){return g==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=l.diff;l.diff=function(g,v,S){if(g&&this.$u===g.$u)return m.call(this,g,v,S);var I=this.local(),x=s(g).local();return m.call(I,x,v,S)}}})})(mg);var MP=mg.exports;const BP=fn(MP);kt.extend(LP),kt.extend(BP);const $P=e=>{if(!kt(e).isAfter(kt(Date.now()).subtract(15,"minute")))return kt(Date.now()).add(15,"minute").toDate()},Qc=({defaultDate:e,minDate:t,maxDate:n,dateFormat:r="DD.MM.YYYY HH:mm",onChange:i})=>{const o=a=>{if(a&&a.length){const s=kt.utc(a[0]).toISOString();i(s)}else i("")};return u.jsx(b.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",paddingLeft:"0.5rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,minHeight:"37px",color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:u.jsx(hg,{value:e&&kt(e).format("YYYY-MM-DD HH:mm")||void 0,onChange:o,className:"flatpickr-input",options:{enableTime:!0,dateFormat:r,position:"below",minDate:t||$P(e),maxDate:n,parseDate:(a,s)=>kt(a,s).toDate(),formatDate:(a,s)=>kt(a).format(s),time_24hr:!0,minuteIncrement:1}})})},NP=({required:e,defaultValue:t,onChangeFromDate:n,onChangeToDate:r})=>{const[i,o]=t;return u.jsxs(b.Box,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormControl,{children:u.jsx(b.FormLabel,{required:e,color:"primary",children:"Duration"})}),u.jsxs(b.Grid,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:[u.jsx(no,{label:"From date",defaultValue:i,required:e,onChange:n}),u.jsx(no,{label:"To date",defaultValue:o,required:e,onChange:r})]})]})},vg=e=>{if(!e)return[];const{from:t,to:n}=e,r=[];return t&&r.push(kt(t).toDate()),n&&r.push(kt(n).toDate()),r},FP=({label:e,defaultValue:t,required:n,onChange:r})=>{const[i,o]=C.useState(vg(t)),[a,s]=C.useState(!1),l=()=>s(!a),c=d=>{if(d&&d.length>0){const f="YYYY-MM-DD",h=kt(d[0]).format(f),p=kt(d[1]).format(f);r({from:h,to:p})}else d&&d.length===0&&(r({from:"",to:""}),l());o(d)};return u.jsxs(b.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{required:n,color:"primary",children:e}),u.jsx(b.Box,{sx:{width:"100%",".flatpickr-input":{width:"100%",padding:"0.5rem 0.75rem",boxSizing:"border-box",fontSize:"1rem",lineHeight:1.3,color:"rgba(0, 0, 0, 0.87)",backgroundColor:"#fff",backgroundClip:"padding-box",border:"1px solid #ced4da",borderRadius:"0.375rem",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"}}},children:u.jsx(hg,{value:i,onChange:c,placeholder:"Select Date...",className:"flatpickr-input",options:{mode:"range",enableTime:!1,dateFormat:"DD.MM.YYYY",altFormat:"DD.MM.YYYY",position:"below",parseDate:(d,f)=>kt(d,f).toDate(),formatDate:(d,f)=>kt(d).format(f),defaultDate:vg(t)||void 0}})}),u.jsx(at,{showToast:a,message:"Succesfully cleared the duration time",color:"primary",hideToast:l})]})},zP=({environment:e,labels:t,setNoPermission:n})=>{const{featureDisabled:r,noPermissionMessage:i,tryAgainButton:o}=t,a=()=>{Ui(e).signOut().then(()=>n(null)).catch(s=>{console.error("There was a problem logging out the user:",s)})};return u.jsx(b.Box,{"data-testid":"no permission card",sx:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",bgcolor:"background.body"},children:u.jsx(b.Card,{variant:"outlined",sx:{maxWidth:300,overflow:"hidden",borderRadius:"md"},children:u.jsxs(b.CardContent,{children:[u.jsx(b.Typography,{level:"h2",textAlign:"center",mb:2,children:r}),u.jsx(b.Typography,{level:"body-md",color:"neutral",mb:2,children:i}),u.jsx(b.Box,{display:"flex",justifyContent:"center",children:u.jsx(b.Button,{variant:"solid",color:"neutral",fullWidth:!0,size:"sm",onClick:a,children:o})})]})})})},bg=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],qc=e=>e.reduce((t,n)=>(t[n.key]=n.value,t),{}),jP=({labels:e,type:t,defaultValue:n,onChange:r})=>{const[i,o]=C.useState(bg(n)),[a,s]=C.useState(null),[l,c]=C.useState(""),[d,f]=C.useState(""),[h,p]=C.useState(""),[m,g]=C.useState("");C.useEffect(()=>o(bg(n)),[n]);const v=()=>{const w=[...i];w.push({key:l,value:h}),o(w),c(""),p(""),r(qc(w))},S=w=>{const y=i.filter((A,E)=>E!==w);o(y),r(qc(y))},I=(w,y)=>{f(y.key),g(y.value),s(w)},x=w=>{const y=[...i];y[w]={key:d,value:m},o(y),s(null),f(""),g(""),r(qc(y))};return u.jsxs(b.Box,{children:[i.map((w,y)=>u.jsx(b.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(b.CardContent,{style:{flex:1},children:a===y?u.jsxs(b.Box,{display:"flex",alignItems:"center",children:[u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:d,onChange:A=>f(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",defaultValue:m,onChange:A=>g(A.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Tooltip,{title:e.save,children:d&&m?u.jsx(b.IconButton,{onClick:()=>x(y),children:u.jsx(Oe.Check,{})}):u.jsx("span",{children:u.jsx(b.IconButton,{disabled:!0,children:u.jsx(Oe.Check,{})})})})]}):u.jsxs(b.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{style:{fontWeight:"bold"},children:[e.keyDynamicFields,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:w.key})]}),u.jsxs(b.Typography,{style:{color:"gray"},children:[e.valueDynamicFields,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:w.value})]})]}),u.jsxs(b.Box,{children:[u.jsx(b.Tooltip,{title:e.edit,children:u.jsx(b.IconButton,{onClick:()=>I(y,w),children:u.jsx(Oe.Edit,{})})}),u.jsx(b.Tooltip,{title:e.delete,children:u.jsx(b.IconButton,{onClick:()=>S(y),children:u.jsx(Oe.Delete,{})})})]})]})})},`dynamic-fields-${t}-${y}`)),u.jsxs(b.Box,{display:"flex",alignItems:"center",style:{marginTop:i&&i.length?"20px":"0px"},children:[u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",value:l,placeholder:e.keyDynamicFields,onChange:w=>c(w.target.value),sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Input,{size:"md",variant:"outlined",color:"neutral",value:h,onChange:w=>p(w.target.value),placeholder:e.valueDynamicFields,sx:{backgroundColor:"#fff",borderRadius:"md",marginRight:"10px"}}),u.jsx(b.Tooltip,{title:e.add,children:l&&h?u.jsx(b.Button,{onClick:v,children:u.jsx(Oe.Add,{})}):u.jsx("span",{children:u.jsx(b.Button,{disabled:!0,children:u.jsx(Oe.Add,{})})})})]})]})};function oo(e,t,n){return(t=tc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yg(Object(n),!0).forEach(function(r){oo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tc(r.key),r)}}function VP(e,t,n){return t&&xg(e.prototype,t),n&&xg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jc(e,t){return Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jc(e,t)}function HP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(e)}function Cg(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Cg=function(){return!!e})()}function WP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GP(e,t){if(t&&(br(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WP(e)}function YP(e){var t=Cg();return function(){var n,r=ns(e);if(t){var i=ns(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return GP(this,n)}}function Xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KP(e){if(Array.isArray(e))return Xc(e)}function QP(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wg(e,t){if(e){if(typeof e=="string")return Xc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xc(e,t):void 0}}function qP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2459
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ai(e){return KP(e)||QP(e)||wg(e)||qP()}function JP(e){if(Array.isArray(e))return e}function XP(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function ZP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2460
2460
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e,t){return JP(e)||XP(e,t)||wg(e,t)||ZP()}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 eD(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Zc=C.useLayoutEffect,tD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],rs=function(){};function nD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function rD(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(nD(e,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var is=function(t){return fD(t)?t.filter(Boolean):br(t)==="object"&&t!==null?[t]:[]},Ig=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,tD);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 iD(e){return os(e)?window.innerHeight:e.clientHeight}function Sg(e){return os(e)?window.pageYOffset:e.scrollTop}function as(e,t){if(os(e)){window.scrollTo(0,t);return}e.scrollTop=t}function oD(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 aD(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=Sg(e),o=t-i,a=10,s=0;function l(){s+=a;var c=aD(s,i,o,n);as(e,c),s<n?window.requestAnimationFrame(l):r(e)}l()}function Ag(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 sD(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 Tg(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function lD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Eg=!1,cD={get passive(){return Eg=!0}},ls=typeof window!="undefined"?window:{};ls.addEventListener&&ls.removeEventListener&&(ls.addEventListener("p",rs,cD),ls.removeEventListener("p",rs,!1));var uD=Eg;function dD(e){return e!=null}function fD(e){return Array.isArray(e)}function ao(e,t,n){return e?t:n}function jF(e){return e}function UF(e){return e}var hD=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},{})},pD=["children","innerProps"],gD=["children","innerProps"];function mD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=oD(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(),S=v.top,I=a?window.innerHeight:iD(l),x=Sg(l),w=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),A=S-y,E=I-g,_=A+x,D=f-x-g,G=p-I+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 j=a?E-w:D-w;return{placement:"bottom",maxHeight:j}}if(i==="auto"||a){var Y=t,z=a?A:_;return z>=r&&(Y=Math.min(z-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 vD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var kg=function(t){return t==="auto"?"bottom":t},bD=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,vD(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})},_g=C.createContext(null),yD=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(_g)||{},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),S=Vn(v,2),I=S[0],x=S[1],w=l.spacing.controlHeight;return Zc(function(){var y=f.current;if(y){var A=a==="fixed",E=s&&!A,_=mD({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:I||kg(o),maxHeight:m})})},xD=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)},CD=xD,wD=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})},ID=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)},Pg=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")})},SD=Pg,AD=Pg,TD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Cn(t,pD);return pe.jsx("div",O({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},ED=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Cn(t,gD);return pe.jsx("div",O({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},kD=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}},_D=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(kg(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),S=v[0],I=v[1],x=C.useCallback(function(){if(i){var E=sD(i),_=s==="fixed"?0:window.pageYOffset,D=E[h]+_;(D!==(S==null?void 0:S.offset)||E.left!==(S==null?void 0:S.rect.left)||E.width!==(S==null?void 0:S.rect.width))&&I({offset:D,rect:E})}},[i,s,h,S==null?void 0:S.offset,S==null?void 0:S.rect.left,S==null?void 0:S.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=$S(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"||!S)return null;var A=pe.jsx("div",O({ref:y},tt(ve(ve({},t),{},{offset:S.offset,position:s,rect:S.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(_g.Provider,{value:m},n?Re.createPortal(A,n):A)},PD=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},DD=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)},OD=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")})},RD=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)},LD=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},MD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Dg,BD=["size"],$D=["innerProps","isRtl","size"],ND={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Og=function(t){var n=t.size,r=Cn(t,BD);return pe.jsx("svg",O({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:ND},r))},eu=function(t){return pe.jsx(Og,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"}))},Rg=function(t){return pe.jsx(Og,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"}))},Lg=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}})},FD=Lg,zD=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(Rg,null))},jD=Lg,UD=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))},VD=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})},HD=function(t){var n=t.innerProps;return pe.jsx("span",O({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},WD=pe.keyframes(Dg||(Dg=eD([`
|
|
2461
2461
|
0%, 80%, 100% { opacity: 0; }
|
|
2462
2462
|
40% { opacity: 1; }
|
|
2463
|
-
`]))),GD=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(WD," 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"},"","")})},YD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,$D);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}))},KD=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}})},qD=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=qD,JD=["data"],XD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},ZD=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))},eO=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"})},tO=function(t){var n=Ig(t);n.data;var r=Cn(n,JD);return pe.jsx("div",O({},tt(t,"groupHeading",{"group-heading":!0}),r))},nO=ZD,rO=["innerRef","isDisabled","isHidden","inputClassName"],iO=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)":""},oO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Mg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},oO={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"},Mg)},aO=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Mg)},sO=function(t){var n=t.cx,r=t.value,i=Ig(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,c=Cn(i,rO);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:aO(s),disabled:a},c)))},lO=sO,cO=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})},uO=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})},dO=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}})},Bg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},fO=Bg,hO=Bg;function pO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",O({role:"button"},n),t||pe.jsx(eu,{size:14}))}var gO=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}))},mO=gO,vO=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}})},bO=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)},yO=bO,xO=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})},CO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"placeholder",{placeholder:!0}),r),n)},wO=CO,IO=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})},SO=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)},AO=SO,TO={ClearIndicator:UD,Control:QD,DropdownIndicator:zD,DownChevron:Rg,CrossIcon:eu,Group:nO,GroupHeading:tO,IndicatorsContainer:MD,IndicatorSeparator:HD,Input:lO,LoadingIndicator:YD,Menu:CD,MenuList:ID,MenuPortal:_D,LoadingMessage:ED,NoOptionsMessage:TD,MultiValue:mO,MultiValueContainer:fO,MultiValueLabel:hO,MultiValueRemove:pO,Option:yO,Placeholder:wO,SelectContainer:DD,SingleValue:AO,ValueContainer:RD},EO=function(t){return ve(ve({},TO),t.components)},$g=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function kO(e,t){return!!(e===t||$g(e)&&$g(t))}function _O(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!kO(e[n],t[n]))return!1;return!0}function PO(e,t){t===void 0&&(t=_O);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 DO={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"},OO=function(t){return pe.jsx("span",O({css:DO},t))},Ng=OO,RO={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:"",".")}},LO=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,S=l.menuIsOpen,I=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({},RO),f||{})},[f]),D=C.useMemo(function(){var z="";if(n&&_.onChange){var $=n.option,B=n.options,W=n.removedValue,q=n.removedValues,ee=n.value,R=function(X){return Array.isArray(X)?null:X},M=W||$||R(ee),U=M?h(M):"",H=B||q||void 0,ne=H?H.map(h):[],se=ve({isDisabled:M&&g(M,s),label:U,labels:ne},n);z=_.onChange(se)}return z},[n,_,g,s,h]),G=C.useMemo(function(){var z="",$=r||i,B=!!(r&&s&&s.includes(r));if($&&_.onFocus){var W={focused:$,label:h($),isDisabled:g($,s),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:s,isAppleDevice:d};z=_.onFocus(W)}return z},[r,i,h,g,_,o,s,d]),F=C.useMemo(function(){var z="";if(S&&I.length&&!y&&_.onFilter){var $=x({count:o.length});z=_.onFilter({inputValue:p,resultsMessage:$})}return z},[o,p,S,_,I,x,y]),T=(n==null?void 0:n.action)==="initial-input-focus",j=C.useMemo(function(){var z="";if(_.guidance){var $=i?"value":S?"menu":"input";z=_.guidance({"aria-label":A,context:$,isDisabled:r&&g(r,s),isMulti:m,isSearchable:v,tabSelectsValue:w,isInitialFocus:T})}return z},[A,r,i,m,g,v,S,_,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"},j));return pe.jsx(C.Fragment,null,pe.jsx(Ng,{id:c},T&&Y),pe.jsx(Ng,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&Y))},MO=LO,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źẑżžẓẕƶȥɀⱬꝣ"}],BO=new RegExp("["+nu.map(function(e){return e.letters}).join("")+"]","g"),Fg={},ru=0;ru<nu.length;ru++)for(var iu=nu[ru],ou=0;ou<iu.letters.length;ou++)Fg[iu.letters[ou]]=iu.base;var zg=function(t){return t.replace(BO,function(n){return Fg[n]})},$O=PO(zg),jg=function(t){return t.replace(/^\s+|\s+$/g,"")},NO=function(t){return"".concat(t.label," ").concat(t.value)},FO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:NO,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=$O(d),f=zg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},zO=["innerRef"];function jO(e){var t=e.innerRef,n=Cn(e,zO),r=hD(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 UO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function VO(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,S){if(c.current!==null){var I=c.current,x=I.scrollTop,w=I.scrollHeight,y=I.clientHeight,A=c.current,E=S>0,_=w-y-x,D=!1;_>S&&a.current&&(r&&r(v),a.current=!1),E&&s.current&&(o&&o(v),s.current=!1),E&&S>_?(n&&!a.current&&n(v),A.scrollTop=w,D=!0,a.current=!0):!E&&-S>x&&(i&&!s.current&&i(v),A.scrollTop=0,D=!0,s.current=!0),D&&UO(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 S=l.current-v.changedTouches[0].clientY;d(v,S)},[d]),m=C.useCallback(function(v){if(v){var S=uD?{passive:!1}:!1;v.addEventListener("wheel",f,S),v.addEventListener("touchstart",h,S),v.addEventListener("touchmove",p,S)}},[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 Ug=["boxSizing","height","overflow","paddingRight","position"],Vg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Hg(e){e.preventDefault()}function Wg(e){e.stopPropagation()}function Gg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Yg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Kg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),so=0,si={capture:!1,passive:!1};function HO(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(Kg){var c=document.body,d=c&&c.style;if(r&&Ug.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(Vg).forEach(function(m){var g=Vg[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Yg()&&(c.addEventListener("touchmove",Hg,si),l&&(l.addEventListener("touchstart",Gg,si),l.addEventListener("touchmove",Wg,si))),so+=1}},[r]),s=C.useCallback(function(l){if(Kg){var c=document.body,d=c&&c.style;so=Math.max(so-1,0),r&&so<1&&Ug.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Yg()&&(c.removeEventListener("touchmove",Hg,si),l&&(l.removeEventListener("touchstart",Gg,si),l.removeEventListener("touchmove",Wg,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 WO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},GO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function YO(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=VO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),d=HO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(C.Fragment,null,n&&pe.jsx("div",{onClick:WO,css:GO}),t(f))}var KO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},qO=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:KO,value:"",onChange:function(){}})},QO=qO;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 JO(){return au(/^iPhone/i)}function qg(){return au(/^Mac/i)}function XO(){return au(/^iPad/i)||qg()&&navigator.maxTouchPoints>1}function ZO(){return JO()||XO()}function eR(){return qg()||ZO()}var tR=function(t){return t.label},Qg=function(t){return t.label},Jg=function(t){return t.value},nR=function(t){return!!t.isDisabled},rR={clearIndicator:jD,container:PD,control:KD,dropdownIndicator:FD,group:XD,groupHeading:eO,indicatorsContainer:LD,indicatorSeparator:VD,input:iO,loadingIndicator:GD,loadingMessage:AD,menu:bD,menuList:wD,menuPortal:kD,multiValue:cO,multiValueLabel:uO,multiValueRemove:dO,noOptionsMessage:SD,option:vO,placeholder:xO,singleValue:IO,valueContainer:OD},iR={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%)"},oR=4,Xg=4,aR=38,sR=Xg*2,lR={baseUnit:Xg,controlHeight:aR,menuGutter:sR},su={borderRadius:oR,colors:iR,spacing:lR},cR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tg(),captureMenuScroll:!Tg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:FO(),formatGroupLabel:tR,getOptionLabel:Qg,getOptionValue:Jg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:nR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!lD(),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 Zg(e,t,n,r){var i=im(e,t,n),o=om(e,t,n),a=rm(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 Zg(e,a,t,s)}).filter(function(a){return nm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Zg(e,n,t,r);return nm(e,o)?o:void 0}).filter(dD)}function em(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 tm(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 uR(e,t){return em(cs(e,t))}function nm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!sm(e)||!o)&&am(e,{label:a,value:s,data:i},r)}function dR(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 fR(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},rm=function(t,n){return t.getOptionLabel(n)},us=function(t,n){return t.getOptionValue(n)};function im(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function om(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 am(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var sm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},hR=1,lm=function(e){HP(n,e);var t=YP(n);function n(r){var i;if(UP(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=eR(),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(S){return i.getOptionValue(S)!==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 tm(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 rD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return rm(i.props,l)},i.getOptionValue=function(l){return us(i.props,l)},i.getStyles=function(l,c){var d=i.props.unstyled,f=rR[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 EO(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 em(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 sm(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,S=c.onKeyDown,I=c.tabSelectsValue,x=c.openMenuOnFocus,w=i.state,y=w.focusedOption,A=w.focusedValue,E=w.selectValue;if(!g&&!(typeof S=="function"&&(S(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||!I||!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||++hR),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 VP(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&&Ag(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&&(Ag(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 im(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return om(this.props,i,o)}},{key:"filterOption",value:function(i,o){return am(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,S=g.ariaSelection,I=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()?(S==null?void 0:S.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?V.createElement(m,O({},I,{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)):V.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,S=p.inputValue,I=p.placeholder,x=this.state,w=x.selectValue,y=x.focusedValue,A=x.isFocused;if(!this.hasValue()||!m)return S?null:V.createElement(f,O({},h,{key:"placeholder",isDisabled:g,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),I);if(v)return w.map(function(_,D){var G=_===y,F="".concat(i.getOptionLabel(_),"-").concat(i.getOptionValue(_));return V.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(j){j.preventDefault()}},data:_}),i.formatOptionLabel(_,"value"))});if(S)return null;var E=w[0];return V.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 V.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 V.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 V.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 V.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,S=v.captureMenuScroll,I=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,j=v.noOptionsMessage,Y=v.onMenuScrollToTop,z=v.onMenuScrollToBottom;if(!E)return null;var $=function(U,H){var ne=U.type,se=U.data,ae=U.isDisabled,X=U.isSelected,le=U.label,re=U.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(H),lt={id:wt,onClick:Ve,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:X};return V.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(U.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var U=M.data,H=M.options,ne=M.index,se="".concat(i.getElementId("group"),"-").concat(ne),ae="".concat(se,"-heading");return V.createElement(a,O({},m,{key:se,data:U,options:H,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 W=w({inputValue:I});if(W===null)return null;B=V.createElement(f,m,W)}else{var q=j({inputValue:I});if(q===null)return null;B=V.createElement(h,m,q)}var ee={minMenuHeight:y,maxMenuHeight:A,menuPlacement:_,menuPosition:D,menuShouldScrollIntoView:T},R=V.createElement(yD,O({},m,ee),function(M){var U=M.ref,H=M.placerProps,ne=H.placement,se=H.maxHeight;return V.createElement(l,O({},m,ee,{innerRef:U,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:ne}),V.createElement(YO,{captureEnabled:S,onTopArrive:Y,onBottomArrive:z,lockEnabled:F},function(ae){return V.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"?V.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 V.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 V.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return V.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):V.createElement("input",{name:c,type:"hidden",value:""});return V.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return V.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 V.createElement(MO,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 V.createElement(s,O({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),V.createElement(o,O({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),V.createElement(l,O({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),V.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,S=i.isMulti,I=is(m),x={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var w=g?uR(i,I):[],y=g?tm(cs(i,I),"".concat(h,"-option")):[],A=s?dR(o,I):null,E=fR(o,w),_=lu(y,E);x={selectValue:I,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(S,I,I[0]||null),options:I,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);lm.defaultProps=cR;var pR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function gR(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,pR),g=C.useState(s!==void 0?s:n),v=Vn(g,2),S=v[0],I=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(W,q){typeof c=="function"&&c(W,q),G(W)},[c]),T=C.useCallback(function(W,q){var ee;typeof d=="function"&&(ee=d(W,q)),I(ee!==void 0?ee:W)},[d]),j=C.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),Y=C.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),z=s!==void 0?s:S,$=l!==void 0?l:y,B=p!==void 0?p:D;return ve(ve({},m),{},{inputValue:z,menuIsOpen:$,onChange:F,onInputChange:T,onMenuClose:Y,onMenuOpen:j,value:B})}var mR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],cm=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 cm(t,o,i)})||r.some(function(o){return cm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function vR(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,mR),v=g.getOptionValue,S=v===void 0?Jg:v,I=g.getOptionLabel,x=I===void 0?Qg:I,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:S,getOptionLabel:x})?d(w,a(w)):void 0},[a,d,x,S,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,j){if(j.action!=="select-option")return m(T,j);var Y=Array.isArray(T)?T:[T];if(Y[Y.length-1]===D){if(f)f(w);else{var z=d(w,w),$={action:"create-option",name:_,option:z};m(ao(A,[].concat(ai(is(E)),[z]),z),$)}return}m(T,j)},[d,w,A,_,D,f,m,E]);return ve(ve({},g),{},{options:G,onChange:F})}var bR=C.forwardRef(function(e,t){var n=gR(e),r=vR(n);return V.createElement(lm,O({ref:t},r))}),um=bR;const yR={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"})},xR=e=>e.map(t=>({label:t,value:t})),CR=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=e.sx||{marginBottom:"16px"},a=xR(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(um,{styles:yR,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()},S=new $p,I=ft(),x=()=>{d(""),i(!1)},w=j=>{let Y="",z="primary";switch(j){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,z="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,z="primary";break;case"image_reset":Y=e.labels.imageResetMessage,z="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,z="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,z="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,z="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,z="danger";break}h(z),d(Y),i(!0)},y=()=>a(!o),A=()=>l(!s),E=()=>{e.clearImage(),w("image_deleted")},_=j=>{navigator.clipboard.writeText(j),w("copy_url")},D=j=>k(this,null,function*(){j.persist();const Y=j.target.files?j.target.files[0]:null;if(Y){n(!0);try{const z=Y.type.split("/")[1],$=yield S.readFileAndHash(Y),B=(yield S.generateHashFileName(Y))+"."+z,W={image_type:z,image_file_name:B,image_size:Y.size,base64_sum:$},q=yield I==null?void 0:I.https.generateSignedInUrl(W);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}),U=yield I==null?void 0:I.https.storeInBucket(ee.data.signed_url,M,R);e.onChangeImages(U||""),m(U),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(z){console.error("There was a problem with encrypting file...",z),w("encrypting_file_failed")}n(!1)}}),G=j=>k(this,null,function*(){if(j){n(!0);try{const Y=j.type.split("/")[1],z=yield S.readFileAndHash(j),$=(yield S.generateHashFileName(j))+"."+Y,B={image_type:Y,image_file_name:$,image_size:j.size,base64_sum:z},W=yield I==null?void 0:I.https.generateSignedInUrl(B);if(W!=null&&W.ok){const q=yield W.json(),ee={"Content-Type":j.type,"Content-MD5":z};try{const R=new File([j],$,{type:j.type}),M=yield I==null?void 0:I.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 W==null?void 0:W.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=j=>{e.onChangeImages(j),m(j)};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(Ap,{})})})]}),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(Fp,{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(og,{})})})]}),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(Up,{type:"file",accept:"image/*",onChange:D,ref:g})]})}),I.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(zp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(at,{showToast:r,message:c,color:f,hideToast:x}),u.jsx(Np,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),u.jsx(ig,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:G,resetDefaultImageUrl:F})]})},wR=["cover","mobile"],IR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),SR=e=>e?N({},e):{main:"",mobile:"",cover:""},AR=e=>{const[t,n]=C.useState(!1),r=SR(e.defaultValue),i=IR(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:wR.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 TR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const ER=["className","color","component","variant","invertedColors","slots","slotProps"],kR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return ut(r,TR,{})},_R=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&&i_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&o_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),PR=V.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,ER),h=O({},r,{color:o,component:a,invertedColors:l,variant:s}),p=kR(h),m=O({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Bn(p.root,i),elementType:_R,externalForwardedProps:m,ownerState:h});return u.jsx(g,O({},v))});function DR(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 OR=["color","textColor"],RR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],uu=V.createContext(!1),LR=V.createContext(!1),MR=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,DR,{})},BR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),$R=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),NR=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]))}),dm={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=V.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Ae(i,OR),l=V.useContext(uu),c=V.useContext(LR),d=KA(O({},s,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=dm,children:v,endDecorator:S,startDecorator:I,variant:x,slots:w={},slotProps:y={}}=d,A=Ae(d,RR),E=(r=t.color)!=null?r:x?o!=null?o:"neutral":o,_=l||c?t.level||"inherit":m,D=Jf(v,["Skeleton"]),G=f||(l?"span":g[_]||dm[_]||"span"),F=O({},d,{level:_,component:G,color:E,gutterBottom:h,noWrap:p,nesting:l,variant:x,unstable_hasSkeleton:D}),T=MR(F),j=O({},A,{component:G,slots:w,slotProps:y}),[Y,z]=Ie("root",{ref:n,className:T.root,elementType:NR,externalForwardedProps:j,ownerState:F}),[$,B]=Ie("startDecorator",{className:T.startDecorator,elementType:BR,externalForwardedProps:j,ownerState:F}),[W,q]=Ie("endDecorator",{className:T.endDecorator,elementType:$R,externalForwardedProps:j,ownerState:F});return u.jsx(uu.Provider,{value:!0,children:u.jsxs(Y,O({},z,{children:[I&&u.jsx($,O({},B,{children:I})),D?V.cloneElement(v,{variant:v.props.variant||"inline"}):v,S&&u.jsx(W,O({},q,{children:S}))]}))})});du.muiName="Typography";function FR(e){return it("MuiFormControl",e)}const fm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),zR=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"],UR=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,FR,{})},VR=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",[`&.${fm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${fm.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 ~ .${zR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),fu=V.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),[S,I]=V.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=UR(x),[A,E]=Ie("root",{ref:n,className:Bn(y.root,o),elementType:VR,externalForwardedProps:O({},g,{component:a,slots:p,slotProps:m}),ownerState:x}),_=V.useMemo(()=>({disabled:s,required:l,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":S?`${v}-helper-text`:void 0,setHelperText:I,registerEffect:w}),[d,s,c,S,v,w,l,f]);return u.jsx(Ha.Provider,{value:_,children:u.jsx(A,O({},E))})});function HR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const WR=["children","component","htmlFor","id","slots","slotProps"],GR=()=>ut({root:["root"],asterisk:["asterisk"]},HR,{}),YR=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)"})),KR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),hu=V.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,WR),p=V.useContext(Ha),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=O({},o,{required:m}),v=GR(),S=O({},h,{component:s,slots:d,slotProps:f}),[I,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:YR,externalForwardedProps:S,ownerState:g}),[w,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:KR,externalForwardedProps:S,ownerState:g});return u.jsxs(I,O({},x,{children:[a,m&&u.jsxs(w,O({},y,{children:[" ","*"]}))]}))}),qR=({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(PR,{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"]),JR=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"),XR=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"),ZR=["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"],eL=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,{})},tL=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}})}),nL=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]}]]}),rL=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]}]:[]]}),iL=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),oL=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>O({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),aL=u.jsx(JR,{}),sL=u.jsx(XR,{}),lL=V.forwardRef(function(t,n){var r,i,o,a,s;const l=dt({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=aL,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:S,indeterminate:I=!1,indeterminateIcon:x=sL,name:w,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_,readOnly:D,required:G,value:F,color:T,variant:j,size:Y="md",component:z,slots:$={},slotProps:B={}}=l,W=Ae(l,ZR),q=V.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(S!=null?S:q==null?void 0:q.htmlFor),U={checked:c,defaultChecked:p,disabled:ee,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_},{getInputProps:H,checked:ne,disabled:se,focusVisible:ae}=NS(U),X=ne||I,ge=X?j||"solid":j||"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=eL(lt),de=O({},W,{component:z,slots:$,slotProps:B}),[he,xe]=Ie("root",{ref:n,className:_t.root,elementType:tL,externalForwardedProps:de,ownerState:lt}),[Te,He]=Ie("checkbox",{className:_t.checkbox,elementType:nL,externalForwardedProps:de,ownerState:lt}),[Pe,Ee]=Ie("action",{className:_t.action,elementType:rL,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"]},I&&{"aria-checked":"mixed"}),className:_t.input,elementType:iL,externalForwardedProps:de,getSlotProps:H,ownerState:lt}),[jt,Lt]=Ie("label",{additionalProps:{htmlFor:M},className:_t.label,elementType:oL,externalForwardedProps:de,ownerState:lt});let qt=d;return g?qt=null:I?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(jt,O({},Lt,{children:h}))})]}))}),cL=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(V1,{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(zh,{children:[t.includes(c)&&u.jsx(cL,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(lL,{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(zh,{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"]},uL=({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/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",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,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACfRJREFUeJztnXuIXNUdx913shutjfVBqtGFupuZ3Xnd9zz3Ne/dYKEo/isSEGqFSlslSFBi2kStSqkiCEGl1D/ECP4hKLYmTUziZjfRjUl8FzU0pbJLtIlJ1t2N37PZQHBM9t67d845d+b3hS8z9+59nfP73N/5nZnZmcsuI5FIJJJE0pOlpqg+2NwbTbUEQlZLd4/ecnNAbT3vrqDWuqbXbA1GEq0RbaBFSxSbRF8zySOF1b5G1cqtDCl93Xhcq1r530X1gYeMVHlUTxSPYnkqZgydBCDTCP4cfJY9YnkG608pVu44gDiGbXdFtP6N2P4+xcwWw2p/AH/vwHYEi+xC8BoQrOUI1q3wk1jeA39ppIZPm+nhOSuz9uxSjePMmjgeYPlIjeffCGt9vwcoAZyvRXT7SQvCUHAFAjIIGNYjUP/A8gkzPbLk4DsxzjmtJQrjgGNzVBtI4FpaRfdL3QkdvwypPaPFC5uMZGkcmQAgDHMF4cezyMickSxPApLtuL518C8AS6Po/qppYShYjbtwHdL2q3qyfEo0BIsMM3OoXY4iez0AeDvNVLlBdP/VjHC3tQGComLmtgGE06KD7caA42u0YyOK3JVL7hAccAW8DR5d8L6LeAze6kEMpBIq/lvUeGEn7rrvRAd26ZljZE5PFg+j7uhH1nA/pOBgP4E/sXni3R7GQ5gwdbwaIGzAuPwpagVPZgwyGVnjjBYvbsEweLmrDqonKBQru0q18vdjDJ4UHbhqm9UbGBJfQpHc5bijcIArah0KFI8rAMPdyAzHWIoVHTCOnsFM5UHHHVbLUKDwuhLTtQ1Ip/+TIEAiPAsoNjruOIdQ7KlC7DwXIOjQ4vlfYZjYgTQ6I0FwfAnFx7UCRdQY7EIR+SJgmJYgKKJd31AoZu46DTAgSxAMHkBxuZ+hAAjNmHr9AUPFvyUIgmyuLygw1boKReSv8fhxnc0onELxsOPO9RsUmHtfjaxwJ4aJccBwRoKOl9lcoNhbhTjbEoaIFTEzu05Plj63MpQZ6hYKI1VqiZlD3agb/gYYpmiYkBiKrqDeGlIyN1jpYc8/6ME+PBLVB8PICvdgmHgbU8uTEnSuX+0aihVOoQAQIRR5n8HPhrW+jGrl25YCgmJmGwFCGhlhA471MrLCccoKnkGxiQsUCGAMQZv/AAoeZ1D8/Ze9RqBYubvwPN8TSXZim9W406/HRf0cvhLPVyELrAZQnRGtP6InSndgm3uxfif2+8pIDc9K0Im1ZjFQ/MBz7GVlzAxO4vFrKz0yhXWTWP4cy5PY5zj7WBt7a5dtK0Gn1bqXBMVHNk/yDtsHd3z0IlCQ5TJBQfYOig6CombNEQozGwEU30rQaPLiUPyRCxSYQoYJCl+YCxSj56DIERT+MEcorFyIoPCF+UGhnoOCXn6W366haHcORb6XoPCFZ40ULyjiBIVPzBOKAkHhD7N/QP6TWyg+tHmSfWwfLVHoISh8YZ5QFINWeuSEBI0mywKFTlD4xa6hWO4YimQpYGUICh+YoCCLgWLsHBRlQLGWoJDfDIrNvKBYg+f/l6DRZFmgMAgKv5gjFKlyN0HhCwOKYVdQLHMKhZkaJij8YY5QpEe68PwbCRpNXhyKLW6h+MDmScYXMsWNOFnNf5lYDZgfFOynCmJm1m52IdcDFDcHVPZFIXb3IfsQijbnUGiAIntEgkaTZYGiKwgoTILCB2ZQPFJtKPZfAMVhCRpNlgiKJoWg8IN5QqE3IVMckqDRZFmg6O4hKHxi11C0uoECw8f7EjSaLA8UBqDIERTym0HxaLWhOHABFAclaDS5ilDYfc2BoPCXOULROw/FhASNJlcJihanUKzpNQkKf5g7FO9J0Gjy4lA8xguKRoLCF+YCxbvzUISsRsXKvStBo8kEBVlaKAKAQrVyByRoNLlKUDQ7hyIOKPIEhfzmCEV4Hor9EjSavDgUfyYoyJ5BYfcDM++xfYLhBINiXIJGkwkKMi8omhxDEQEU8fyYBI0mywJFTyRJUPjDXKFo0OKFfRI0mrw4FI9XG4qJeSiiBIVfzBuKUdENJksFRapBJSh8YbdQNDqFovccFO+IbjBZJihiKTZ8EBQ+MEco0gyKvaIbLKPN9MhZLVE4ZaTKX+nJ0ljUGHpBtfLPaoni01j+q5Es/0WHsfwUsu0zMTO7VbVyryF4x7DuhNe/3IzjPuEWCrv/7XWQ7RMiKM4DwKZ8JxHcCS1ReiOiDdyvxvO3OQ7Cgsz0MIbl/K1hrf8+gPU6IPoC677zBxRKpgFU7xEdFEEgnEWwvgEIb8aM7DoEsFNPFJrdgnAp4cb7Kc5T1uL5vyPzTFkZ51mENxS7RQeIlwHBDIJzULFyW5ANBsJqX4PnBCwiPVFcFlb7h5BJngcgtr+Z0C0UDQRFpdnQABjYOP9yVB8soc3XeB5pF0L2aAYYA7i25wDHot9QyBGKvpqFYr5QjBcOozjcHDUGA4qZ5Z4V7ArXVgQcE+yaLwHFk44P7BCK98/vByjeFh1Aj2GYBQzjipn7ZUTrlxaEHxMyx1Zc/4wMUOwSHUgvjDttFiBsQ7V/i5EstnsaLU7SE6V2tOMx+LRQKHSfQ4Gp3oyRLO/AMJEVUThWQ6h9CgDjuDgoksWdogPrEoZpdNx+DBVr0YZGT6MigZDBkyhA/4Ppq3somNxBUfIdFADhQxRntxvJUodnUZBQMTO7CnXGAQYGbyj+JTrI9jLD/ItNX6jxwnpkiZWe9bzkwrD4M7T7Jdj5ex9MLNg2O/nQ+X38AAXS6CSKyMdjxuBNyBI1UTc4EWJ0LWo/xdXOLqHYITrol4BhFrOJ15BCcyi+6g4GT1QrUACGM0ibb0b1gSxqh5orIrnKHRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},dL=({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})]})]})},hm=Ue(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),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.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 S;return(S=e.related)==null?void 0:S.some(I=>I.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(hm,{}),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})]})},hL=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(hm,{}),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})]})},pm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),gm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),pL=e=>{const t=(n,r)=>{if(r==="games"){const i=gm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=pm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(fL,{label:e.labels.games,related:pm(e.related),onChange:n=>t(n,"games")}),u.jsx(hL,{label:e.labels.templates,related:gm(e.related),onChange:n=>t(n,"templates")})]})},gL=(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"})}),mL=["PENDING","LIVE","SETTLED"],vL=["OPEN"],bL=["ACTIVE","INACTIVE","EXPIRED"],yL=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"),mm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(bL):e.entityType==="TEMPLATE"?t=Array.from(mL):t=Array.from(vL),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(b.Option,{value:n,children:yL.get(n)},`${e.entityType}-${n}-status`))})};class xL{constructor(){te(this,"name","");te(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});te(this,"trigger",{trigger_type:"DATETIME",date:""})}}const CL=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"),wL=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(CL,{}),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})]})]})})})},IL=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),[S,I]=C.useState("success"),[x,w]=C.useState(""),[y,A]=C.useState(!1),E=C.useRef(!1),_=gL(e.entityId,E.current),{https:D}=ft();if(!_)return u.jsx(ds,{my:10});const G=()=>A(!y),F=(B,W)=>{v(!0),I(B),w(W)},T=(B,W)=>{i(W.scheduled_task_config.change.status),l(W.trigger.date),n(B)},j=()=>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,W)=>k(this,null,function*(){m(!0);const q=$("UPDATE",W);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("")}),z=()=>{E.current=!E.current},$=(B,W)=>{const q=new xL,ee=B==="CREATE"?o:r,R=B==="CREATE"?null:W,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,W)=>u.jsx(b.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(b.CardContent,{children:t===W?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(mm,{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(W,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(wL,{labels:e.labels,isOpen:y,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:z,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,W)=>a(W),sx:{minHeight:"37px"},children:u.jsx(mm,{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:j,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:S,hideToast:()=>v(!1)})]})};function SL(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 AL=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],TL=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,SL,{});return r&&i&&(c.root+=` ${i}`),c},EL=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]})]}),kL=be(EL,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),_L=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})}),vm=V.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,AL),S=V.useContext(_p),I=V.useContext(Pp),x=t.variant||S.variant||d,w=t.size||S.size||p,y=t.color||S.color||l,A=(r=t.loading||t.disabled)!=null?r:S.disabled||f||c,E=V.useRef(null),_=sn(E,n),{focusVisible:D,setFocusVisible:G,getRootProps:F}=zl(O({},i,{disabled:A,rootRef:_})),T=h!=null?h:u.jsx(Ep,{color:y,thickness:{sm:2,md:3,lg:4}[w]||3});V.useImperativeHandle(a,()=>({focusVisible:()=>{var M;G(!0),(M=E.current)==null||M.focus()}}),[G]);const j=O({},i,{component:s,color:y,disabled:A,variant:x,loading:f,size:w,focusVisible:D,instanceSize:t.size}),Y=TL(j),z=M=>{var U;let H=i.onClick;if(typeof g.root=="function"?H=g.root(j).onClick:g.root&&(H=g.root.onClick),(U=H)==null||U(M),I){var ne;(ne=I.onClick)==null||ne.call(I,M,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(j)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),I!=null&&I.value&&(Array.isArray(I.value)?$=I.value.indexOf(i.value)!==-1:$=I.value===i.value);const B=O({},v,{component:s,slots:m,slotProps:g}),[W,q]=Ie("root",{ref:n,className:Y.root,elementType:kL,getSlotProps:F,externalForwardedProps:B,ownerState:j,additionalProps:{onClick:z,"aria-pressed":$}}),[ee,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:_L,externalForwardedProps:B,ownerState:j});return u.jsx(W,O({},q,{children:f?u.jsx(ee,O({},R,{children:T})):o}))});vm.muiName="IconButton";const bm=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"),PL=({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(vm,{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(bm,{})}),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 DL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ym=DL,OL=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,RL=OL,LL=RL,ML=typeof self=="object"&&self&&self.Object===Object&&self,BL=LL||ML||Function("return this")(),xm=BL,$L=xm,NL=function(){return $L.Date.now()},FL=NL,zL=/\s/;function jL(e){for(var t=e.length;t--&&zL.test(e.charAt(t)););return t}var UL=jL,VL=UL,HL=/^\s+/;function WL(e){return e&&e.slice(0,VL(e)+1).replace(HL,"")}var GL=WL,YL=xm,KL=YL.Symbol,pu=KL,Cm=pu,wm=Object.prototype,qL=wm.hasOwnProperty,QL=wm.toString,co=Cm?Cm.toStringTag:void 0;function JL(e){var t=qL.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 XL=JL,ZL=Object.prototype,eM=ZL.toString;function tM(e){return eM.call(e)}var nM=tM,Im=pu,rM=XL,iM=nM,oM="[object Null]",aM="[object Undefined]",Sm=Im?Im.toStringTag:void 0;function sM(e){return e==null?e===void 0?aM:oM:Sm&&Sm in Object(e)?rM(e):iM(e)}var lM=sM;function cM(e){return e!=null&&typeof e=="object"}var uM=cM,dM=lM,fM=uM,hM="[object Symbol]";function pM(e){return typeof e=="symbol"||fM(e)&&dM(e)==hM}var Am=pM,gM=GL,Tm=ym,mM=Am,Em=NaN,vM=/^[-+]0x[0-9a-f]+$/i,bM=/^0b[01]+$/i,yM=/^0o[0-7]+$/i,xM=parseInt;function CM(e){if(typeof e=="number")return e;if(mM(e))return Em;if(Tm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gM(e);var n=bM.test(e);return n||yM.test(e)?xM(e.slice(2),n?2:8):vM.test(e)?Em:+e}var wM=CM,IM=ym,gu=FL,km=wM,SM="Expected a function",AM=Math.max,TM=Math.min;function EM(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(SM);t=km(t)||0,IM(n)&&(d=!!n.leading,f="maxWait"in n,o=f?AM(km(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(S,t),d?p(A):a}function g(A){var E=A-l,_=A-c,D=t-E;return f?TM(D,o-_):D}function v(A){var E=A-l,_=A-c;return l===void 0||E>=t||E<0||f&&_>=o}function S(){var A=gu();if(v(A))return I(A);s=setTimeout(S,g(A))}function I(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:I(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(S,t),p(l)}return s===void 0&&(s=setTimeout(S,t)),a}return y.cancel=x,y.flush=w,y}var kM=EM;const Sr=fn(kM),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})`})]}),_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,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),S=(y,A)=>{a(A),i(A[0]?[A[0].id]:[])},I=3;C.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(y=>{a(_m(y))}).catch(y=>{console.error(y),v(),a([])})},[]);const x=C.useMemo(()=>Sr(y=>{d(!0),g.football.getCompetitions({name:y}).then(A=>{l([..._m(A)]),d(!1)}).catch(A=>{console.error(A),v(),l([]),d(!1)})},300),[]);C.useEffect(()=>{if(!f||f.length<I){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:S,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})]})},Pm=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}}))||[],PM=({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)},S=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(w=>{o(Pm(w))}).catch(w=>{console.error(w),g(),o([])})},[]);const I=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([...Pm(A)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<S){s([]);return}return I(d),()=>I.cancel()},[d,I]);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})]})},Dm=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})))||[],DM=({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(Dm(x))}).catch(x=>{m(),console.error(x),i([])})},[]);const S=C.useMemo(()=>Sr(x=>{l(!0),p.profile.getByIds([],x).then(w=>{a([...Dm(w)]),l(!1)}).catch(w=>{console.error(w),m(),a([]),l(!1)})},300),[]);C.useEffect(()=>{if(!c||c.length<v){a([]);return}return S(c),()=>S.cancel()},[c,S]);const I=(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:I,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})]})},Om=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}}))||[],OM=({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)},S=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(Om(y))}).catch(w=>{console.error(w),g(),o([])})},[]);const I=C.useMemo(()=>Sr((w,y)=>{c(!0),m.football.getTeams({name:w,scope:y}).then(A=>{const E=A.data.filter(_=>!_.name.includes("/"));s([...Om(E)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<S){s([]);return}return I(d,n),()=>I.cancel()},[d,I]);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})]})},RM=({checked:e,disabled:t,sx:n,onChange:r})=>{const i=n?N({},n):{ml:1};return u.jsx(b.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:o=>r(o.target.checked),sx:Q(N({},i),{"--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,sx:a,onChange:s})=>{const l=u.jsx(RM,{checked:n,disabled:i,onChange:s,sx:a==null?void 0:a.switch}),c=a!=null&&a.container?N({},a.container):{mb:2};return r?u.jsxs(b.Box,{sx:N({},c),children:[u.jsx(b.Typography,{component:"label",startDecorator:t=="start"?void 0:l,endDecorator:t=="start"?l: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:l,endDecorator:t=="start"?l:void 0,children:e})},LM={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"})},MM=e=>e.map(t=>({label:t,value:t})),Rm=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=MM(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(um,{styles:LM,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})]})},BM=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 Lm{constructor(){te(this,"contestId","");te(this,"contestType","");te(this,"description","");te(this,"userList",[])}}const $M=(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=o.helpers.getSDKConfiguration();let c=null;l.errorHandlingMode==="standard"?c=s.error:c=s.data.error,c.code!==404&&c.status!=="code_unknown_contest"&&n(),i(new Lm)}});return C.useEffect(()=>{a()},[]),r};class NM{constructor(){te(this,"position","");te(this,"profileId","");te(this,"note","");te(this,"tags",[])}}function FM(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 zM=FM,jM=Array.isArray,UM=jM,Mm=pu,VM=zM,HM=UM,WM=Am,GM=1/0,Bm=Mm?Mm.prototype:void 0,$m=Bm?Bm.toString:void 0;function Nm(e){if(typeof e=="string")return e;if(HM(e))return VM(e,Nm)+"";if(WM(e))return $m?$m.call(e):"";var t=e+"";return t=="0"&&1/e==-GM?"-0":t}var YM=Nm,KM=YM;function qM(e){return e==null?"":KM(e)}var Fm=qM;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 JM=QM;function XM(e){return function(t){return e==null?void 0:e[t]}}var ZM=XM,e2=ZM,t2={À:"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",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"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"},n2=e2(t2),r2=n2,i2=r2,o2=Fm,a2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s2="\\u0300-\\u036f",l2="\\ufe20-\\ufe2f",c2="\\u20d0-\\u20ff",u2=s2+l2+c2,d2="["+u2+"]",f2=RegExp(d2,"g");function h2(e){return e=o2(e),e&&e.replace(a2,i2).replace(f2,"")}var p2=h2,g2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function m2(e){return e.match(g2)||[]}var v2=m2,b2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function y2(e){return b2.test(e)}var x2=y2,zm="\\ud800-\\udfff",C2="\\u0300-\\u036f",w2="\\ufe20-\\ufe2f",I2="\\u20d0-\\u20ff",S2=C2+w2+I2,jm="\\u2700-\\u27bf",Um="a-z\\xdf-\\xf6\\xf8-\\xff",A2="\\xac\\xb1\\xd7\\xf7",T2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",E2="\\u2000-\\u206f",k2=" \\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",Vm="A-Z\\xc0-\\xd6\\xd8-\\xde",_2="\\ufe0e\\ufe0f",Hm=A2+T2+E2+k2,Wm="['’]",Gm="["+Hm+"]",P2="["+S2+"]",Ym="\\d+",D2="["+jm+"]",Km="["+Um+"]",qm="[^"+zm+Hm+Ym+jm+Um+Vm+"]",O2="\\ud83c[\\udffb-\\udfff]",R2="(?:"+P2+"|"+O2+")",L2="[^"+zm+"]",Qm="(?:\\ud83c[\\udde6-\\uddff]){2}",Jm="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+Vm+"]",M2="\\u200d",Xm="(?:"+Km+"|"+qm+")",B2="(?:"+ui+"|"+qm+")",Zm="(?:"+Wm+"(?:d|ll|m|re|s|t|ve))?",ev="(?:"+Wm+"(?:D|LL|M|RE|S|T|VE))?",tv=R2+"?",nv="["+_2+"]?",$2="(?:"+M2+"(?:"+[L2,Qm,Jm].join("|")+")"+nv+tv+")*",N2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",F2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",z2=nv+tv+$2,j2="(?:"+[D2,Qm,Jm].join("|")+")"+z2,U2=RegExp([ui+"?"+Km+"+"+Zm+"(?="+[Gm,ui,"$"].join("|")+")",B2+"+"+ev+"(?="+[Gm,ui+Xm,"$"].join("|")+")",ui+"?"+Xm+"+"+Zm,ui+"+"+ev,F2,N2,Ym,j2].join("|"),"g");function V2(e){return e.match(U2)||[]}var H2=V2,W2=v2,G2=x2,Y2=Fm,K2=H2;function q2(e,t,n){return e=Y2(e),t=n?void 0:t,t===void 0?G2(e)?K2(e):W2(e):e.match(t)||[]}var Q2=q2,J2=JM,X2=p2,Z2=Q2,eB="['’]",tB=RegExp(eB,"g");function nB(e){return function(t){return J2(Z2(X2(t).replace(tB,"")),e,"")}}var rB=nB,iB=rB,oB=iB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),aB=oB;const sB=fn(aB);class lB{constructor(){te(this,"id","");te(this,"value","");te(this,"label","")}}class cB extends lB{constructor(){super(...arguments);te(this,"logo","");te(this,"countryFlag","");te(this,"countryName","")}}class rv extends cB{constructor(){super(...arguments);te(this,"group","")}}const uB=(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),{[sB(r)]:mu(e[r])}),{}):e,iv=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 rv;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},dB=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"}},fB=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"}},hB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,S,I,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.jsx(b.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),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:((S=e.profileModel)==null?void 0:S.name)||"Unknown",sx:{mr:1}}),u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{fontWeight:"md",children:[uB((I=e.profileModel)==null?void 0:I.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:"note",value:s,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(Rm,{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,{})})})})]})},pB=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 NM;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",{style:{width:"70px"},children:e.labels.position}),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",{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(hB,{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})},gB=(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 mB{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 vB=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})})},bB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Lm,yB=e=>{var y;const[t,n]=C.useState(bB(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:S,isLeaderboardLoading:I}=gB(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 mB().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(pB,{winners:t.userList,leaderboard:v,hasMoreParticipants:S,isLoading:I,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(vB,{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)})]})},xB=e=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=$M(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(BM,{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(yB,{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})},CB=10,wB=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([...iv(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===CB,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 ov(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 IB(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 SB(e){return typeof e=="number"&&isNaN(e)}function av(e){return di(e)||SB(e)||typeof e=="number"&&!isFinite(e)}function sv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function AB(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 TB(e,t,n){var r=AB(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 EB(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 kB(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 lv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function cv(e,t){return Array(t+1).join(e)}function uv(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."+cv("0",Math.abs(a))+i:a>=s?i=i+cv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function dv(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,S){return g.length>S?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=lv(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 fv=IB(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}}}),_B=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function PB(e,t,n){return Math.min(Math.max(e,t),n)}function yu(e){return Math.max(e.selectionStart,e.selectionEnd)}function DB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function OB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function RB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function LB(e,t,n,r,i,o,a){a===void 0&&(a=RB);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 S=r;S<c&&(h[S]===-1||!o(n[S]));)S++;var I=S===c||h[S]===-1?d:h[S];for(S=r-1;S>0&&h[S]===-1;)S--;var x=S===-1||h[S]===-1?0:h[S]+1;return x>I?I:r-x<I-r?x:I}function hv(e,t,n,r){var i=e.length;if(t=PB(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 MB(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 pv(e,t,n,r,i,o){o===void 0&&(o=ir);var a=EB(function(m,g){var v,S;return av(m)?(S="",v=""):typeof m=="number"||g?(S=typeof m=="number"?uv(m):m,v=r(S)):(S=i(m,void 0),v=r(S)),{formattedValue:v,numAsString:S}}),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 BB(e){return e.replace(/[^0-9]/g,"")}function $B(e){return e}function NB(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=$B);var s=e.removeFormatting;s===void 0&&(s=BB);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 S=e.value,I=e.getCaretBoundary;I===void 0&&(I=MB);var x=e.isValidInputCharacter;x===void 0&&(x=fo);var w=e.isCharacterSame,y=ov(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=pv(S,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}),j=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=C.useState(!1),z=Y[0],$=Y[1],B=C.useRef(null),W=C.useRef({setCaretTimeout:null,focusTimeout:null});C.useEffect(function(){return $(!0),function(){clearTimeout(W.current.setCaretTimeout),clearTimeout(W.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),W.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==he&&Ar(de,he)},0))},M=function(de,he,xe){return hv(de,he,I(de),xe)},U=function(de,he,xe){var Te=I(he),He=LB(he,_,de,xe,Te,x,w);return He=hv(he,He,Te),He},H=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=U(It,he,St),Ee!==void 0&&R(xe,Ee,he)}he!==_&&j(ee(he,Pe),{event:He,source:Te})};C.useEffect(function(){var de=T.current,he=de.formattedValue,xe=de.numAsString;(_!==he||D!==xe)&&j(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=U(T.current.formattedValue,_,ne);de.value=_,R(de,he,_)}},[_]);var ae=function(de,he,xe){var Te=he.target,He=F.current?_B(F.current,Te.selectionEnd):fv(_,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,jt=yu(St),Lt=U(de,_,jt);return St.value=_,R(St,Lt,_),!1}return H({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 jt=Ee;if(St){var Lt=xe==="ArrowLeft"?"left":"right";jt=M(Pe,Ee,Lt),jt!==Ee&&de.preventDefault()}else xe==="Delete"&&!x(Pe[Ee])?jt=M(Pe,Ee,"right"):xe==="Backspace"&&!x(Pe[Ee])&&(jt=M(Pe,Ee,"left"));jt!==Ee&&R(he,jt,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,W.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(W.current.focusTimeout),clearTimeout(W.current.setCaretTimeout),v(de)},wt=z&&DB()?"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 gv(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=lv(m,n,!!r)),c&&(p=TB(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 FB(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 zB(e,t){return new RegExp("(^-)|[0-9]|"+sv(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 UB(e,t,n){var r;t===void 0&&(t=OB(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 S=function(B,W,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),W-=M,q-=M),{value:B,start:W,end:q,hasNegation:ee}},I=S(e,d,f),x=I.hasNegation;r=I,e=r.value,d=r.start,f=r.end;var w=S(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=FB(x?"-"+e:e,i),e=(e.match(zB(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(sv(m),"g"),function(B,W){return W===T?".":""});var j=bu(e,i),Y=j.beforeDecimal,z=j.afterDecimal,$=j.addNegation;return c.end-c.start<l.end-l.start&&Y===""&&g&&!parseFloat(z)&&(e=$?"-":""),e}function VB(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 HB(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
|
+
`]))),GD=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(WD," 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"},"","")})},YD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,$D);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}))},KD=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}})},QD=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=QD,JD=["data"],XD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},ZD=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))},eO=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"})},tO=function(t){var n=Ig(t);n.data;var r=Cn(n,JD);return pe.jsx("div",O({},tt(t,"groupHeading",{"group-heading":!0}),r))},nO=ZD,rO=["innerRef","isDisabled","isHidden","inputClassName"],iO=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)":""},oO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Mg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},oO={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"},Mg)},aO=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Mg)},sO=function(t){var n=t.cx,r=t.value,i=Ig(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,c=Cn(i,rO);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:aO(s),disabled:a},c)))},lO=sO,cO=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})},uO=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})},dO=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}})},Bg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},fO=Bg,hO=Bg;function pO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",O({role:"button"},n),t||pe.jsx(eu,{size:14}))}var gO=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}))},mO=gO,vO=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}})},bO=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)},yO=bO,xO=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})},CO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"placeholder",{placeholder:!0}),r),n)},wO=CO,IO=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})},SO=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)},AO=SO,TO={ClearIndicator:UD,Control:qD,DropdownIndicator:zD,DownChevron:Rg,CrossIcon:eu,Group:nO,GroupHeading:tO,IndicatorsContainer:MD,IndicatorSeparator:HD,Input:lO,LoadingIndicator:YD,Menu:CD,MenuList:ID,MenuPortal:_D,LoadingMessage:ED,NoOptionsMessage:TD,MultiValue:mO,MultiValueContainer:fO,MultiValueLabel:hO,MultiValueRemove:pO,Option:yO,Placeholder:wO,SelectContainer:DD,SingleValue:AO,ValueContainer:RD},EO=function(t){return ve(ve({},TO),t.components)},$g=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function kO(e,t){return!!(e===t||$g(e)&&$g(t))}function _O(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!kO(e[n],t[n]))return!1;return!0}function PO(e,t){t===void 0&&(t=_O);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 DO={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"},OO=function(t){return pe.jsx("span",O({css:DO},t))},Ng=OO,RO={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:"",".")}},LO=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,S=l.menuIsOpen,I=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({},RO),f||{})},[f]),D=C.useMemo(function(){var z="";if(n&&_.onChange){var $=n.option,B=n.options,W=n.removedValue,Q=n.removedValues,te=n.value,R=function(X){return Array.isArray(X)?null:X},M=W||$||R(te),U=M?h(M):"",H=B||Q||void 0,ne=H?H.map(h):[],se=ve({isDisabled:M&&g(M,s),label:U,labels:ne},n);z=_.onChange(se)}return z},[n,_,g,s,h]),G=C.useMemo(function(){var z="",$=r||i,B=!!(r&&s&&s.includes(r));if($&&_.onFocus){var W={focused:$,label:h($),isDisabled:g($,s),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:s,isAppleDevice:d};z=_.onFocus(W)}return z},[r,i,h,g,_,o,s,d]),F=C.useMemo(function(){var z="";if(S&&I.length&&!y&&_.onFilter){var $=x({count:o.length});z=_.onFilter({inputValue:p,resultsMessage:$})}return z},[o,p,S,_,I,x,y]),T=(n==null?void 0:n.action)==="initial-input-focus",j=C.useMemo(function(){var z="";if(_.guidance){var $=i?"value":S?"menu":"input";z=_.guidance({"aria-label":A,context:$,isDisabled:r&&g(r,s),isMulti:m,isSearchable:v,tabSelectsValue:w,isInitialFocus:T})}return z},[A,r,i,m,g,v,S,_,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"},j));return pe.jsx(C.Fragment,null,pe.jsx(Ng,{id:c},T&&Y),pe.jsx(Ng,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&Y))},MO=LO,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źẑżžẓẕƶȥɀⱬꝣ"}],BO=new RegExp("["+nu.map(function(e){return e.letters}).join("")+"]","g"),Fg={},ru=0;ru<nu.length;ru++)for(var iu=nu[ru],ou=0;ou<iu.letters.length;ou++)Fg[iu.letters[ou]]=iu.base;var zg=function(t){return t.replace(BO,function(n){return Fg[n]})},$O=PO(zg),jg=function(t){return t.replace(/^\s+|\s+$/g,"")},NO=function(t){return"".concat(t.label," ").concat(t.value)},FO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:NO,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=$O(d),f=zg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},zO=["innerRef"];function jO(e){var t=e.innerRef,n=Cn(e,zO),r=hD(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 UO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function VO(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,S){if(c.current!==null){var I=c.current,x=I.scrollTop,w=I.scrollHeight,y=I.clientHeight,A=c.current,E=S>0,_=w-y-x,D=!1;_>S&&a.current&&(r&&r(v),a.current=!1),E&&s.current&&(o&&o(v),s.current=!1),E&&S>_?(n&&!a.current&&n(v),A.scrollTop=w,D=!0,a.current=!0):!E&&-S>x&&(i&&!s.current&&i(v),A.scrollTop=0,D=!0,s.current=!0),D&&UO(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 S=l.current-v.changedTouches[0].clientY;d(v,S)},[d]),m=C.useCallback(function(v){if(v){var S=uD?{passive:!1}:!1;v.addEventListener("wheel",f,S),v.addEventListener("touchstart",h,S),v.addEventListener("touchmove",p,S)}},[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 Ug=["boxSizing","height","overflow","paddingRight","position"],Vg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Hg(e){e.preventDefault()}function Wg(e){e.stopPropagation()}function Gg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Yg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Kg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),so=0,si={capture:!1,passive:!1};function HO(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(Kg){var c=document.body,d=c&&c.style;if(r&&Ug.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(Vg).forEach(function(m){var g=Vg[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Yg()&&(c.addEventListener("touchmove",Hg,si),l&&(l.addEventListener("touchstart",Gg,si),l.addEventListener("touchmove",Wg,si))),so+=1}},[r]),s=C.useCallback(function(l){if(Kg){var c=document.body,d=c&&c.style;so=Math.max(so-1,0),r&&so<1&&Ug.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Yg()&&(c.removeEventListener("touchmove",Hg,si),l&&(l.removeEventListener("touchstart",Gg,si),l.removeEventListener("touchmove",Wg,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 WO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},GO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function YO(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=VO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),d=HO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(C.Fragment,null,n&&pe.jsx("div",{onClick:WO,css:GO}),t(f))}var KO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},QO=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:KO,value:"",onChange:function(){}})},qO=QO;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 JO(){return au(/^iPhone/i)}function Qg(){return au(/^Mac/i)}function XO(){return au(/^iPad/i)||Qg()&&navigator.maxTouchPoints>1}function ZO(){return JO()||XO()}function eR(){return Qg()||ZO()}var tR=function(t){return t.label},qg=function(t){return t.label},Jg=function(t){return t.value},nR=function(t){return!!t.isDisabled},rR={clearIndicator:jD,container:PD,control:KD,dropdownIndicator:FD,group:XD,groupHeading:eO,indicatorsContainer:LD,indicatorSeparator:VD,input:iO,loadingIndicator:GD,loadingMessage:AD,menu:bD,menuList:wD,menuPortal:kD,multiValue:cO,multiValueLabel:uO,multiValueRemove:dO,noOptionsMessage:SD,option:vO,placeholder:xO,singleValue:IO,valueContainer:OD},iR={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%)"},oR=4,Xg=4,aR=38,sR=Xg*2,lR={baseUnit:Xg,controlHeight:aR,menuGutter:sR},su={borderRadius:oR,colors:iR,spacing:lR},cR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tg(),captureMenuScroll:!Tg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:FO(),formatGroupLabel:tR,getOptionLabel:qg,getOptionValue:Jg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:nR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!lD(),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 Zg(e,t,n,r){var i=im(e,t,n),o=om(e,t,n),a=rm(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 Zg(e,a,t,s)}).filter(function(a){return nm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Zg(e,n,t,r);return nm(e,o)?o:void 0}).filter(dD)}function em(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 tm(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 uR(e,t){return em(cs(e,t))}function nm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!sm(e)||!o)&&am(e,{label:a,value:s,data:i},r)}function dR(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 fR(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},rm=function(t,n){return t.getOptionLabel(n)},us=function(t,n){return t.getOptionValue(n)};function im(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function om(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 am(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var sm=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},hR=1,lm=function(e){HP(n,e);var t=YP(n);function n(r){var i;if(UP(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=eR(),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(S){return i.getOptionValue(S)!==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 tm(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 rD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return rm(i.props,l)},i.getOptionValue=function(l){return us(i.props,l)},i.getStyles=function(l,c){var d=i.props.unstyled,f=rR[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 EO(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 em(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 sm(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,S=c.onKeyDown,I=c.tabSelectsValue,x=c.openMenuOnFocus,w=i.state,y=w.focusedOption,A=w.focusedValue,E=w.selectValue;if(!g&&!(typeof S=="function"&&(S(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||!I||!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||++hR),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 VP(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&&Ag(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&&(Ag(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 im(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return om(this.props,i,o)}},{key:"filterOption",value:function(i,o){return am(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,S=g.ariaSelection,I=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()?(S==null?void 0:S.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?V.createElement(m,O({},I,{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)):V.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,S=p.inputValue,I=p.placeholder,x=this.state,w=x.selectValue,y=x.focusedValue,A=x.isFocused;if(!this.hasValue()||!m)return S?null:V.createElement(f,O({},h,{key:"placeholder",isDisabled:g,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),I);if(v)return w.map(function(_,D){var G=_===y,F="".concat(i.getOptionLabel(_),"-").concat(i.getOptionValue(_));return V.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(j){j.preventDefault()}},data:_}),i.formatOptionLabel(_,"value"))});if(S)return null;var E=w[0];return V.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 V.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 V.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 V.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 V.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,S=v.captureMenuScroll,I=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,j=v.noOptionsMessage,Y=v.onMenuScrollToTop,z=v.onMenuScrollToBottom;if(!E)return null;var $=function(U,H){var ne=U.type,se=U.data,ae=U.isDisabled,X=U.isSelected,le=U.label,re=U.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(H),lt={id:wt,onClick:Ve,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:X};return V.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(U.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var U=M.data,H=M.options,ne=M.index,se="".concat(i.getElementId("group"),"-").concat(ne),ae="".concat(se,"-heading");return V.createElement(a,O({},m,{key:se,data:U,options:H,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 W=w({inputValue:I});if(W===null)return null;B=V.createElement(f,m,W)}else{var Q=j({inputValue:I});if(Q===null)return null;B=V.createElement(h,m,Q)}var te={minMenuHeight:y,maxMenuHeight:A,menuPlacement:_,menuPosition:D,menuShouldScrollIntoView:T},R=V.createElement(yD,O({},m,te),function(M){var U=M.ref,H=M.placerProps,ne=H.placement,se=H.maxHeight;return V.createElement(l,O({},m,te,{innerRef:U,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:ne}),V.createElement(YO,{captureEnabled:S,onTopArrive:Y,onBottomArrive:z,lockEnabled:F},function(ae){return V.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"?V.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 V.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 V.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return V.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):V.createElement("input",{name:c,type:"hidden",value:""});return V.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return V.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 V.createElement(MO,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 V.createElement(s,O({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),V.createElement(o,O({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),V.createElement(l,O({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),V.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,S=i.isMulti,I=is(m),x={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var w=g?uR(i,I):[],y=g?tm(cs(i,I),"".concat(h,"-option")):[],A=s?dR(o,I):null,E=fR(o,w),_=lu(y,E);x={selectValue:I,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(S,I,I[0]||null),options:I,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);lm.defaultProps=cR;var pR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function gR(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,pR),g=C.useState(s!==void 0?s:n),v=Vn(g,2),S=v[0],I=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(W,Q){typeof c=="function"&&c(W,Q),G(W)},[c]),T=C.useCallback(function(W,Q){var te;typeof d=="function"&&(te=d(W,Q)),I(te!==void 0?te:W)},[d]),j=C.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),Y=C.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),z=s!==void 0?s:S,$=l!==void 0?l:y,B=p!==void 0?p:D;return ve(ve({},m),{},{inputValue:z,menuIsOpen:$,onChange:F,onInputChange:T,onMenuClose:Y,onMenuOpen:j,value:B})}var mR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],cm=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 cm(t,o,i)})||r.some(function(o){return cm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function vR(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,mR),v=g.getOptionValue,S=v===void 0?Jg:v,I=g.getOptionLabel,x=I===void 0?qg:I,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:S,getOptionLabel:x})?d(w,a(w)):void 0},[a,d,x,S,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,j){if(j.action!=="select-option")return m(T,j);var Y=Array.isArray(T)?T:[T];if(Y[Y.length-1]===D){if(f)f(w);else{var z=d(w,w),$={action:"create-option",name:_,option:z};m(ao(A,[].concat(ai(is(E)),[z]),z),$)}return}m(T,j)},[d,w,A,_,D,f,m,E]);return ve(ve({},g),{},{options:G,onChange:F})}var bR=C.forwardRef(function(e,t){var n=gR(e),r=vR(n);return V.createElement(lm,O({ref:t},r))}),um=bR;const yR={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"})},xR=e=>e.map(t=>({label:t,value:t})),CR=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=e.sx||{marginBottom:"16px"},a=xR(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(um,{styles:yR,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()},S=new $p,I=ft(),x=()=>{d(""),i(!1)},w=j=>{let Y="",z="primary";switch(j){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,z="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,z="primary";break;case"image_reset":Y=e.labels.imageResetMessage,z="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,z="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,z="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,z="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,z="danger";break}h(z),d(Y),i(!0)},y=()=>a(!o),A=()=>l(!s),E=()=>{e.clearImage(),w("image_deleted")},_=j=>{navigator.clipboard.writeText(j),w("copy_url")},D=j=>k(this,null,function*(){j.persist();const Y=j.target.files?j.target.files[0]:null;if(Y){n(!0);try{const z=Y.type.split("/")[1],$=yield S.readFileAndHash(Y),B=(yield S.generateHashFileName(Y))+"."+z,W={image_type:z,image_file_name:B,image_size:Y.size,base64_sum:$},Q=yield I==null?void 0:I.https.generateSignedInUrl(W);if(Q!=null&&Q.ok){const te=yield Q.json(),R={"Content-Type":Y.type,"Content-MD5":$};try{const M=new File([Y],B,{type:Y.type}),U=yield I==null?void 0:I.https.storeInBucket(te.data.signed_url,M,R);e.onChangeImages(U||""),m(U),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(z){console.error("There was a problem with encrypting file...",z),w("encrypting_file_failed")}n(!1)}}),G=j=>k(this,null,function*(){if(j){n(!0);try{const Y=j.type.split("/")[1],z=yield S.readFileAndHash(j),$=(yield S.generateHashFileName(j))+"."+Y,B={image_type:Y,image_file_name:$,image_size:j.size,base64_sum:z},W=yield I==null?void 0:I.https.generateSignedInUrl(B);if(W!=null&&W.ok){const Q=yield W.json(),te={"Content-Type":j.type,"Content-MD5":z};try{const R=new File([j],$,{type:j.type}),M=yield I==null?void 0:I.https.storeInBucket(Q.data.signed_url,R,te);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 W==null?void 0:W.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=j=>{e.onChangeImages(j),m(j)};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(Ap,{})})})]}),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(Fp,{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(og,{})})})]}),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(Up,{type:"file",accept:"image/*",onChange:D,ref:g})]})}),I.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(zp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(at,{showToast:r,message:c,color:f,hideToast:x}),u.jsx(Np,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),u.jsx(ig,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:G,resetDefaultImageUrl:F})]})},wR=["cover","mobile"],IR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),SR=e=>e?N({},e):{main:"",mobile:"",cover:""},AR=e=>{const[t,n]=C.useState(!1),r=SR(e.defaultValue),i=IR(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:wR.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 TR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const ER=["className","color","component","variant","invertedColors","slots","slotProps"],kR=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return ut(r,TR,{})},_R=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&&i_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&o_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),PR=V.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,ER),h=O({},r,{color:o,component:a,invertedColors:l,variant:s}),p=kR(h),m=O({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Bn(p.root,i),elementType:_R,externalForwardedProps:m,ownerState:h});return u.jsx(g,O({},v))});function DR(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 OR=["color","textColor"],RR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],uu=V.createContext(!1),LR=V.createContext(!1),MR=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,DR,{})},BR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),$R=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),NR=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]))}),dm={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=V.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Ae(i,OR),l=V.useContext(uu),c=V.useContext(LR),d=KA(O({},s,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=dm,children:v,endDecorator:S,startDecorator:I,variant:x,slots:w={},slotProps:y={}}=d,A=Ae(d,RR),E=(r=t.color)!=null?r:x?o!=null?o:"neutral":o,_=l||c?t.level||"inherit":m,D=Jf(v,["Skeleton"]),G=f||(l?"span":g[_]||dm[_]||"span"),F=O({},d,{level:_,component:G,color:E,gutterBottom:h,noWrap:p,nesting:l,variant:x,unstable_hasSkeleton:D}),T=MR(F),j=O({},A,{component:G,slots:w,slotProps:y}),[Y,z]=Ie("root",{ref:n,className:T.root,elementType:NR,externalForwardedProps:j,ownerState:F}),[$,B]=Ie("startDecorator",{className:T.startDecorator,elementType:BR,externalForwardedProps:j,ownerState:F}),[W,Q]=Ie("endDecorator",{className:T.endDecorator,elementType:$R,externalForwardedProps:j,ownerState:F});return u.jsx(uu.Provider,{value:!0,children:u.jsxs(Y,O({},z,{children:[I&&u.jsx($,O({},B,{children:I})),D?V.cloneElement(v,{variant:v.props.variant||"inline"}):v,S&&u.jsx(W,O({},Q,{children:S}))]}))})});du.muiName="Typography";function FR(e){return it("MuiFormControl",e)}const fm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),zR=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"],UR=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,FR,{})},VR=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",[`&.${fm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${fm.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 ~ .${zR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),fu=V.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),[S,I]=V.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=UR(x),[A,E]=Ie("root",{ref:n,className:Bn(y.root,o),elementType:VR,externalForwardedProps:O({},g,{component:a,slots:p,slotProps:m}),ownerState:x}),_=V.useMemo(()=>({disabled:s,required:l,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":S?`${v}-helper-text`:void 0,setHelperText:I,registerEffect:w}),[d,s,c,S,v,w,l,f]);return u.jsx(Ha.Provider,{value:_,children:u.jsx(A,O({},E))})});function HR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const WR=["children","component","htmlFor","id","slots","slotProps"],GR=()=>ut({root:["root"],asterisk:["asterisk"]},HR,{}),YR=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)"})),KR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),hu=V.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,WR),p=V.useContext(Ha),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=O({},o,{required:m}),v=GR(),S=O({},h,{component:s,slots:d,slotProps:f}),[I,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:YR,externalForwardedProps:S,ownerState:g}),[w,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:KR,externalForwardedProps:S,ownerState:g});return u.jsxs(I,O({},x,{children:[a,m&&u.jsxs(w,O({},y,{children:[" ","*"]}))]}))}),QR=({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(PR,{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"]),JR=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"),XR=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"),ZR=["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"],eL=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,{})},tL=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}})}),nL=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]}]]}),rL=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]}]:[]]}),iL=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),oL=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>O({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),aL=u.jsx(JR,{}),sL=u.jsx(XR,{}),lL=V.forwardRef(function(t,n){var r,i,o,a,s;const l=dt({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=aL,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:S,indeterminate:I=!1,indeterminateIcon:x=sL,name:w,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_,readOnly:D,required:G,value:F,color:T,variant:j,size:Y="md",component:z,slots:$={},slotProps:B={}}=l,W=Ae(l,ZR),Q=V.useContext(Ha),te=(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(S!=null?S:Q==null?void 0:Q.htmlFor),U={checked:c,defaultChecked:p,disabled:te,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_},{getInputProps:H,checked:ne,disabled:se,focusVisible:ae}=NS(U),X=ne||I,ge=X?j||"solid":j||"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=eL(lt),de=O({},W,{component:z,slots:$,slotProps:B}),[he,xe]=Ie("root",{ref:n,className:_t.root,elementType:tL,externalForwardedProps:de,ownerState:lt}),[Te,He]=Ie("checkbox",{className:_t.checkbox,elementType:nL,externalForwardedProps:de,ownerState:lt}),[Pe,Ee]=Ie("action",{className:_t.action,elementType:rL,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"]},I&&{"aria-checked":"mixed"}),className:_t.input,elementType:iL,externalForwardedProps:de,getSlotProps:H,ownerState:lt}),[jt,Lt]=Ie("label",{additionalProps:{htmlFor:M},className:_t.label,elementType:oL,externalForwardedProps:de,ownerState:lt});let Qt=d;return g?Qt=null:I?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(jt,O({},Lt,{children:h}))})]}))}),cL=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(V1,{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(zh,{children:[t.includes(c)&&u.jsx(cL,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(lL,{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(zh,{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"]},uL=({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/9VZGREGrKxpP17T8bToUaMCnFEQV+gAaFV/d/bYt6O1e5YikPmtAVqNrC2AUBboA2RFfHPRywManQR5/QManMSB5EU1VQApij8k7IC4E855YBaHB0qAHwVExWuQWRxAuieiYHvCZDbzgYvmorTtgYvGTl6APwv4yD4koGlTwCqSwgKqz0AUBHUWgGiHlST0JEI0G0F1YBnOdcCpDFYq6V4grGyTwkdvwF+yEiIKd4A2AR0lgApCL5o70wIvIqCkKiCEBjloBqtxTO8FnqMYynw+2YGWk+AnAMfNnA2Bfa7mLag5zFwYuK1OXpTA/wsoymkKAXAVfAFIwcGwTwjIB7mwSRApgheQw2oGqYHVTERbx0M7tqJxxghd5/DL8F4K8YCwBLAAsAS8IqheI4lQO0VgIuA7hoAyRDVRUDKgZWMxH8BjwTUtQFpCqrOAXyXExFXFQQiGlRZ5GESkHSg7igwAWGqwLwRqGojapANU3sH5Cb4q4GKO+C7jO+JeDwQhqExPAflGEgbgGPgg1aiCp+Z/86riTD3xQaasqA/7Qw+S0WZi4HSIsC7jI6Qd2PBGSJOFpBsIDtAVTl7gOodgD1A9R2APeCLyIsvg3APoArEM0GiIHxW9AlK0sDflQYaO8EfeCT2bixKLQ08+zgQnxJ6QqSwDMhFUNNUGC6Ct/VFrZOBohdhzAy7KvJ0NjgdwT/snVlSAlEMRYO2duEADnQVIO2U/e9RLSkZbB7o5zvnbAGqX3Jzc2MJYHq0KoBZEZqBHAm7EOB6wGHOEo3jAKQbTF8Ydidwn8ugg50EOQ+yBrQKjHhJOPTYULQO6EAQlgykK2iHZtGtxlBD8Ibz8apbEGdC/Su8/Nvmfo4rBTp//h1uYPnBkGB43UGOgB0N2/uZG7VHD10FO8YFJUEYbAN2MoQ5DeU5KTsAO4FhHlPIC+O2AHCbONwCZBmIOgzxV66ietqUw4zqlwIsAeD+ELwDhO4PwTtA6NFx6FVAbeI2Afg2QCcQfE8AnAdyCjdROylFonKalCK1O8QVAuF/AL8A8D+ANQC8BrALoHcByPNA6gAbZikFZlE70xR0ejDyRKDJkRveUgrMo3Y0hBS5i9qBHonUEmY0rNGxCgHqQOwLMcd5iPqxDUB7QiPuUsBNAPhSsDWgtlBHQYrBcCFYLRBfAlgE0EsAM2LAZgCVAPgo0IgA+CTom8ZxwCD3QcGMgEHOg4JvAPoF+MS0aGpKpHHR9JxYbUGHGEFUIJOCsOlAWkMtAc2KAqdD6QsqAjsbF40TIWwP6CcA6wRwT5w+CN7mKeWHLoC4IQJKBRhiaVzQmtE4kOgMAu0DDdE6FGSdjFUQhh+N1hoENwL9plUMyBn2AfhiiT8kPYF2ACrC0CGQl2SZuyAuC5PXgcs04PDYafXXAU6hxQ4FHtANwIYW+g2Y+vuvaZB1wLXff7QkSBYA3RThpIGYGqIL1DfAF+A4XcJAugALtDB/2MQWkH1M6jlkl9tEcRuCjo+0CWRvCtF2gTUG7HEZss8iQSxDyNFhyoDwN0AjGPwN8AVgD4SIaQDGR0IjIdWCVIHMjgOeB/WclIFQ/6BHzISdBMO3hNwGgl+SgIUCKwUoAmgL0QpyKn31gRGTPqTAe1aOdvAyy6wceCIMPkCWGQrrhoiZgB/snVFOwzAQRO2QElJFhUAJClUpwve/I0h8tagobVzH3nnvColsz+7sLEoQDUhDgDbAFOo+mGVFJoR2MYgi0BQas9vlO/qA2tYwrGDT2Bs9AjgAxI8ADgDtV0DPAaAtBJAA2tuEqAGIrxGgCKgdF0EkhPhCMdqAF/IRTDE4uIzW1JCI6nJYFsuKL4edw95QW1h3OSxSEAmIPxQnqPg7UH05qHxXkC7gtdQm6oFbmgBXMxq4BPzoQDk8klBI7UtgzQUwi/fCLwFPKOhMPkPRYAPSXiZECWg+VcEO0f7gQHlgnOWA2o1hFGAc6kIzhJ9RgJGoirQG9ISCR+OhwGqAJxH0B+FRoTcHTjg/kDzAuNSF2YMeeQBG5lBUetgLgbDRaQuqCHaYwH4RlQIbBMBN2IUy8FSAj1HLkEQAniBmDsAE/AcpjyAdoJtyFzKHMdBj1P4ACoCnaP0BfP9zaPhDOP/PIPISvHfwD+abw1jAk/GUYVXYkwKRkNfsFkxuyIFLypiZTXDFCFhiqqzGRtcYQJPTDCEbBlLAJmJTDiL/FmKXxVOwo/2/GG0GD4Et9q8FaRa3i39x/X+zdyc5CMNAEEUhuQnc/46sEFMGWyJy1PX+Fept7R7bfXAXdQWAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQADofPelvQrqqd7+BPRUcX8C2qu5PwGtVd2fgLbq7k9AS5X3J2C/2vsTsFf1/QnYrv7+BGyVsD8B62XsT8BaKfsTsFzO/gQslbQ/Ab9l7U/Ad2n7E/BZ3v4EvJe4PwGvMvcn4Fnq/gQc0zT8W+D2bu5H/LtpPuGdqPWuMwLB8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8C8fMjED8/AvHzIxA/PwLx8yMQPz8CD/buRStRKIDC8NaBRBBFzfttxvP+7zi1Wq2mxgxLC87+v1f4d6VwIPv8TMA+PxOwz88E7PMzAfv8TMA+PxOQukfr/I86xieIyW89gT75n3WKvtz0C/IbT6BfBLxhNAHyn1as5YD875uvFDvyn7ePewJr8n9olClW63lADZOtYkT++vKZYkN+6wmsyH+xfKNYrPYBn3BfKQbk/7xplajlyP816aLVE8jI/2Vp2VNLZaOAKxi3cwLkv57B79ZNgPzXNbjbqUXIf32D5UEtQf7bGP5pxQSyScCNDJt/inxL/tM8HiQg/+11jo09PEj+8yI/QrzNAz4W6xHiGfm/17xRR4jJf4nojhCT/4fsG3F+lPyXiuoIMfkvE9kENuT/eZO6EyB/rEZr/YDNfUBTFF2dR/7Inb9HQH4D70+A/Ca+aQIV+RvrG24TVdOAJnt1gZj8jm72dHlC/pa4rxLye0sXybXzpwFtMi575Pd2tceJkgX52+lhAuT3Ni4T8ntLK/Kby7PP5i/JH4eiS35vw1KX2pI/Knlfl9jxTt/YdErVt+LHP0Kjg2pa8N9cojTOVEfyKyBOtf4M9Hitb8SOyYf9ecY/avse/b1Ndjoj4f1e0cvPLYCv/wbynt5zF2BglOi0WYCFQid1BwEeSp3CFwAbnUz/KwNspDu91ecGgJNfeosrAF4yvbYJsJLrlYTnvtxU+tciwEya6EXCESA/C34BeJvqBZ8AHM30bBtgaK5nnAKz1DnoSZeLgJ5K7gJ4m+gJ73x2ddCjfoCpir8A3gruA3pL9aDHdwBfXa4CedtIWgbYWvIRwNteEofBjaVSN8BYj8eBvK25DORtpmOAsZIvAd6WnAbzVmgYYGyvAGc5A/A2ZQDexgzA25ABmGMA5hiAOQZgjgGYYwDmGIA5BmCOAZjjTKg5jQOcifeDeWMA5hiAOT4DmPvb3h2lNAxEYRT+kzo0JtNqoFpQmyCz/z2KFJFa8d2e863hvCRzZ65fAXAOhcL5IwjOAOAMAM4A4AwAzgDgDADOAOAMAM4A4AwAzgDg4lPRaN4Ohus8DmYrjoSxLVmawHY+Fcu2zdrENSeOBZNtkmyasNa4MYJsdHMs25BPL01MY86mJqT7nJ28Hob0ni9DE88h3x6baOopFgBW+1x48lgYpfT5oXd9GMjzNteGyfEwhvKW363HxQZu3uE1f7gbdtO4b1e6WudSylz3JvJ/dfPDcc2FD2jGIfoz6ZkMAAAAAElFTkSuQmCC",team:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMAcN3YbAMJ8lQsGkdh97kVyyLTsT0Q7ayEfDXD6KSLdeSclIjjiMMAAAu4SURBVHja7NjbasJAFIbRbY0S0npA641Cxc77v2OveyElYCY7nbWe4YPZ/wQAAAAAAAAAAAAAAAAAAAAAANCU7bXvVrxI11+3sSDD/Vh4sdt9iGUYHoVJPJaQwGa1K0xk120iucu+MKHzJVIbToVJnQ6R2GFd+K2pAraO/wpuee+A70IFX5HUe6GKz0hp4wCs5JjzEegLlfSRkR+AavaR0FCoJuMU/Cg818AbYAP+4b8vQSdARefIxwis6Bj5vBWqWUc+AnhOAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASCAxgmgcQJonAAaJ4DGCaBxAmicABongJfpZiaAmcXMBDCOAAQgAAEIIPIRgACWKEYSgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABLBEMZIABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQggCWKkQQgAAH8sEvHNAAAAAiA7J/aDJ5ukAEBBBBAAAEEEEAAAQQQQAABBBBAgEcZCSCAAAIIIIAAAggggAACCCCAAAIIIIAAjzISQAABBBBAAAEEEEAAAQQQQAABBBBAAAEeZSSAAAIIIIAAAggggAACCCCAAAIIIIAAAjzKSAABBBBAAAEEEEAAAQQQQAABBBBAAAEEeJSRAAIIIIAAAggggAACCCCAAAIIIIAAAgjwKCMBBBBAAAEEEEAAAQQQQAABBBBAAAEEEOBRRgIIIIAAAggggAACCCCAAAIIIIAAAgggwKOMBBBAAAEEEEAAAQQQQAABBBBAAAEEEECARxkJIIAAAggggAACCCCAAAIIIIAAAggggACPMhJAAAEEEEAAAQQQQAABBBBAAAEEEEAAAR5lJIAAAggggAACCCCAAAIIIIAAAggggAACPMpIgLJLxzQAAAAIgOyf2gyebpABAQQQQAABBBBAAAEEEEAAAQQQQAABBHiUkQACCCCAAAIIIIAAAggggAACCCCAAAII8CgjAQQQQAABBBBAAAEEEEAAAQQQQAABBBDgUUYClF07y2kgiKEoehVIAGUgE5CkRYC8/e+RNZR/7NfyWULrSl1lVwfQAXQAHUAH0AF0AB1AB9ABdAAdQAcQt+wAxswtgNV8AniSJcYUCeBIPUdZIte7QvbUs5clch0UMlHPJEvkuilkRz07WSLXWiEn6vmSJXJtFPJNPX+yRK6rQh7Uc5Elcj0UcqWeH1kiIP/k9Ew9G1ki10Ihr9SzliUC0lcBOlPPmywxosxHO1DPhywxqsR/c0VBL3JEqrtCPqnIcxtEqmk+uyA4yRGZltv5DALhLkdkuinmQkWegwCGFRiebajoLEeMS58D6kZFnvdAEq22c7oFwq8MMS59eLqgJssnIYzKXwX+k3cvOgnEUBBAx0ddXbMqJkAUMJj5/38UwsMA4rZsdjtTzieIudveO20l4yC2A2Ekyz4JkhwGrz3SEFLlHwTwGZpqGkK67I2TV4ia0w+yCcvC1oCeuVCkUeibaDaCXVNhSCSQolXMg2180g9yGTe80BNUBcNIANIIjE4mAbIMJ8JIohCfmELXDe0gnsYSUHgJYBkMRTSVYqkYCDWeByGPEVlcF8DzgCCiCP2hFI8FOp8OQRZ1w9IGAfuIgxlk8cVLVcKbQMuNICKpFADlTaBlMhQJsidBRI+FWgcDEUljC8BGNA7o+w1ABgsW+wXwiwUhnsLMTP0L4LcPQIrsF+pV8l8AYEEriKJSI7+hz6wXhKE9LLlS0M0gx4LXteGIpRCe154D7HzQCeJoDExVDwQ4p8MxrDBjBzUsWLUCEEGlU6rfBDBcBmJQdUWy0EGg6TIQ7VTOzyq+E+N/PgCtVD4A0mHAQ2OjbiAGNKrYQTWGDaNkGFrI7ADEs2C26WC00GmQSKeBfS8LQQuFkwDS14K47wQxlNclycLHAI6PyGEg4YVb5TwUV0QuBP/S2RrrJ0FMm0E4T+mb+C6eBveNB2MQowm3iroctoQSgCE8vLGbW7sCYFMCcJ5QTM6vANiUAJyj0wHyLAAuJQBnSO2IHAuASwlA754adnRnWQBMegHo22hOXlkPYCc4PCOFno3f+aukJ6JKmQjglFIH2CkJ5jkURK/ClJ29wJdBLgB/y38RgMHFoEVEg3BCqQFgFgQ6VctfHose3bO7SvZxgEICwjgm1gm7gbdwR204pNYG8RsDu20Fsaf4+7sFwQyfEcGe4j++7uMgxawDsaH5+7uvADfuqQy9eG64cqVTwGNhRmHYEvz+c2a/AjToB2JN8/dvrHuAP+zd62KiMBAF4CkWUBTFG6JSLz3v/45bbbu77noBm8AknO8F/EFMJpPJxJWmMfJN2f7/w158ESq+JiJnGmOezJMF4GSg9764iOic7vxZAHRnhOWTgpcAnG0HUUWotjJAjAqPMGTs0QJwkuTQSUyK5jAkd6QjnPsVomLQZItPnS4Du+UdKok50x7OOl8Fcl2ks0ZYjNmUAHeAd0xVngqJKf0UpsROtQNyPAzQlv7xNAD4tIM+YkT4DnMK8ZXGbICYsBwDYAbgsYm+x6XFgOkM5gQONQStb6PuUEB+bpHjA48A3GwaoCv8c/cmsLOBoKrwz+cA8Fuo7D0RPdnfk5XHAaDSjKD8yOYAkzIH3oVU0TJDywAYpTDp4N0RoANbAXledIRRsecbAJ05YXnaNMMJM8Ct75zaGQDDHL/xFoi7m0F5TljghBvAJ4Vq3hiXpyRjXOP5u+AiHp4LyTOGJQybdyABcClScllExfSPbScSAJcmOhJCUluyhWkzr08Ab0lU9BKWuvo5TAs6kgBSmRKUeqJ3GHfwtATwsYGC2yJSy6AH48rOfn+RQfuFwlJDuId5eWcSwNdsWh8BUt10iw/8/kYtYrRLKhvFMC/eSMe1PQKkoskcJ/z+vo2Aeps/fn8Rz0aAVDF5wxm//5lXkaBU0C/xB+O/M2/yAfLQZAUrSn7/3wYl2tLS6g8c+P3/Mg3QErkvmcOOoMP5v2uSHtoh94SvMeyYdfT8R9/psNwxyGBJ5kUbcLOWW7RBbop2sGXcwfoPwz3W7A+AYYCreAHsXwq7LP58ACQrWPPO739LgcbdOPdNYc1aSFH7ALli2MP/eP/jAXXN1qppdvZH2qH7Xwr6rTwxAKJ1CntKHv88NAjQJLnUD2BRj+m/CiYZGnQ5+Mawacv0j76EgPwxOcKqFdM/FYU7NEa+RfsYVu24/dfYQOD+4s/tX1uGMZohZ4sMdsXc/tU0OKAR59+aw7KA1R+1JRmaIJIccRPD/xZFb2jAskhh25Hhn94nZ3M8xCdgW9OP4TyGfw7lhb8w/NNjqaWZ1JPGnWz+IuJmVtC8guGfgyUCxsTev/5wCwOBkx6Xf0OWyh6Z4OGfCa0357HsRcighYaWcjWUC6EbtLRntmnM5P9tahq027Pm7u8BJT267Thw+rdk4sQyMOf0b034oj4plL4KWTTQ0WT+phmTP3UpaNcNVv66ZKjvDfovAaO/RizVvDh16Y1Hv0/S8GrHj5U8+mtQou54aMXNX7NGqsoFY977qcTXw4E5u/5V4eskkPPvX5mPkcCKf/9aPNsOMPi3xt5TDtz7+2QYoDUBb/0oEO3Qkh3LPnXYZGhBxoM/NcKXGA2LX3nwp0myQqPeuPfT5n4wyODPf9E6RSNSFv0qNZ2jAXP2e9XL/jrQ4+yvmuV1IN5z9tcuecMFxv6dY6vtZ8Zm/44IRyWMO4w4+7sjKlIYlRbM+7tlugJY9NFp5kKBjBc+nBSOSi7+3WYgFEjXXPxd9tOswJGLv+sGYzxtzJoPHwxneMqMaX9PhKMDagsY+3kk2ueoJX9h7OeXZRGjsnjNcn//THYpKokLXvX206SI+fm7bbnOcVfOyd9z0b7ETQeGfh0QjQJc1ePGryPCfob/bPv8/B2yWOHCiuVeXTMtZvgyK1jq30nLRf/1tb9g3P+rPTgkAAAAABD0/7U3DAAAAAAAAAAAAAAAAAAAAAAAALATZ09HWAi+hXYAAAAASUVORK5CYII=",competition:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACjCAYAAABotuf8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALiQAAC4kBN8nLrQAAEnpJREFUeJztXQmQXFUVpaBCzCIIghAooCBRIZDp7r93/+5Ze++GYrNEooALUux7sYmAqIAUQgWpArRKBBHKsMgiawhhEWIpi4AssoY9rAGUBEgGz+2ewDDTPfPf//3+7f79TtUtqMnMe/+de9599/3/lnXWUVBQUFBQUFBQUFBQUFBghe7k5unJ/FlWurzMSBVXGcnCMOxTZQ1tGBx9DK6W4/8vBG+D3P5rSxipQtl0S4/Ymepqp3fnT5V5N+IMAnuWOITApnH7sm3Qo/dtBWJWcDuo04041JxchdufgaHZ2el6srCfZudOQbS5xM5UrvFjIORlbqdExcDna4hg1/r0w58S1tBpdZ9mNwxdUAkrux7G953NVGkhGvGula6sxn/ZSVUW3ODLYfIpAsWt8PE+8PX6oQmLwi0e4G1uEpTJNQjsE93JHxWWqBIImyu5G60sNHF9DJ+XpIoK4+80zDx+xd1YZeEahsSb4+bgTGnCQpI+23LLz3E3VFm4RjkXhsSYNGHpyXwKSd0n3A1VFrawKmswU5T3GgMhcX/uRirjMfj+TGnCQo51DHcDlfEYfL9AmrB6jP4TuRuojMfg+wulCQuqPYO7gcp4LGFlr5YmLCtduZG7gcp4DL5/UZqwTLd8G3cDlfEYfL9cmrAwM1js56HsTHUVbGUzc3qra7iJi5CtmYTvVfQ7ouXC929LE5aZKi0SfqBkYdhKlx0ovqnpyfxF6iN2cCMOzVRx4UR8079BJA+Ilg3fvyVNWJZbul30gdAQsm0mFa1buoPbMZ1uxCE66XYT+hC+QL70kI+y32idksY/1K1+Gqw7hZ7JyrYzlQ00J38BGv0yhsaxPRHhu6o+fPfWhrIPxv4cnC3Xk8U/O+BwMp7JFyjjcdG64fvXWqOiBoBqr/BDSI/eZ3gpn9b+xIyBr2P4/IFmZ09O2NlTIbZjEbrzqPsqfsfyGni5xEgVMnqycEyNGzt3On52UMIeioG7GV44Jl+gEz8lWjeGwgeDqWcCwOm+XpBuPy+ZClp33Bz8KbdjuS1uDZ0UlEfyBaLPM6J1w/cXBa27KdBLjvJDiOZkvxO07rg51PVv/RGhjgvKI/kCEest0brh+3OD1t0U9BHaz+wNofskO11eN0jdGBqP43Yst+lIC4L6sOaLTEV4hQp8f3LQupsC+Y6vZTO00QKkfCVI3bqTO5bbsdwGDo8J6kPyhSMYHGrLZpx8NWjdTQHV7oQZyLs+1H7HvERm0lcOEwGh+Hhux3JbK4ZC8oVovfRiFX/nBK27KZDAbQHF3yv6YJZbfgeKTwepO4HEldux3Ibk/cQgHMIHU034QlxYlWWYPE34fiwQMK3dGMK6xofikWflfxikbkyzz+d2LLchYp0RhMMevc/ykyNjlHoCHXuzIHVPCs3J+UqijWTht0HqxRT5L9yO5TY4+NogHEIcZ/kStJO7Pki9nhA3B4Z8kvIIprqb+q0XY/wtXutCr/yQti1xC6HVZqaKN/nlj7hHSvIvP/XC5/v7rdczoPqvYTgUPrgD4/R7mNlpfupEtJuOOpd6dgB+F9PqF7iF0GpD57rLSOan++EQUUcjH4jWiYCwBj7f1k+dwkAS6Gv5DIT1Bz/17Rh3t0QDn/ZcT7JwPm0R5xZCq40+xczTej19Hhvns2T+ND91mqnSY37q8wXKszDUDAs/pFt6GxOArUXrw2xoLkhd7l1Y+aPxjGdyC0GCsF7X7OzuovwR5+D+bj91IkpeJlqfb6Bxup2uvO/nQeH0wy23NEWkPtrPCFI/8loHkZ+wsidwC6H1wqrSYXTCZykQ5/hbX/4Cl/Lzq7VAMjfDdMv3+3lQzO5eQUMzIvXRpwyv02T6vbg5OBs9zdd3zba22kK+klA6QUdNEed+6oOPP4Kv5b5mGAv0nAX+CKoOm27xAiNV8Hw8DoY1z8t1MPNZiQR3Csg8jF0IEgxD2j2efQSO0YnnE+d+6kKuers/dQQAKt0dCfUqPw9Mh4Ohwdt7rQvR53XPwkqXX6C/QR2HcItAhqF973j3UX57/P6D/nxU/QQ+/p4PaQQDpqD0Fv7SAD3vaTR80jAbM/rn0GFgAuXWXiKCmAO5RSDDaNKUMAcnnRliBr4ZuLghgIAfJB+3QitCQERYF7nPbqJfykcbItE5k9WDxu0hQPpqlHk6/Z1m58rIR9iFIMOQN034zdDJVKZAVOc2WsbszWqf4I4hH7dKL0KIG5TElzy/BhgnhHRlZcwc6G1WPs0ekSf8TEBYKyD279PfxoyBPtohxC0CGYY2TviJJWFnDXDheRY91uDT1zEBCv8M0tFAYn0UlO2zZ9TyrQ8ggEMblR23BrdFI+/yWhZ9LAUhtXOcSLAQZSSP9sYwRS9Kt2jEmZ4szgcPrwUpX3PyR8rUjCfUX76VPTu/iSDeQqI4f2zZCMcuSPR81ilEuBhDYe2TBwQGYRUjKSx0xvfRoe3xfBVIVE8EFO2biHjCL7GlwHSL+wU9+B+EfBAzBg/E8Dd1bbkg6jCRHM5MFT87EQX51T4ok10EsgzcHLy2rcQZOtKuxGEwwVbXoDPyR6u1wMPQDPHi4IRV10CkV6G8OVQuyrxO5O/xd4evfSaI7Ehu58s0DPOXUzvj5sBMiGxBK1ZzQJhLyZdcOmoIPNA3EaKFly036DXD1ECIam/890nvpJQ/pP2Ha5+H9iNyO1+m0ZBnuWVE5fLN4P2/gXlPV+hs9305NdQURqr085FDJwITNzK0iry/uhfJ/mfLZzE0RH0pM7hp3b1D5Dt0zPa8hwcheSYe7iIOolHveWsTdwJ68u/bwPkdYXSKkO7k5R233Qogt+nhOEeL7n8Z/RxqKbM3oyEV+ZrJJBcxYBja1PK5rMYnObR8dqvRz4BeGLmFfhJ4e19P5nfh0okvIILsgajxfBgEIb/6wjGGCSvbg4RW+ESVbjL45iPyEbgL7xKmVgHj9gB6xZsyCaJZJKLTJaPr3THu9ocl6k602gtpJ19mkkVw4OHXQ68oIXq0ZKbYRFgfjv0khDoPws8DT8GjaOQLdMTDyDdcumgZ0JDdEEH+I6f3lR9O2ENzRtenOflf0HkD3E5sN6OcinwB67zhrxlGFvTf6WcTxkQ2dhgkYFZ6PbcT28nqL51LS/1sZOkIJOzBjSGEK2l1YqsIM5L5cR+v0TOFDxaLsoHzKzQ7O6eRTyIDDFHTMFTNR/R6Nbiwatuhdhhdvu7kpiNiRW4XtB9DmvA68s3TiXMuf4cOJNybGqnCwiAfT9ETb7PT5amjy+3R+9LcDuW2+krawkJ0ukkPFY4kNCc3E7YLSBBO7GmbF4gb99EU0fBgbsdyGi3yQ4c7WrNz7f2JJgwg6myAsP2iCIEYSl8ZW07cGtzIdIu+N3h0uhGHGAkCHyQcGcTNQcsW2IlD67YstzTuWKSENdQDwXVt4o5capiOMufwYdtBs4doQ8ZNgj3zyYSdHffh1Ki/GO3q91fgZpHmZMPdvdyOSNQP/HhDhDzkEH9sVJaZKl7G7Vhuo8NT0On2DNuPbQeI5HdixFVXNzrBV0/mDSSuwjcuRNEQte7g8GXbgN4E05JiEdJMt/wohDVrbFkQ6An03ZDbqe1gdDKP1i47bThgpArCB3doTu74RmXR1i9uh7aT6U7uR2H7s20AMfxNhCz8/rJG5dBOFUQ+9bZ9lCGC300bfsP2KTswg6uKfDOkg94QrY4eW07M6F8PQ+MB3I5sNyNu0RGP4PAtGzAEzrDSYhdfgqT75unjt5WjV85C71SrGRqJK11Zgk7n+6TqjoOeLGTqd0F77n1rmr34M1PFvZGsRnIrfQuE9W7CGuyOXEuzh6ZAJOeJEISItERP5jcZWxYi2Pr4N+GbMrrJEOkfwAxR6MzXjkTCHtKQaHs+uIKuQNOcbMP12RgG59K1tdzOa2erHdQGzsP2c+igE/e8nolJCaiRLJ7XqBwnU5mGIfVObsd1gtH9R8i1Ng/b16EBSftckdsRLLd8HwgZd1apVt+ksVvQE266xcD5CojrWxw+DwXIrQRu8Kp+2uxIHfx8W9MtL+F2WCcZnRcbtr9DQT0fKnvOh5A7rUbS2fA8eAh0P7ULR8woF01YQzs04rOjgSFNaElLfaNE4fhGt1jg599AD/R8G5iy+isbzcmdyuB6uTBT4is7EeH+DTL0RuUhApq0TZzbYZ1kyHEfDdvv0uFHWCPiWtaj9321UZkg6tv+j5zuPkNu+kjYfpcODIU/9rcjp3Y2w5X4+y3HlonZ4fT6eVzdvWrUk4F73cmdxOF7qcDQtYXp84bPkUNXz9YaHA6Gn8+DCV+A3m2G5P0xJO8Nj/DueCDh3qj+mkA8wpC4MJzejzLGrXWfp/V+GT9/jNt57WrEuZkqRXuPIaJLDA290RE4X/Rzqw7b6cqDKGOXmNH/hYMtUOaudqaixPVFG0aO+lyN81Sp80+XmQwY0rZGYx/ySxidzozZ4qWa/cXdKCjTQEKvVpKOGKL4I+Da4vIzC+Lm4MZ+r5Nda+iN7xnJwkUoa08kppuOlDuT8glup3IbcYvOF+f2MwsQXWIj9+n5PtqIci8Mj8tB5N9R3i2IWjchokk9RbDNjc7Jf4a41exc9Ie/ZoCwtqHe5fVqXmXNjTgEn0thDV8qdyWQCyygD8/czulkIw57jP7uWYrsBQlraBNErgsRxgNfm9JtNrIs5krikNuPbYkeva92GK7pltVnGs+iqn5ipkqHgrupkzPc5YiZA3Mhrsf93r7eHUbnipZfSljZLF3Vy+2zjgEiVwLEXauO1W4oqo+IG93JN732WGEC6Mn8hkaysBfyB89bxaJutFTISBWOIG64/dPxMN3iTiB0cZeffUVD32LDLQ5y+yNSQOSaqtnZXTADeq7bBIY2v4YZ3wHEAbcfIgsMAdvQwWvdsPt55J6guxvtVFKQANrZGzcHdSOZvwzDQ+ReTdB5rMijbsDseKgrdjG3IxDBXCtdWuS04LJtdkMb6JMM2pTl5lVhnfrpNWaqOB85yKJO3BZGQ56eLPyj1oZUYSNuPhXGAI6Zgt4eR15yvuWWl7X1h+36B+MV9KwGfW3As3Pzp+ABCWvwS/P0XldzcjfTKsp2iGQ0m7XSlZc0J38z8qfv0jNy86TgE3FzYErM6N8GM6u9gtzb0wJRfYzo9JMeo38OPRM3LwotBGZbK/iEVXnXdEsONwcKEgDnBr7KLoCwXoWw1AK8KAIJ8m1cwjJTpdswDG7FzYGCBCBinMd1phbyq19j9jeDmwMFCdCT+V4I61kGYQ33GH0x7vYrSIKdLk9B1Do1zNkh1UVHLtlqMV60UTtDIu3vDAk/ZqXLj9GRS9ztVggBiCCz4PCHnV65kYvqQF1qlWc3QbOzW5hu8RQZyTyVabml6xKoA0PgutxtVQgZmKk5EMEqCcJaaaaK3XWPjcLnwFBlYziUcMdh9UOUfRh3+xSYQMISudNHJGKh7MO526fABLM+FEoRlhoKuxi6k3eRXLd8ZkhlouxjudunwAQ4v2inW79Oi8pE2b/kbp8CE0y3dEjrE/e6Ice6irt9CkxI2NnjZQnLSBZu4W6fAhOMlMilUWKGaBi9WyAUvMFyy9fJEhbyrPe426fAALqEG1FlqcQca01XXfStUEfM6E8hqjwjS1hkVAd3OxVChpEsHij77C2qg7udCiFDTxZ+QzuQZQqL6oibg2o5cjfBTJXukSkqMqojZg5sx91WhRCBxF3CqoYxwkIdmp1zuduqEBLi5sB+skU1ajg8lbu9CiFAd/JT4OyrwxIWotZfUafKs6KOhJ2dbWcqL4YlLKoLdea5260gGUaysGeYZ5iO3A67gLvdCh5hpArT49bQ5pjOz/JqCWtoFoR1cViiGjUcPkp1izwrGdr4FW6euwa6k9sIOdK5iAL3IRo8KWhPwf4XtrBqN8PW6xZ6XgjyAbT1crR5NjfvkQXtJAbRVcstvxC+MHjNSpffQNsPVLupJUBzci4Ifp7byVw2cl2xeifWakBUoedG7WbEAbcfIgU6zAM51RJux3IbcQAupnH7IzIwksXNnEz1cW7Hshs4ABc93P6IDIxkQQnrM2EVlLBaBSUsJSwpUMJSwpICJSwlLClQwlLCkgIlLCUsKVDCUsKSAiUsJSwpUMJSwpICJSwlLCmoCatXCYs4UMJqIZxMZWoY+wDb3WocZCobcPsjUkBPPRs9lt25nEYccPshctCcbMZ0S69wO5fLrHTlfeKA2w+RRMwY6LPS5Te5ncwgqvfQ9n25+Y80NCcXN1KFc3Qnf0/CHvpnlI3aSG2lNnPzrqCgoKCgoKCg0D74PybY2tE87U6rAAAAAElFTkSuQmCC",bin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVR4nOWUvQ3CMBCFX5MGloAJwgQwAUwAYoAwATSUMAGZACYgA/CzQSaAjgGgQTIyegU6WfbZioQET3Lxonf+4uR8wL9oCcCItUrZyDS0vgewqhnK306nnDW2NqiK4WEEYMSavSZcMlx8PJNHl35Gv9EAFo4uMQHAmn6uAUwY3kYAdvRjDWDA8CkCcKbvawBdhi8RgCt9RwPIADy5MgXAlQ9KvpHxAFwnDkp+U+MBuP5ZULIrjAfg6rqgZF8bD8B1b4IqWFTSHx2Ag+fmNzpbqoTZhV7EdKwTpi/aAB4R8/8OoIVITQHcFJvbjO2kH9UL+0+m+SiE/A0AAAAASUVORK5CYII=",checkMark:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAE10lEQVR4nO2ZXVBUdRjGdzS78BLqSmqyIKducjKZuvKqNMMpMgQW17IENEIFEWhVViYEJlm+dmG/JAFFZFcQ+QqlRKAQiNUWli/5EJYFgd0FUWI/gJ7mv+ZkAp497GG3Znhmzv3vec/7f//veQ6LtaIVrchuySFfLbY0vpc528DNtDQUCi31bemm+vE0Y50lZbrWkmysGedP31AnTVUXJk1d5yZOVr/LA28Vy9n6AU0vSeaaEiUzTVrRbCMyZxogtNyEwFyPdNMvSDXWIcVYi+TpGiT9cQOnp6rx/cPrSHz4E+Inrw3GTV5N4Okr3BwOnoVbL8rmlBLJbJNZMtsEuvAJD6pwavIa4u5fxXfjleaTExUi3oOSFxwCL8MttnROaZDO/Qa74ScqETvxI06OV4CnL9MfHyv1WzZwCZrXnIFSJvtTCcbhDWU4oS/FcV0JuKNXxEGQrGEafu0ZKCuWG/7Y2BV8O1aMqJGict5QyVomK+8w+OjRy8QAjg4rqnhq+fN2G3BE2xx7Gv7eJUQMKxA+JBfZCX87wGnww3KEDRXgkDbfd0nwOWh0lc0pdc6EP6y9iNDBC4bwoTz6I5bMeWfDHxzMR6gmDyH95zNowUuhcmPkkmIA/puB8/h6INcc1Jvzss0GrOuBg+CPaC/CuywWIT25i8Cfw4H+XAT3ZSfYBM8DVolnmgYdAR+uLcDGU/5wYb+D9Yc+QHB71oLw++/mILD3rNYH8tWUBshW6ajKvxXnB9fdm60GXPw3wT1s24LwQX3ZxAC+6pV5UhqwrsSOgud4zjOwOHwW9vbKoikNZFhuFi1728SzH8Fz/jHwysH3sU8tXRT+y54z+KJbpqA0ILDUq22BjxkpAefn04jVly+t8k8YeDVsKwLbnw2/t1uGPXekLdQGTL8aKOGHi7EheocV4O14NmJ0pfQr//ezPmwrZeUJ/Od3pNjTJdFRGkg31pmp2uZN7if/gtgUH4ATo8X0Ks/xxGsRHyKwXWYrPHZ3ik2UBlKna81UPf/GUwYevwnuSNGywXO6xAjoEFEbSDHWGKgOLHewEBuivOZBbYzzQ+TwJRvaZhv2tUnpwXeKwG4XUreQNT2wYdpEaRR4fQETpNoRWgXz8B0Z8GsTUh/ipKnqIltHZUR/ATwiFzbBWNt0PoL3bxdiV5uAeoyS3IbOnD9y9wI8Ij+aB8tk5f3bhfBtE8BHnRZFaYCETnQvqcN9ec80wQT8LnU6vFtTN1MaIIlZwmSVhu4NG9qTC/fI7csGv7M1bcDmNI8kZkvZ50O6s+F+dDvj8J+p07CzNTXeJnjrW9BXuJHEbCkfI/s7z8Ijeof1sefA+j4J35Ji8rnNX8eiIxL32f8lxUjl4a1KFtCCt76F+5UuMfoynbPhP1Xx9V7NSUvLTUlW6VT4lmR4t/B9WPaIZJXOgv/4d76QZa/Id2jUaNFlh8Or+GVbqnnPsZgQCVoj7inKHQhf6tUsYSbcfSwSeZOs0hFts4Wpyi8kklWGavJ1jI/KFv6Y3QfWVoVoc1xJ3Hdg4JyJiUvKW5Us8FHzXViOVrAmex1JzAL7sjW0dxt1moasB7Rv2OUQWbJI6ERyGxJ9kPSA0yU2cLpE5oDOTDO7Q2jwbxOoyD5PVmKyVf4nfrOuaEWs/7/+Atqs1blaLwVcAAAAAElFTkSuQmCC",upload:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC+ElEQVR4nO2aO2gUURSGP8T1AaImIGjUIkIMooj4KgRBbFJZiYVY2agIVj5WsDC9VklIsLNQwS2yhZVmN4KotYVPWERFLBbER1Y0aBy5cAaGZXZm7nhn92bmfnBg2T1n98x/z5z7mAWHw+FwOBwOh8MheDm3WLycmxMgDi/n5gSIw8u5OQHi8BLaPHAJGBAry3uFqYBySGy5SAJsCIldXyQBBkJiNxb9FricUdK3gDu2CTAvImTdBN8Ca4C1wAebBPC6YL+BA4HcDgJ/iiTA1ZD8rhdFgMfA0pD8lgPP8i7AV2AwIsftwM88C3AiQZ7n8yTAJ6ACnAK2JEkSWALU8yDAbdKjFl6fF7MAH4F+/o+jNgrQBI4BR6S8w3wWgMOY4Z1NAlSAdYHv6wNuhPhdwxw3bRCgKaMexqE23+fACoMCnOy1AJW2UW/nYcD3F7ATswz2SoBmxKh3Gn01f2fBMmAlsAnYD5wD7gKtrASoxIx62OjXZf7uJquBM7KrNCbAC40ERiXmC7AZcwzLFrwGvJKRbsnrmnymfHxUz7liSoBRzWSV/3HMsA+Y1ahUVXV7dX7AS2BqM9JtSsAk8DdFk1YxE/IdsXgGy98U/W29JK3NyrokEi/FIUWWlDRLPs4eyYzREdvKf9Lgxfs2HvWDXo/tvZz6+A0vyT0/F8i/lbAn7LFVgNOBXJKWfiMQ00gYM2OjAD+AVZLHNs3zQ58nGnHDtgmglq5pnjNOB+KmNeIu2ibA2UAeNY24qUDclEbcA9sEUJsYnzcdfFpyn6tSr8osMRKIG5H3quLTiGiMr20TQD1d9pnr4JOWuNnDCgGChyTfuyDAt6SO3TJ//u/pLWALM11ogvexmLTTYFUj7gIWM6RxIarUfZ5qxG3Fcuq9WArbxC55gBJ3MarJGdsM2cZEBrPNGIuIUsqnwKkPRGykz9CpUD3JkZjNlTCe8lB0Qco+7C83i44dwD2Ni1fdfjc5ZEj282pLqx6GqI2NspeywlOfKZ9I/gGPNfEFBL9FwQAAAABJRU5ErkJggg==",upArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAz0lEQVR4nO3YywrCMBBG4fOE1oWDC/vsCiq+RAuVQLpzvDVtJvAfCJSki/nIqgWllFJKKaUqtwfuwDU/N5kBAzDlNQI9jSOmFjHmIJrCHF8gBmcvvdvMTYzACTg4Z31LiLnwGPsCER5jPyDCYuwPRDiMLUCEwVgBRHWMFURUw9gKiM0xtiJiM4xtgFgdYxsi5opjaiCKY2oiimEiIBZjuoDfDkdnpjSr2y0Y4h0m/dBwewREeJg0q1uXpedPV1epDrjkGXe1h1FKKaWUUrTVE5bz7NyN3sYLAAAAAElFTkSuQmCC",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,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAACfRJREFUeJztnXuIXNUdx913shutjfVBqtGFupuZ3Xnd9zz3Ne/dYKEo/isSEGqFSlslSFBi2kStSqkiCEGl1D/ECP4hKLYmTUziZjfRjUl8FzU0pbJLtIlJ1t2N37PZQHBM9t67d845d+b3hS8z9+59nfP73N/5nZnZmcsuI5FIJJJE0pOlpqg+2NwbTbUEQlZLd4/ecnNAbT3vrqDWuqbXbA1GEq0RbaBFSxSbRF8zySOF1b5G1cqtDCl93Xhcq1r530X1gYeMVHlUTxSPYnkqZgydBCDTCP4cfJY9YnkG608pVu44gDiGbXdFtP6N2P4+xcwWw2p/AH/vwHYEi+xC8BoQrOUI1q3wk1jeA39ppIZPm+nhOSuz9uxSjePMmjgeYPlIjeffCGt9vwcoAZyvRXT7SQvCUHAFAjIIGNYjUP/A8gkzPbLk4DsxzjmtJQrjgGNzVBtI4FpaRfdL3QkdvwypPaPFC5uMZGkcmQAgDHMF4cezyMickSxPApLtuL518C8AS6Po/qppYShYjbtwHdL2q3qyfEo0BIsMM3OoXY4iez0AeDvNVLlBdP/VjHC3tQGComLmtgGE06KD7caA42u0YyOK3JVL7hAccAW8DR5d8L6LeAze6kEMpBIq/lvUeGEn7rrvRAd26ZljZE5PFg+j7uhH1nA/pOBgP4E/sXni3R7GQ5gwdbwaIGzAuPwpagVPZgwyGVnjjBYvbsEweLmrDqonKBQru0q18vdjDJ4UHbhqm9UbGBJfQpHc5bijcIArah0KFI8rAMPdyAzHWIoVHTCOnsFM5UHHHVbLUKDwuhLTtQ1Ip/+TIEAiPAsoNjruOIdQ7KlC7DwXIOjQ4vlfYZjYgTQ6I0FwfAnFx7UCRdQY7EIR+SJgmJYgKKJd31AoZu46DTAgSxAMHkBxuZ+hAAjNmHr9AUPFvyUIgmyuLygw1boKReSv8fhxnc0onELxsOPO9RsUmHtfjaxwJ4aJccBwRoKOl9lcoNhbhTjbEoaIFTEzu05Plj63MpQZ6hYKI1VqiZlD3agb/gYYpmiYkBiKrqDeGlIyN1jpYc8/6ME+PBLVB8PICvdgmHgbU8uTEnSuX+0aihVOoQAQIRR5n8HPhrW+jGrl25YCgmJmGwFCGhlhA471MrLCccoKnkGxiQsUCGAMQZv/AAoeZ1D8/Ze9RqBYubvwPN8TSXZim9W406/HRf0cvhLPVyELrAZQnRGtP6InSndgm3uxfif2+8pIDc9K0Im1ZjFQ/MBz7GVlzAxO4vFrKz0yhXWTWP4cy5PY5zj7WBt7a5dtK0Gn1bqXBMVHNk/yDtsHd3z0IlCQ5TJBQfYOig6CombNEQozGwEU30rQaPLiUPyRCxSYQoYJCl+YCxSj56DIERT+MEcorFyIoPCF+UGhnoOCXn6W366haHcORb6XoPCFZ40ULyjiBIVPzBOKAkHhD7N/QP6TWyg+tHmSfWwfLVHoISh8YZ5QFINWeuSEBI0mywKFTlD4xa6hWO4YimQpYGUICh+YoCCLgWLsHBRlQLGWoJDfDIrNvKBYg+f/l6DRZFmgMAgKv5gjFKlyN0HhCwOKYVdQLHMKhZkaJij8YY5QpEe68PwbCRpNXhyKLW6h+MDmScYXMsWNOFnNf5lYDZgfFOynCmJm1m52IdcDFDcHVPZFIXb3IfsQijbnUGiAIntEgkaTZYGiKwgoTILCB2ZQPFJtKPZfAMVhCRpNlgiKJoWg8IN5QqE3IVMckqDRZFmg6O4hKHxi11C0uoECw8f7EjSaLA8UBqDIERTym0HxaLWhOHABFAclaDS5ilDYfc2BoPCXOULROw/FhASNJlcJihanUKzpNQkKf5g7FO9J0Gjy4lA8xguKRoLCF+YCxbvzUISsRsXKvStBo8kEBVlaKAKAQrVyByRoNLlKUDQ7hyIOKPIEhfzmCEV4Hor9EjSavDgUfyYoyJ5BYfcDM++xfYLhBINiXIJGkwkKMi8omhxDEQEU8fyYBI0mywJFTyRJUPjDXKFo0OKFfRI0mrw4FI9XG4qJeSiiBIVfzBuKUdENJksFRapBJSh8YbdQNDqFovccFO+IbjBZJihiKTZ8EBQ+MEco0gyKvaIbLKPN9MhZLVE4ZaTKX+nJ0ljUGHpBtfLPaoni01j+q5Es/0WHsfwUsu0zMTO7VbVyryF4x7DuhNe/3IzjPuEWCrv/7XWQ7RMiKM4DwKZ8JxHcCS1ReiOiDdyvxvO3OQ7Cgsz0MIbl/K1hrf8+gPU6IPoC677zBxRKpgFU7xEdFEEgnEWwvgEIb8aM7DoEsFNPFJrdgnAp4cb7Kc5T1uL5vyPzTFkZ51mENxS7RQeIlwHBDIJzULFyW5ANBsJqX4PnBCwiPVFcFlb7h5BJngcgtr+Z0C0UDQRFpdnQABjYOP9yVB8soc3XeB5pF0L2aAYYA7i25wDHot9QyBGKvpqFYr5QjBcOozjcHDUGA4qZ5Z4V7ArXVgQcE+yaLwHFk44P7BCK98/vByjeFh1Aj2GYBQzjipn7ZUTrlxaEHxMyx1Zc/4wMUOwSHUgvjDttFiBsQ7V/i5EstnsaLU7SE6V2tOMx+LRQKHSfQ4Gp3oyRLO/AMJEVUThWQ6h9CgDjuDgoksWdogPrEoZpdNx+DBVr0YZGT6MigZDBkyhA/4Ppq3somNxBUfIdFADhQxRntxvJUodnUZBQMTO7CnXGAQYGbyj+JTrI9jLD/ItNX6jxwnpkiZWe9bzkwrD4M7T7Jdj5ex9MLNg2O/nQ+X38AAXS6CSKyMdjxuBNyBI1UTc4EWJ0LWo/xdXOLqHYITrol4BhFrOJ15BCcyi+6g4GT1QrUACGM0ibb0b1gSxqh5orIrnKHRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},dL=({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})]})]})},hm=Ue(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),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.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 S;return(S=e.related)==null?void 0:S.some(I=>I.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(hm,{}),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})]})},hL=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(hm,{}),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})]})},pm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),gm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),pL=e=>{const t=(n,r)=>{if(r==="games"){const i=gm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=pm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(fL,{label:e.labels.games,related:pm(e.related),onChange:n=>t(n,"games")}),u.jsx(hL,{label:e.labels.templates,related:gm(e.related),onChange:n=>t(n,"templates")})]})},gL=(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"})}),mL=["PENDING","LIVE","SETTLED"],vL=["OPEN"],bL=["ACTIVE","INACTIVE","EXPIRED"],yL=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"),mm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(bL):e.entityType==="TEMPLATE"?t=Array.from(mL):t=Array.from(vL),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(b.Option,{value:n,children:yL.get(n)},`${e.entityType}-${n}-status`))})};class xL{constructor(){ee(this,"name","");ee(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});ee(this,"trigger",{trigger_type:"DATETIME",date:""})}}const CL=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"),wL=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(CL,{}),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})]})]})})})},IL=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),[S,I]=C.useState("success"),[x,w]=C.useState(""),[y,A]=C.useState(!1),E=C.useRef(!1),_=gL(e.entityId,E.current),{https:D}=ft();if(!_)return u.jsx(ds,{my:10});const G=()=>A(!y),F=(B,W)=>{v(!0),I(B),w(W)},T=(B,W)=>{i(W.scheduled_task_config.change.status),l(W.trigger.date),n(B)},j=()=>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,W)=>k(this,null,function*(){m(!0);const Q=$("UPDATE",W);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("")}),z=()=>{E.current=!E.current},$=(B,W)=>{const Q=new xL,te=B==="CREATE"?o:r,R=B==="CREATE"?null:W,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=te,Q.trigger.date=M,Q.name=R,Q};return u.jsxs(u.Fragment,{children:[_.map((B,W)=>u.jsx(b.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(b.CardContent,{children:t===W?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,te)=>i(te),sx:{minHeight:"36px"},children:u.jsx(mm,{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(W,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(wL,{labels:e.labels,isOpen:y,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:z,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,W)=>a(W),sx:{minHeight:"37px"},children:u.jsx(mm,{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:j,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:S,hideToast:()=>v(!1)})]})};function SL(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 AL=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],TL=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,SL,{});return r&&i&&(c.root+=` ${i}`),c},EL=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]})]}),kL=be(EL,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),_L=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})}),vm=V.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,AL),S=V.useContext(_p),I=V.useContext(Pp),x=t.variant||S.variant||d,w=t.size||S.size||p,y=t.color||S.color||l,A=(r=t.loading||t.disabled)!=null?r:S.disabled||f||c,E=V.useRef(null),_=sn(E,n),{focusVisible:D,setFocusVisible:G,getRootProps:F}=zl(O({},i,{disabled:A,rootRef:_})),T=h!=null?h:u.jsx(Ep,{color:y,thickness:{sm:2,md:3,lg:4}[w]||3});V.useImperativeHandle(a,()=>({focusVisible:()=>{var M;G(!0),(M=E.current)==null||M.focus()}}),[G]);const j=O({},i,{component:s,color:y,disabled:A,variant:x,loading:f,size:w,focusVisible:D,instanceSize:t.size}),Y=TL(j),z=M=>{var U;let H=i.onClick;if(typeof g.root=="function"?H=g.root(j).onClick:g.root&&(H=g.root.onClick),(U=H)==null||U(M),I){var ne;(ne=I.onClick)==null||ne.call(I,M,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(j)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),I!=null&&I.value&&(Array.isArray(I.value)?$=I.value.indexOf(i.value)!==-1:$=I.value===i.value);const B=O({},v,{component:s,slots:m,slotProps:g}),[W,Q]=Ie("root",{ref:n,className:Y.root,elementType:kL,getSlotProps:F,externalForwardedProps:B,ownerState:j,additionalProps:{onClick:z,"aria-pressed":$}}),[te,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:_L,externalForwardedProps:B,ownerState:j});return u.jsx(W,O({},Q,{children:f?u.jsx(te,O({},R,{children:T})):o}))});vm.muiName="IconButton";const bm=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"),PL=({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(vm,{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(bm,{})}),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 DL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ym=DL,OL=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,RL=OL,LL=RL,ML=typeof self=="object"&&self&&self.Object===Object&&self,BL=LL||ML||Function("return this")(),xm=BL,$L=xm,NL=function(){return $L.Date.now()},FL=NL,zL=/\s/;function jL(e){for(var t=e.length;t--&&zL.test(e.charAt(t)););return t}var UL=jL,VL=UL,HL=/^\s+/;function WL(e){return e&&e.slice(0,VL(e)+1).replace(HL,"")}var GL=WL,YL=xm,KL=YL.Symbol,pu=KL,Cm=pu,wm=Object.prototype,QL=wm.hasOwnProperty,qL=wm.toString,co=Cm?Cm.toStringTag:void 0;function JL(e){var t=QL.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 XL=JL,ZL=Object.prototype,eM=ZL.toString;function tM(e){return eM.call(e)}var nM=tM,Im=pu,rM=XL,iM=nM,oM="[object Null]",aM="[object Undefined]",Sm=Im?Im.toStringTag:void 0;function sM(e){return e==null?e===void 0?aM:oM:Sm&&Sm in Object(e)?rM(e):iM(e)}var lM=sM;function cM(e){return e!=null&&typeof e=="object"}var uM=cM,dM=lM,fM=uM,hM="[object Symbol]";function pM(e){return typeof e=="symbol"||fM(e)&&dM(e)==hM}var Am=pM,gM=GL,Tm=ym,mM=Am,Em=NaN,vM=/^[-+]0x[0-9a-f]+$/i,bM=/^0b[01]+$/i,yM=/^0o[0-7]+$/i,xM=parseInt;function CM(e){if(typeof e=="number")return e;if(mM(e))return Em;if(Tm(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tm(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=gM(e);var n=bM.test(e);return n||yM.test(e)?xM(e.slice(2),n?2:8):vM.test(e)?Em:+e}var wM=CM,IM=ym,gu=FL,km=wM,SM="Expected a function",AM=Math.max,TM=Math.min;function EM(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(SM);t=km(t)||0,IM(n)&&(d=!!n.leading,f="maxWait"in n,o=f?AM(km(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(S,t),d?p(A):a}function g(A){var E=A-l,_=A-c,D=t-E;return f?TM(D,o-_):D}function v(A){var E=A-l,_=A-c;return l===void 0||E>=t||E<0||f&&_>=o}function S(){var A=gu();if(v(A))return I(A);s=setTimeout(S,g(A))}function I(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:I(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(S,t),p(l)}return s===void 0&&(s=setTimeout(S,t)),a}return y.cancel=x,y.flush=w,y}var kM=EM;const Sr=fn(kM),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})`})]}),_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,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),S=(y,A)=>{a(A),i(A[0]?[A[0].id]:[])},I=3;C.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(y=>{a(_m(y))}).catch(y=>{console.error(y),v(),a([])})},[]);const x=C.useMemo(()=>Sr(y=>{d(!0),g.football.getCompetitions({name:y}).then(A=>{l([..._m(A)]),d(!1)}).catch(A=>{console.error(A),v(),l([]),d(!1)})},300),[]);C.useEffect(()=>{if(!f||f.length<I){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:S,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})]})},Pm=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}}))||[],PM=({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)},S=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(w=>{o(Pm(w))}).catch(w=>{console.error(w),g(),o([])})},[]);const I=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([...Pm(A)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<S){s([]);return}return I(d),()=>I.cancel()},[d,I]);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})]})},Dm=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})))||[],DM=({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(Dm(x))}).catch(x=>{m(),console.error(x),i([])})},[]);const S=C.useMemo(()=>Sr(x=>{l(!0),p.profile.getByIds([],x).then(w=>{a([...Dm(w)]),l(!1)}).catch(w=>{console.error(w),m(),a([]),l(!1)})},300),[]);C.useEffect(()=>{if(!c||c.length<v){a([]);return}return S(c),()=>S.cancel()},[c,S]);const I=(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:I,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})]})},Om=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}}))||[],OM=({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)},S=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(Om(y))}).catch(w=>{console.error(w),g(),o([])})},[]);const I=C.useMemo(()=>Sr((w,y)=>{c(!0),m.football.getTeams({name:w,scope:y}).then(A=>{const E=A.data.filter(_=>!_.name.includes("/"));s([...Om(E)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<S){s([]);return}return I(d,n),()=>I.cancel()},[d,I]);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})]})},RM=({checked:e,disabled:t,sx:n,onChange:r})=>{const i=n?N({},n):{ml:1};return u.jsx(b.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:o=>r(o.target.checked),sx:q(N({},i),{"--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,sx:a,onChange:s})=>{const l=u.jsx(RM,{checked:n,disabled:i,onChange:s,sx:a==null?void 0:a.switch}),c=a!=null&&a.container?N({},a.container):{mb:2};return r?u.jsxs(b.Box,{sx:N({},c),children:[u.jsx(b.Typography,{component:"label",startDecorator:t=="start"?void 0:l,endDecorator:t=="start"?l: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:l,endDecorator:t=="start"?l:void 0,children:e})},LM={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"})},MM=e=>e.map(t=>({label:t,value:t})),Rm=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=MM(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(um,{styles:LM,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})]})},BM=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 Lm{constructor(){ee(this,"contestId","");ee(this,"contestType","");ee(this,"description","");ee(this,"userList",[])}}const $M=(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=o.helpers.getSDKConfiguration();let c=null;l.errorHandlingMode==="standard"?c=s.error:c=s.data.error,c.code!==404&&c.status!=="code_unknown_contest"&&n(),i(new Lm)}});return C.useEffect(()=>{a()},[]),r};class NM{constructor(){ee(this,"position","");ee(this,"profileId","");ee(this,"note","");ee(this,"tags",[])}}function FM(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 zM=FM,jM=Array.isArray,UM=jM,Mm=pu,VM=zM,HM=UM,WM=Am,GM=1/0,Bm=Mm?Mm.prototype:void 0,$m=Bm?Bm.toString:void 0;function Nm(e){if(typeof e=="string")return e;if(HM(e))return VM(e,Nm)+"";if(WM(e))return $m?$m.call(e):"";var t=e+"";return t=="0"&&1/e==-GM?"-0":t}var YM=Nm,KM=YM;function QM(e){return e==null?"":KM(e)}var Fm=QM;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 JM=qM;function XM(e){return function(t){return e==null?void 0:e[t]}}var ZM=XM,e2=ZM,t2={À:"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",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"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"},n2=e2(t2),r2=n2,i2=r2,o2=Fm,a2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,s2="\\u0300-\\u036f",l2="\\ufe20-\\ufe2f",c2="\\u20d0-\\u20ff",u2=s2+l2+c2,d2="["+u2+"]",f2=RegExp(d2,"g");function h2(e){return e=o2(e),e&&e.replace(a2,i2).replace(f2,"")}var p2=h2,g2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function m2(e){return e.match(g2)||[]}var v2=m2,b2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function y2(e){return b2.test(e)}var x2=y2,zm="\\ud800-\\udfff",C2="\\u0300-\\u036f",w2="\\ufe20-\\ufe2f",I2="\\u20d0-\\u20ff",S2=C2+w2+I2,jm="\\u2700-\\u27bf",Um="a-z\\xdf-\\xf6\\xf8-\\xff",A2="\\xac\\xb1\\xd7\\xf7",T2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",E2="\\u2000-\\u206f",k2=" \\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",Vm="A-Z\\xc0-\\xd6\\xd8-\\xde",_2="\\ufe0e\\ufe0f",Hm=A2+T2+E2+k2,Wm="['’]",Gm="["+Hm+"]",P2="["+S2+"]",Ym="\\d+",D2="["+jm+"]",Km="["+Um+"]",Qm="[^"+zm+Hm+Ym+jm+Um+Vm+"]",O2="\\ud83c[\\udffb-\\udfff]",R2="(?:"+P2+"|"+O2+")",L2="[^"+zm+"]",qm="(?:\\ud83c[\\udde6-\\uddff]){2}",Jm="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+Vm+"]",M2="\\u200d",Xm="(?:"+Km+"|"+Qm+")",B2="(?:"+ui+"|"+Qm+")",Zm="(?:"+Wm+"(?:d|ll|m|re|s|t|ve))?",ev="(?:"+Wm+"(?:D|LL|M|RE|S|T|VE))?",tv=R2+"?",nv="["+_2+"]?",$2="(?:"+M2+"(?:"+[L2,qm,Jm].join("|")+")"+nv+tv+")*",N2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",F2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",z2=nv+tv+$2,j2="(?:"+[D2,qm,Jm].join("|")+")"+z2,U2=RegExp([ui+"?"+Km+"+"+Zm+"(?="+[Gm,ui,"$"].join("|")+")",B2+"+"+ev+"(?="+[Gm,ui+Xm,"$"].join("|")+")",ui+"?"+Xm+"+"+Zm,ui+"+"+ev,F2,N2,Ym,j2].join("|"),"g");function V2(e){return e.match(U2)||[]}var H2=V2,W2=v2,G2=x2,Y2=Fm,K2=H2;function Q2(e,t,n){return e=Y2(e),t=n?void 0:t,t===void 0?G2(e)?K2(e):W2(e):e.match(t)||[]}var q2=Q2,J2=JM,X2=p2,Z2=q2,eB="['’]",tB=RegExp(eB,"g");function nB(e){return function(t){return J2(Z2(X2(t).replace(tB,"")),e,"")}}var rB=nB,iB=rB,oB=iB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),aB=oB;const sB=fn(aB);class lB{constructor(){ee(this,"id","");ee(this,"value","");ee(this,"label","")}}class cB extends lB{constructor(){super(...arguments);ee(this,"logo","");ee(this,"countryFlag","");ee(this,"countryName","")}}class rv extends cB{constructor(){super(...arguments);ee(this,"group","")}}const uB=(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),{[sB(r)]:mu(e[r])}),{}):e,iv=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 rv;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},dB=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"}},fB=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"}},hB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,S,I,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.jsx(b.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),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:((S=e.profileModel)==null?void 0:S.name)||"Unknown",sx:{mr:1}}),u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{fontWeight:"md",children:[uB((I=e.profileModel)==null?void 0:I.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:"note",value:s,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(Rm,{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,{})})})})]})},pB=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 NM;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",{style:{width:"70px"},children:e.labels.position}),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",{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(hB,{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})},gB=(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 mB{constructor(){ee(this,"isValid",!0);ee(this,"message","");ee(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));ee(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});ee(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 vB=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})})},bB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Lm,yB=e=>{var y;const[t,n]=C.useState(bB(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:S,isLeaderboardLoading:I}=gB(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 mB().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(pB,{winners:t.userList,leaderboard:v,hasMoreParticipants:S,isLoading:I,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(vB,{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)})]})},xB=e=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=$M(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(BM,{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(yB,{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})},CB=10,wB=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([...iv(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===CB,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 ov(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 IB(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 SB(e){return typeof e=="number"&&isNaN(e)}function av(e){return di(e)||SB(e)||typeof e=="number"&&!isFinite(e)}function sv(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function AB(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 TB(e,t,n){var r=AB(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 EB(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 kB(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 lv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function cv(e,t){return Array(t+1).join(e)}function uv(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."+cv("0",Math.abs(a))+i:a>=s?i=i+cv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function dv(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,S){return g.length>S?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=lv(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 fv=IB(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}}}),_B=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function PB(e,t,n){return Math.min(Math.max(e,t),n)}function yu(e){return Math.max(e.selectionStart,e.selectionEnd)}function DB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function OB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function RB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function LB(e,t,n,r,i,o,a){a===void 0&&(a=RB);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 S=r;S<c&&(h[S]===-1||!o(n[S]));)S++;var I=S===c||h[S]===-1?d:h[S];for(S=r-1;S>0&&h[S]===-1;)S--;var x=S===-1||h[S]===-1?0:h[S]+1;return x>I?I:r-x<I-r?x:I}function hv(e,t,n,r){var i=e.length;if(t=PB(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 MB(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 pv(e,t,n,r,i,o){o===void 0&&(o=ir);var a=EB(function(m,g){var v,S;return av(m)?(S="",v=""):typeof m=="number"||g?(S=typeof m=="number"?uv(m):m,v=r(S)):(S=i(m,void 0),v=r(S)),{formattedValue:v,numAsString:S}}),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 BB(e){return e.replace(/[^0-9]/g,"")}function $B(e){return e}function NB(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=$B);var s=e.removeFormatting;s===void 0&&(s=BB);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 S=e.value,I=e.getCaretBoundary;I===void 0&&(I=MB);var x=e.isValidInputCharacter;x===void 0&&(x=fo);var w=e.isCharacterSame,y=ov(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=pv(S,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}),j=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=C.useState(!1),z=Y[0],$=Y[1],B=C.useRef(null),W=C.useRef({setCaretTimeout:null,focusTimeout:null});C.useEffect(function(){return $(!0),function(){clearTimeout(W.current.setCaretTimeout),clearTimeout(W.current.focusTimeout)}},[]);var Q=a,te=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),W.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==he&&Ar(de,he)},0))},M=function(de,he,xe){return hv(de,he,I(de),xe)},U=function(de,he,xe){var Te=I(he),He=LB(he,_,de,xe,Te,x,w);return He=hv(he,He,Te),He},H=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=U(It,he,St),Ee!==void 0&&R(xe,Ee,he)}he!==_&&j(te(he,Pe),{event:He,source:Te})};C.useEffect(function(){var de=T.current,he=de.formattedValue,xe=de.numAsString;(_!==he||D!==xe)&&j(te(_,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=U(T.current.formattedValue,_,ne);de.value=_,R(de,he,_)}},[_]);var ae=function(de,he,xe){var Te=he.target,He=F.current?_B(F.current,Te.selectionEnd):fv(_,de),Pe=Object.assign(Object.assign({},He),{lastValue:_}),Ee=s(de,Pe),It=Q(Ee);if(Ee=s(It,void 0),f&&!f(te(It,Ee))){var St=he.target,jt=yu(St),Lt=U(de,_,jt);return St.value=_,R(St,Lt,_),!1}return H({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 jt=Ee;if(St){var Lt=xe==="ArrowLeft"?"left":"right";jt=M(Pe,Ee,Lt),jt!==Ee&&de.preventDefault()}else xe==="Delete"&&!x(Pe[Ee])?jt=M(Pe,Ee,"right"):xe==="Backspace"&&!x(Pe[Ee])&&(jt=M(Pe,Ee,"left"));jt!==Ee&&R(he,jt,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,W.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(W.current.focusTimeout),clearTimeout(W.current.setCaretTimeout),v(de)},wt=z&&DB()?"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 gv(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=lv(m,n,!!r)),c&&(p=TB(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 FB(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 zB(e,t){return new RegExp("(^-)|[0-9]|"+sv(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 UB(e,t,n){var r;t===void 0&&(t=OB(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 S=function(B,W,Q){var te=!1,R=!1;o.startsWith("-")?te=!1:B.startsWith("--")?(te=!1,R=!0):a.startsWith("-")&&B.length===a.length?te=!1:B[0]==="-"&&(te=!0);var M=te?1:0;return R&&(M=2),M&&(B=B.substring(M),W-=M,Q-=M),{value:B,start:W,end:Q,hasNegation:te}},I=S(e,d,f),x=I.hasNegation;r=I,e=r.value,d=r.start,f=r.end;var w=S(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=FB(x?"-"+e:e,i),e=(e.match(zB(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(sv(m),"g"),function(B,W){return W===T?".":""});var j=bu(e,i),Y=j.beforeDecimal,z=j.afterDecimal,$=j.addNegation;return c.end-c.start<l.end-l.start&&Y===""&&g&&!parseFloat(z)&&(e=$?"-":""),e}function VB(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 HB(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 .)
|
|
@@ -2468,11 +2468,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2468
2468
|
Prefix can't start with '-' when allowNegative is true.
|
|
2469
2469
|
prefix: `+i+`
|
|
2470
2470
|
allowNegative: `+o+`
|
|
2471
|
-
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function WB(e){e=HB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=ir);var o=e.onBlur;o===void 0&&(o=ir);var a=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,c=e.prefix;c===void 0&&(c="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=ov(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=hs(e),v=g.decimalSeparator,S=g.allowedDecimalSeparators,I=function($){return gv($,e)},x=function($,B){return UB($,B,e)},w=di(f)?d:f,y=h!=null?h:jB(w,c,t);di(f)?di(d)||(y=y||typeof d=="number"):y=y||typeof f=="number";var A=function($){return av($)?$:(typeof $=="number"&&($=uv($)),y&&typeof s=="number"?dv($,s,!!l):$)},E=pv(A(f),A(d),!!y,I,x,p),_=E[0],D=_.numAsString,G=_.formattedValue,F=E[1],T=function($){var B=$.target,W=$.key,q=B.selectionStart,ee=B.selectionEnd,R=B.value;if(R===void 0&&(R=""),(W==="Backspace"||W==="Delete")&&ee<c.length){$.preventDefault();return}if(q!==ee){i($);return}W==="Backspace"&&R[0]==="-"&&q===c.length+1&&n&&Ar(B,1),s&&l&&(W==="Backspace"&&R[q-1]===v?(Ar(B,q-1),$.preventDefault()):W==="Delete"&&R[q]===v&&$.preventDefault()),S!=null&&S.includes(W)&&R[q]===v&&Ar(B,q+1);var M=a===!0?",":a;W==="Backspace"&&R[q-1]===M&&Ar(B,q-1),W==="Delete"&&R[q]===M&&Ar(B,q+1),i($)},j=function($){var B=D;if(B.match(/\d/g)||(B=""),r||(B=kB(B)),l&&s&&(B=dv(B,s,l)),B!==D){var W=gv(B,e);F({formattedValue:W,value:B,floatValue:parseFloat(B)},{event:$,source:uo.event})}o($)},Y=function($){return $===v?!0:fo($)},z=function($){var B=$.currentValue,W=$.lastValue,q=$.formattedValue,ee=$.currentValueIndex,R=$.formattedValueIndex,M=B[ee],U=q[R],H=fv(W,B),ne=H.to,se=function(ae){return x(ae).indexOf(".")+c.length};return f===0&&l&&s&&B[ne.start]===v&&se(B)<ee&&se(q)>R?!1:ee>=ne.start&&ee<ne.end&&S&&S.includes(M)&&U===v?!0:M===U};return Object.assign(Object.assign({},m),{value:G,valueIsNumericString:!1,isValidInputCharacter:Y,isCharacterSame:z,onValueChange:F,format:I,removeFormatting:x,getCaretBoundary:function($){return VB($,e)},onKeyDown:T,onBlur:j})}function GB(e){var t=WB(e);return C.createElement(NB,Object.assign({},t))}const YB=V.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(GB,Q(N({},o),{getInputRef:n,onValueChange:s=>{r({target:{name:t.name,value:s.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),xu=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(fu,{size:e.size||"sm",children:[u.jsx(hu,{children:e.label}),u.jsx(Wa,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:YB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(b.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},KB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",qB=(e,t,n,r)=>{const i=e.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),o=e.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),a=e.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),s=[],l=[];if(i.length>0){const c=t.football.getCompetitions({competitionIds:i}).then(d=>{l.push(d)}).catch(d=>{console.error(d),r()});s.push(c)}if(o.length>0){const c=t.football.getTeams({teamIds:o}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(c)}if(a.length>0){const c=t.football.getPlayers({playerIds:a}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(c)}Promise.all(s).then(()=>{const d=Array.prototype.concat.apply([],l).map(f=>QB(f));n(d)})},QB=e=>{const t=new rv;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=KB(e.id),e.birthDate?t.logo=e.assets&&e.assets.headshot&&e.assets.headshot:t.logo=e.assets&&e.assets.logo&&e.assets.logo,t.countryName=e.country.name,t.countryFlag=e.country.assets&&e.country.assets.flag?e.country.assets.flag:st.country,t},JB=10,XB=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),[s,l]=C.useState(""),[c,d]=C.useState(!1),{sdk:f}=ft(),h=()=>d(!c),p=(v,S)=>{n(S),e.onChangeTags(S)};C.useEffect(()=>{qB(e.tags,f,n,h)},[e.tags]);const m=C.useMemo(()=>Sr(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(S=>{i([...iv(S)]),a(!1)}).catch(S=>{console.error(S),i([]),a(!1)})},300),[]);C.useEffect(()=>(m(s),()=>m.cancel()),[s,m]);const g=(v,S)=>v.map((I,x)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:w=>S({index:x}).onClick(w),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:I},`option_${I.id}`)},I.id));return u.jsxs(b.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(b.Autocomplete,{getOptionDisabled:()=>t.length===JB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,S)=>v.id===S.id,endDecorator:o?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(S=>!t.some(I=>I.value===S.value)),onInputChange:(v,S)=>{l(S)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(v,S)=>u.jsx(b.AutocompleteOption,Q(N({},v),{children:u.jsx(wn,{option:S})}))}),u.jsx(at,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},ZB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),e$=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=ZB(e.labels),o=(l,c)=>{const d=l.target.value;t.content[c]=d,e.onChange(t)},a=(l,c)=>{const d=l.target.value;t.campaign[c]=d,e.onChange(t)},s=l=>{l.length?t.tags=l.map(c=>({id:c.id,type:c.group,source:"football"})):t.tags=[],e.onChange(t)};return u.jsx(u.Fragment,{children:u.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[u.jsx(Hr,{children:e.labels.tags}),u.jsx(Hr,{children:e.labels.content}),u.jsx(Hr,{children:e.labels.campaign})]}),u.jsx(Zr,{value:0,sx:{px:0},children:u.jsx(XB,{labels:e.labels,tags:e.context.tags,onChangeTags:s})}),u.jsx(Zr,{value:1,sx:{px:0},children:Object.keys(n).map(l=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{label:i.get(l),placeholder:"",defaultValue:n[l],required:!1,size:"sm",onChange:c=>o(c,l)})},`context-content-${l}`))}),u.jsx(Zr,{value:2,sx:{px:0},children:Object.keys(r).map(l=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{label:i.get(l),placeholder:"",defaultValue:r[l],required:!1,size:"sm",onChange:c=>a(c,l)})},`context-campaign-${l}`))})]})})},t$=e=>e?N({},e):{main:"",mobile:""},n$=e=>{const[t,n]=C.useState(!1),r=t$(e.defaultValue),i=(a,s)=>{r[s]=a,e.onChange(r)},o=a=>{r[a]="",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:a=>i(a,"main"),clearImage:()=>o("main")}),u.jsx(b.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(lo,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):u.jsx(u.Fragment,{})]})},r$=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=C.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered},{id:"PAID",label:n.paid}];return u.jsxs(b.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(b.FormLabel,{children:n.authRequirement}),u.jsx(b.Select,Q(N({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,s)=>r(s),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(b.IconButton,{variant:"plain",color:"neutral",onMouseDown:a=>{a.stopPropagation()},onClick:()=>{var a;r(null),(a=i.current)==null||a.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(bm,{})}),indicator:null}),{children:o.map(a=>u.jsx(b.Option,{value:a.id,children:a.label},a.id))})),u.jsx(b.FormHelperText,{children:n.authRequirementDescription})]})};function i$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const ps=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function fi(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Cu(e){return"nodeType"in e}function Rt(e){var t,n;return e?fi(e)?e:Cu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wu(e){const{Document:t}=Rt(e);return e instanceof t}function ho(e){return fi(e)?!1:e instanceof Rt(e).HTMLElement}function mv(e){return e instanceof Rt(e).SVGElement}function hi(e){return e?fi(e)?e.document:Cu(e)?wu(e)?e:ho(e)||mv(e)?e.ownerDocument:document:document:document}const ln=ps?C.useLayoutEffect:C.useEffect;function gs(e){const t=C.useRef(e);return ln(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function o$(){const e=C.useRef(null),t=C.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function po(e,t){t===void 0&&(t=[e]);const n=C.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function go(e,t){const n=C.useRef();return C.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ms(e){const t=gs(e),n=C.useRef(null),r=C.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function vs(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let Iu={};function mo(e,t){return C.useMemo(()=>{if(t)return t;const n=Iu[e]==null?0:Iu[e]+1;return Iu[e]=n,e+"-"+n},[e,t])}function vv(e){return 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];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[l,c]of s){const d=o[l];d!=null&&(o[l]=d+e*c)}return o},N({},t))}}const pi=vv(1),vo=vv(-1);function a$(e){return"clientX"in e&&"clientY"in e}function bs(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function s$(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function ys(e){if(s$(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return a$(e)?{x:e.clientX,y:e.clientY}:null}const Hn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Hn.Translate.toString(e),Hn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),bv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function l$(e){return e.matches(bv)?e:e.querySelector(bv)}const c$={display:"none"};function u$(e){let{id:t,value:n}=e;return C.createElement("div",{id:t,style:c$},n)}function d$(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function f$(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const yv=C.createContext(null);function h$(e){const t=C.useContext(yv);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function p$(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const g$={draggable:`
|
|
2471
|
+
`),o=!1),Object.assign(Object.assign({},e),{allowNegative:o})}function WB(e){e=HB(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=ir);var o=e.onBlur;o===void 0&&(o=ir);var a=e.thousandSeparator,s=e.decimalScale,l=e.fixedDecimalScale,c=e.prefix;c===void 0&&(c="");var d=e.defaultValue,f=e.value,h=e.valueIsNumericString,p=e.onValueChange,m=ov(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=hs(e),v=g.decimalSeparator,S=g.allowedDecimalSeparators,I=function($){return gv($,e)},x=function($,B){return UB($,B,e)},w=di(f)?d:f,y=h!=null?h:jB(w,c,t);di(f)?di(d)||(y=y||typeof d=="number"):y=y||typeof f=="number";var A=function($){return av($)?$:(typeof $=="number"&&($=uv($)),y&&typeof s=="number"?dv($,s,!!l):$)},E=pv(A(f),A(d),!!y,I,x,p),_=E[0],D=_.numAsString,G=_.formattedValue,F=E[1],T=function($){var B=$.target,W=$.key,Q=B.selectionStart,te=B.selectionEnd,R=B.value;if(R===void 0&&(R=""),(W==="Backspace"||W==="Delete")&&te<c.length){$.preventDefault();return}if(Q!==te){i($);return}W==="Backspace"&&R[0]==="-"&&Q===c.length+1&&n&&Ar(B,1),s&&l&&(W==="Backspace"&&R[Q-1]===v?(Ar(B,Q-1),$.preventDefault()):W==="Delete"&&R[Q]===v&&$.preventDefault()),S!=null&&S.includes(W)&&R[Q]===v&&Ar(B,Q+1);var M=a===!0?",":a;W==="Backspace"&&R[Q-1]===M&&Ar(B,Q-1),W==="Delete"&&R[Q]===M&&Ar(B,Q+1),i($)},j=function($){var B=D;if(B.match(/\d/g)||(B=""),r||(B=kB(B)),l&&s&&(B=dv(B,s,l)),B!==D){var W=gv(B,e);F({formattedValue:W,value:B,floatValue:parseFloat(B)},{event:$,source:uo.event})}o($)},Y=function($){return $===v?!0:fo($)},z=function($){var B=$.currentValue,W=$.lastValue,Q=$.formattedValue,te=$.currentValueIndex,R=$.formattedValueIndex,M=B[te],U=Q[R],H=fv(W,B),ne=H.to,se=function(ae){return x(ae).indexOf(".")+c.length};return f===0&&l&&s&&B[ne.start]===v&&se(B)<te&&se(Q)>R?!1:te>=ne.start&&te<ne.end&&S&&S.includes(M)&&U===v?!0:M===U};return Object.assign(Object.assign({},m),{value:G,valueIsNumericString:!1,isValidInputCharacter:Y,isCharacterSame:z,onValueChange:F,format:I,removeFormatting:x,getCaretBoundary:function($){return VB($,e)},onKeyDown:T,onBlur:j})}function GB(e){var t=WB(e);return C.createElement(NB,Object.assign({},t))}const YB=V.forwardRef(function(t,n){const a=t,{onChange:r,isAllowed:i}=a,o=We(a,["onChange","isAllowed"]);return u.jsx(GB,q(N({},o),{getInputRef:n,onValueChange:s=>{r({target:{name:t.name,value:s.value}})},thousandSeparator:!0,valueIsNumericString:!0,isAllowed:i}))}),xu=e=>{const t=n=>{e.onChange(Number(n.target.value))};return u.jsxs(fu,{size:e.size||"sm",children:[u.jsx(hu,{children:e.label}),u.jsx(Wa,{sx:e.sx,value:e.defaultValue,onChange:t,slotProps:{input:{component:YB,isAllowed:e.isAllowed?e.isAllowed:()=>!0}}}),e.description?u.jsx(b.FormHelperText,{children:e.description}):u.jsx(u.Fragment,{})]})},KB=e=>e.startsWith("fb:c:")?"competition":e.startsWith("fb:t:")?"team":"player",QB=(e,t,n,r)=>{const i=e.filter(c=>c.type.toLocaleLowerCase()==="competition").map(c=>c.id),o=e.filter(c=>c.type.toLocaleLowerCase()==="team").map(c=>c.id),a=e.filter(c=>c.type.toLocaleLowerCase()==="player").map(c=>c.id),s=[],l=[];if(i.length>0){const c=t.football.getCompetitions({competitionIds:i}).then(d=>{l.push(d)}).catch(d=>{console.error(d),r()});s.push(c)}if(o.length>0){const c=t.football.getTeams({teamIds:o}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(c)}if(a.length>0){const c=t.football.getPlayers({playerIds:a}).then(d=>{l.push(d.data)}).catch(d=>{console.error(d),r()});s.push(c)}Promise.all(s).then(()=>{const d=Array.prototype.concat.apply([],l).map(f=>qB(f));n(d)})},qB=e=>{const t=new rv;return t.label=e.name,t.value=e.name,t.id=e.id,t.group=KB(e.id),e.birthDate?t.logo=e.assets&&e.assets.headshot&&e.assets.headshot:t.logo=e.assets&&e.assets.logo&&e.assets.logo,t.countryName=e.country.name,t.countryFlag=e.country.assets&&e.country.assets.flag?e.country.assets.flag:st.country,t},JB=10,XB=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),[s,l]=C.useState(""),[c,d]=C.useState(!1),{sdk:f}=ft(),h=()=>d(!c),p=(v,S)=>{n(S),e.onChangeTags(S)};C.useEffect(()=>{QB(e.tags,f,n,h)},[e.tags]);const m=C.useMemo(()=>Sr(v=>{if(!v){i([]),a(!1);return}a(!0),f.football.search({query:v}).then(S=>{i([...iv(S)]),a(!1)}).catch(S=>{console.error(S),i([]),a(!1)})},300),[]);C.useEffect(()=>(m(s),()=>m.cancel()),[s,m]);const g=(v,S)=>v.map((I,x)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:w=>S({index:x}).onClick(w),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:I},`option_${I.id}`)},I.id));return u.jsxs(b.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{color:"primary",children:e.labels.contextEntityTag}),u.jsx(b.Autocomplete,{getOptionDisabled:()=>t.length===JB,forcePopupIcon:!1,multiple:!0,loading:o,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(v,S)=>v.id===S.id,endDecorator:o?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:t.length>0?"":e.labels.typeContextTagNamePlaceholder,options:r,filterOptions:v=>v.filter(S=>!t.some(I=>I.value===S.value)),onInputChange:(v,S)=>{l(S)},onChange:p,getOptionKey:v=>v.id,groupBy:v=>v.group+"s",value:t!=null?t:[],renderTags:g,renderOption:(v,S)=>u.jsx(b.AutocompleteOption,q(N({},v),{children:u.jsx(wn,{option:S})}))}),u.jsx(at,{showToast:c,message:e.labels.getFootballEntitiesErrorMessage,color:"danger",hideToast:h})]})},ZB=e=>new Map().set("id",e.id).set("type",e.type).set("label",e.label),e$=e=>{const t=JSON.parse(JSON.stringify(e.context)),n=e.context.content,r=e.context.campaign,i=ZB(e.labels),o=(l,c)=>{const d=l.target.value;t.content[c]=d,e.onChange(t)},a=(l,c)=>{const d=l.target.value;t.campaign[c]=d,e.onChange(t)},s=l=>{l.length?t.tags=l.map(c=>({id:c.id,type:c.group,source:"football"})):t.tags=[],e.onChange(t)};return u.jsx(u.Fragment,{children:u.jsxs(Hh,{defaultValue:0,sx:{p:0,bgcolor:"transparent"},children:[u.jsxs(Wh,{sx:{borderRadius:0,fontSize:"0.875rem",[`& .${hc.root}`]:{'&[aria-selected="true"]':{bgcolor:"transparent",py:1,borderColor:"transparent","&::before":{content:'""',display:"block",position:"absolute",height:2,bottom:-2,left:0,right:0},"&::after":{bgcolor:"primary.500"}}}},tabFlex:"auto",children:[u.jsx(Hr,{children:e.labels.tags}),u.jsx(Hr,{children:e.labels.content}),u.jsx(Hr,{children:e.labels.campaign})]}),u.jsx(Zr,{value:0,sx:{px:0},children:u.jsx(XB,{labels:e.labels,tags:e.context.tags,onChangeTags:s})}),u.jsx(Zr,{value:1,sx:{px:0},children:Object.keys(n).map(l=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{label:i.get(l),placeholder:"",defaultValue:n[l],required:!1,size:"sm",onChange:c=>o(c,l)})},`context-content-${l}`))}),u.jsx(Zr,{value:2,sx:{px:0},children:Object.keys(r).map(l=>u.jsx(b.Box,{mb:2,children:u.jsx(xn,{label:i.get(l),placeholder:"",defaultValue:r[l],required:!1,size:"sm",onChange:c=>a(c,l)})},`context-campaign-${l}`))})]})})},t$=e=>e?N({},e):{main:"",mobile:""},n$=e=>{const[t,n]=C.useState(!1),r=t$(e.defaultValue),i=(a,s)=>{r[s]=a,e.onChange(r)},o=a=>{r[a]="",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:a=>i(a,"main"),clearImage:()=>o("main")}),u.jsx(b.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(lo,{labels:e.labels,title:e.labels.mobileImage,image:r.mobile,onChangeImages:a=>i(a,"mobile"),clearImage:()=>o("mobile")}):u.jsx(u.Fragment,{})]})},r$=({defaultValue:e,isClearable:t=!0,labels:n,onChange:r})=>{const i=C.useRef(null),o=[{id:"FREE",label:n.free},{id:"LEAD",label:n.lead},{id:"REGISTERED",label:n.registered},{id:"PAID",label:n.paid}];return u.jsxs(b.FormControl,{size:"sm",sx:{mb:2},children:[u.jsx(b.FormLabel,{children:n.authRequirement}),u.jsx(b.Select,q(N({value:e,size:"sm",slotProps:{button:{sx:{whiteSpace:"nowrap"}}},onChange:(a,s)=>r(s),sx:{minHeight:"37px"}},e&&t&&{endDecorator:u.jsx(b.IconButton,{variant:"plain",color:"neutral",onMouseDown:a=>{a.stopPropagation()},onClick:()=>{var a;r(null),(a=i.current)==null||a.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(bm,{})}),indicator:null}),{children:o.map(a=>u.jsx(b.Option,{value:a.id,children:a.label},a.id))})),u.jsx(b.FormHelperText,{children:n.authRequirementDescription})]})};function i$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>r=>{t.forEach(i=>i(r))},t)}const ps=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function fi(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Cu(e){return"nodeType"in e}function Rt(e){var t,n;return e?fi(e)?e:Cu(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wu(e){const{Document:t}=Rt(e);return e instanceof t}function ho(e){return fi(e)?!1:e instanceof Rt(e).HTMLElement}function mv(e){return e instanceof Rt(e).SVGElement}function hi(e){return e?fi(e)?e.document:Cu(e)?wu(e)?e:ho(e)||mv(e)?e.ownerDocument:document:document:document}const ln=ps?C.useLayoutEffect:C.useEffect;function gs(e){const t=C.useRef(e);return ln(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}function o$(){const e=C.useRef(null),t=C.useCallback((r,i)=>{e.current=setInterval(r,i)},[]),n=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function po(e,t){t===void 0&&(t=[e]);const n=C.useRef(e);return ln(()=>{n.current!==e&&(n.current=e)},t),n}function go(e,t){const n=C.useRef();return C.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ms(e){const t=gs(e),n=C.useRef(null),r=C.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,r]}function vs(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let Iu={};function mo(e,t){return C.useMemo(()=>{if(t)return t;const n=Iu[e]==null?0:Iu[e]+1;return Iu[e]=n,e+"-"+n},[e,t])}function vv(e){return 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];return r.reduce((o,a)=>{const s=Object.entries(a);for(const[l,c]of s){const d=o[l];d!=null&&(o[l]=d+e*c)}return o},N({},t))}}const pi=vv(1),vo=vv(-1);function a$(e){return"clientX"in e&&"clientY"in e}function bs(e){if(!e)return!1;const{KeyboardEvent:t}=Rt(e.target);return t&&e instanceof t}function s$(e){if(!e)return!1;const{TouchEvent:t}=Rt(e.target);return t&&e instanceof t}function ys(e){if(s$(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return a$(e)?{x:e.clientX,y:e.clientY}:null}const Hn=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Hn.Translate.toString(e),Hn.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),bv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function l$(e){return e.matches(bv)?e:e.querySelector(bv)}const c$={display:"none"};function u$(e){let{id:t,value:n}=e;return C.createElement("div",{id:t,style:c$},n)}function d$(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function f$(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const yv=C.createContext(null);function h$(e){const t=C.useContext(yv);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function p$(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:i,event:o}=r;e.forEach(a=>{var s;return(s=a[i])==null?void 0:s.call(a,o)})},[e]),t]}const g$={draggable:`
|
|
2472
2472
|
To pick up a draggable item, press the space bar.
|
|
2473
2473
|
While dragging, use the arrow keys to move the item.
|
|
2474
2474
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
2475
|
-
`},m$={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function v$(e){let{announcements:t=m$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=g$}=e;const{announce:o,announcement:a}=f$(),s=mo("DndLiveRegion"),[l,c]=C.useState(!1);if(C.useEffect(()=>{c(!0)},[]),h$(C.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=C.createElement(C.Fragment,null,C.createElement(u$,{id:r,value:i.draggable}),C.createElement(d$,{id:s,announcement:a}));return n?Re.createPortal(d,n):d}var mt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(mt||(mt={}));function xs(){}function Cs(e,t){return C.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function xv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const cn=Object.freeze({x:0,y:0});function b$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y$(e,t){const n=ys(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function x$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function C$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Cv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function wv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const w$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=Cv(t),o=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const c=Cv(l),d=i.reduce((h,p,m)=>h+b$(c[m],p),0),f=Number((d/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(x$)};function I$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,d=a*s,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const S$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=I$(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(C$)};function A$(e,t,n){return Q(N({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Iv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function T$(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>Q(N({},a),{top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),N({},n))}}const E$=T$(1);function Sv(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function k$(e,t,n){const r=Sv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),c=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const _$={ignoreTransform:!1};function gi(e,t){t===void 0&&(t=_$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=k$(n,c,d))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function Av(e){return gi(e,{ignoreTransform:!0})}function P$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function D$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function O$(e,t){t===void 0&&(t=Rt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function ws(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(wu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ho(i)||mv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&O$(i,o)&&n.push(i),D$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Tv(e){const[t]=ws(e,1);return t!=null?t:null}function Su(e){return!ps||!e?null:fi(e)?e:Cu(e)?wu(e)||e===hi(e).scrollingElement?window:ho(e)?e:null:null}function Ev(e){return fi(e)?e.scrollX:e.scrollLeft}function kv(e){return fi(e)?e.scrollY:e.scrollTop}function Au(e){return{x:Ev(e),y:kv(e)}}var xt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xt||(xt={}));function _v(e){return!ps||!e?!1:e===document.scrollingElement}function Pv(e){const t={x:0,y:0},n=_v(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const R$={x:.2,y:.2};function L$(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=R$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Pv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=xt.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=xt.Forward,m.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=xt.Forward,m.x=r*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=xt.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function M$(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Dv(e){return e.reduce((t,n)=>pi(t,Au(n)),cn)}function B$(e){return e.reduce((t,n)=>t+Ev(n),0)}function $$(e){return e.reduce((t,n)=>t+kv(n),0)}function Ov(e,t){if(t===void 0&&(t=gi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Tv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const N$=[["x",["left","right"],B$],["y",["top","bottom"],$$]];class Tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ws(n),i=Dv(r);this.rect=N({},t),this.width=t.width,this.height=t.height;for(const[o,a,s]of N$)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(r),d=i[o]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class bo{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function F$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:hi(e)}function Eu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(bi(n,2)+bi(r,2))>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var on;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(on||(on={}));function Rv(e){e.preventDefault()}function z$(e){e.stopPropagation()}var ke;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ke||(ke={}));const Lv={start:[ke.Space,ke.Enter],cancel:[ke.Esc],end:[ke.Space,ke.Enter,ke.Tab]},j$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ke.Right:return Q(N({},n),{x:n.x+25});case ke.Left:return Q(N({},n),{x:n.x-25});case ke.Down:return Q(N({},n),{y:n.y+25});case ke.Up:return Q(N({},n),{y:n.y-25})}};class Is{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new bo(hi(n)),this.windowListeners=new bo(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(on.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Ov(r),n(cn)}handleKeyDown(t){if(bs(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Lv,coordinateGetter:a=j$,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=vo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const v=t.code,{isTop:S,isRight:I,isLeft:x,isBottom:w,maxScroll:y,minScroll:A}=Pv(g),E=M$(g),_={x:Math.min(v===ke.Right?E.right-E.width/2:E.right,Math.max(v===ke.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(v===ke.Down?E.bottom-E.height/2:E.bottom,Math.max(v===ke.Down?E.top:E.top+E.height/2,f.y))},D=v===ke.Right&&!I||v===ke.Left&&!x,G=v===ke.Down&&!w||v===ke.Up&&!S;if(D&&_.x!==f.x){const F=g.scrollLeft+h.x,T=v===ke.Right&&F<=y.x||v===ke.Left&&F>=A.x;if(T&&!h.y){g.scrollTo({left:F,behavior:s});return}T?p.x=g.scrollLeft-F:p.x=v===ke.Right?g.scrollLeft-y.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(G&&_.y!==f.y){const F=g.scrollTop+h.y,T=v===ke.Down&&F<=y.y||v===ke.Up&&F>=A.y;if(T&&!h.x){g.scrollTo({top:F,behavior:s});return}T?p.y=g.scrollTop-F:p.y=v===ke.Down?g.scrollTop-y.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,pi(vo(f,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Is.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Lv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Mv(e){return!!(e&&"distance"in e)}function Bv(e){return!!(e&&"delay"in e)}class ku{constructor(t,n,r){var i;r===void 0&&(r=F$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=hi(a),this.documentListeners=new bo(this.document),this.listeners=new bo(r),this.windowListeners=new bo(Rt(a)),this.initialCoordinates=(i=ys(o))!=null?i:cn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.DragStart,Rv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,Rv),this.documentListeners.add(on.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Mv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(on.Click,z$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(on.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=ys(t))!=null?n:cn,c=vo(i,l);if(!r&&s){if(Mv(s)){if(s.tolerance!=null&&Eu(c,s.tolerance))return this.handleCancel();if(Eu(c,s.distance))return this.handleStart()}if(Bv(s)&&Eu(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ke.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const U$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ss extends ku{constructor(t){const{event:n}=t,r=hi(n.target);super(t,U$,r)}}Ss.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const V$={move:{name:"mousemove"},end:{name:"mouseup"}};var _u;(function(e){e[e.RightClick=2]="RightClick"})(_u||(_u={}));class H$ extends ku{constructor(t){super(t,V$,hi(t.event.target))}}H$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===_u.RightClick?!1:(r==null||r({event:n}),!0)}}];const Pu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class W$ extends ku{constructor(t){super(t,Pu)}static setup(){return window.addEventListener(Pu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Pu.move.name,t)};function t(){}}}W$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var yo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(yo||(yo={}));var As;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(As||(As={}));function G$(e){let{acceleration:t,activator:n=yo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=As.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=K$({delta:f,disabled:!o}),[m,g]=o$(),v=C.useRef({x:0,y:0}),S=C.useRef({x:0,y:0}),I=C.useMemo(()=>{switch(n){case yo.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case yo.DraggableRect:return i}},[n,i,l]),x=C.useRef(null),w=C.useCallback(()=>{const A=x.current;if(!A)return;const E=v.current.x*S.current.x,_=v.current.y*S.current.y;A.scrollBy(E,_)},[]),y=C.useMemo(()=>s===As.TreeOrder?[...c].reverse():c,[s,c]);C.useEffect(()=>{if(!o||!c.length||!I){g();return}for(const A of y){if((r==null?void 0:r(A))===!1)continue;const E=c.indexOf(A),_=d[E];if(!_)continue;const{direction:D,speed:G}=L$(A,_,I,t,h);for(const F of["x","y"])p[F][D[F]]||(G[F]=0,D[F]=0);if(G.x>0||G.y>0){g(),x.current=A,m(w,a),v.current=G,S.current=D;return}}v.current={x:0,y:0},S.current={x:0,y:0},g()},[t,w,r,g,o,a,JSON.stringify(I),JSON.stringify(p),m,c,y,d,JSON.stringify(h)])}const Y$={x:{[xt.Backward]:!1,[xt.Forward]:!1},y:{[xt.Backward]:!1,[xt.Forward]:!1}};function K$(e){let{delta:t,disabled:n}=e;const r=vs(t);return go(i=>{if(n||!r||!i)return Y$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[xt.Backward]:i.x[xt.Backward]||o.x===-1,[xt.Forward]:i.x[xt.Forward]||o.x===1},y:{[xt.Backward]:i.y[xt.Backward]||o.y===-1,[xt.Forward]:i.y[xt.Forward]||o.y===1}}},[n,t,r])}function q$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return go(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function Q$(e,t){return C.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var xo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(xo||(xo={}));var Du;(function(e){e.Optimized="optimized"})(Du||(Du={}));const $v=new Map;function J$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=C.useState(null),{frequency:s,measure:l,strategy:c}=i,d=C.useRef(e),f=v(),h=po(f),p=C.useCallback(function(S){S===void 0&&(S=[]),!h.current&&a(I=>I===null?S:I.concat(S.filter(x=>!I.includes(x))))},[h]),m=C.useRef(null),g=go(S=>{if(f&&!n)return $v;if(!S||S===$v||d.current!==e||o!=null){const I=new Map;for(let x of e){if(!x)continue;if(o&&o.length>0&&!o.includes(x.id)&&x.rect.current){I.set(x.id,x.rect.current);continue}const w=x.node.current,y=w?new Tu(l(w),w):null;x.rect.current=y,y&&I.set(x.id,y)}return I}return S},[e,o,n,f,l]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{f||p()},[n,f]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case xo.Always:return!1;case xo.BeforeDragging:return n;default:return!n}}}function Ou(e,t){return go(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function X$(e,t){return Ou(e,t)}function Z$(e){let{callback:t,disabled:n}=e;const r=gs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ts(e){let{callback:t,disabled:n}=e;const r=gs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function eN(e){return new Tu(gi(e),e)}function Nv(e,t,n){t===void 0&&(t=eN);const[r,i]=C.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l!=null?l:n)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=Z$({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=Ts({callback:o});return ln(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),r}function tN(e){const t=Ou(e);return Iv(e,t)}const Fv=[];function nN(e){const t=C.useRef(e),n=go(r=>e?r&&r!==Fv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ws(e):Fv,[e]);return C.useEffect(()=>{t.current=e},[e]),n}function rN(e){const[t,n]=C.useState(null),r=C.useRef(e),i=C.useCallback(o=>{const a=Su(o.target);a&&n(s=>s?(s.set(a,Au(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const c=Su(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,Au(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const c=Su(l);c==null||c.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>pi(o,a),cn):Dv(e):cn,[e,t])}function zv(e,t){t===void 0&&(t=[]);const n=C.useRef(null);return C.useEffect(()=>{n.current=null},t),C.useEffect(()=>{const r=e!==cn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?vo(e,n.current):cn}function iN(e){C.useEffect(()=>{if(!ps)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function oN(e,t){return C.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function jv(e){return C.useMemo(()=>e?P$(e):null,[e])}const Uv=[];function aN(e,t){t===void 0&&(t=gi);const[n]=e,r=jv(n?Rt(n):null),[i,o]=C.useState(Uv);function a(){o(()=>e.length?e.map(l=>_v(l)?r:new Tu(t(l),l)):Uv)}const s=Ts({callback:a});return ln(()=>{s==null||s.disconnect(),a(),e.forEach(l=>s==null?void 0:s.observe(l))},[e]),i}function Vv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ho(t)?t:e}function sN(e){let{measure:t}=e;const[n,r]=C.useState(null),i=C.useCallback(c=>{for(const{target:d}of c)if(ho(d)){r(f=>{const h=t(d);return f?Q(N({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Ts({callback:i}),a=C.useCallback(c=>{const d=Vv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[s,l]=ms(a);return C.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const lN=[{sensor:Ss,options:{}},{sensor:Is,options:{}}],cN={current:{}},Es={draggable:{measure:Av},droppable:{measure:Av,strategy:xo.WhileDragging,frequency:Du.Optimized},dragOverlay:{measure:gi}};class Co extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const uN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Co,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Es,measureDroppableContainers:xs,windowRect:null,measuringScheduled:!1},Hv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xs,draggableNodes:new Map,over:null,measureDroppableContainers:xs},wo=C.createContext(Hv),Wv=C.createContext(uN);function dN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function fN(e,t){switch(t.type){case mt.DragStart:return Q(N({},e),{draggable:Q(N({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:Q(N({},e),{draggable:Q(N({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case mt.DragEnd:case mt.DragCancel:return Q(N({},e),{draggable:Q(N({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case mt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Co(e.droppable.containers);return i.set(r,n),Q(N({},e),{droppable:Q(N({},e.droppable),{containers:i})})}case mt.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Co(e.droppable.containers);return a.set(n,Q(N({},o),{disabled:i})),Q(N({},e),{droppable:Q(N({},e.droppable),{containers:a})})}case mt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Co(e.droppable.containers);return o.delete(n),Q(N({},e),{droppable:Q(N({},e.droppable),{containers:o})})}default:return e}}function hN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=C.useContext(wo),o=vs(r),a=vs(n==null?void 0:n.id);return C.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!bs(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=l$(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Gv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(N({transform:o},r)),n):n}function pN(e){return C.useMemo(()=>({draggable:N(N({},Es.draggable),e==null?void 0:e.draggable),droppable:N(N({},Es.droppable),e==null?void 0:e.droppable),dragOverlay:N(N({},Es.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function gN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),f=Iv(d,r);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=Tv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const ks=C.createContext(Q(N({},cn),{scaleX:1,scaleY:1}));var or;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(or||(or={}));const Yv=C.memo(function(t){var n,r,i,o;let Ms=t,{id:a,accessibility:s,autoScroll:l=!0,children:c,sensors:d=lN,collisionDetection:f=S$,measuring:h,modifiers:p}=Ms,m=We(Ms,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=C.useReducer(fN,void 0,dN),[v,S]=g,[I,x]=p$(),[w,y]=C.useState(or.Uninitialized),A=w===or.Initialized,{draggable:{active:E,nodes:_,translate:D},droppable:{containers:G}}=v,F=E!=null?_.get(E):null,T=C.useRef({initial:null,translated:null}),j=C.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=F==null?void 0:F.data)!=null?Ct:cN,rect:T}:null},[E,F]),Y=C.useRef(null),[z,$]=C.useState(null),[B,W]=C.useState(null),q=po(m,Object.values(m)),ee=mo("DndDescribedBy",a),R=C.useMemo(()=>G.getEnabled(),[G]),M=pN(h),{droppableRects:U,measureDroppableContainers:H,measuringScheduled:ne}=J$(R,{dragging:A,dependencies:[D.x,D.y],config:M.droppable}),se=q$(_,E),ae=C.useMemo(()=>B?ys(B):null,[B]),X=un(),le=X$(se,M.draggable.measure);gN({activeNode:E!=null?_.get(E):null,config:X.layoutShiftCompensation,initialRect:le,measure:M.draggable.measure});const re=Nv(se,M.draggable.measure,le),ge=Nv(se?se.parentElement:null),Se=C.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=G.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=sN({measure:M.dragOverlay.measure}),lt=(r=wt.nodeRef.current)!=null?r:se,_t=A?(i=wt.rect)!=null?i:re:null,de=!!(wt.nodeRef.current&&wt.rect),he=tN(de?null:re),xe=jv(lt?Rt(lt):null),Te=nN(A?Ve!=null?Ve:se:null),He=aN(Te),Pe=Gv(p,{transform:{x:D.x-he.x,y:D.y-he.y,scaleX:1,scaleY:1},activatorEvent:B,active:j,activeNodeRect:re,containerNodeRect:ge,draggingNodeRect:_t,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:xe}),Ee=ae?pi(ae,D):null,It=rN(Te),St=zv(It),jt=zv(It,[re]),Lt=pi(Pe,St),qt=_t?E$(_t,Pe):null,ar=j&&qt?f({active:j,collisionRect:qt,droppableRects:U,droppableContainers:R,pointerCoordinates:Ee}):null,Rs=wv(ar,"id"),[In,Io]=C.useState(null),Ru=de?Pe:pi(Pe,jt),Lu=A$(Ru,(o=In==null?void 0:In.rect)!=null?o:null,re),ze=C.useRef(null),mi=C.useCallback((Ct,P)=>{let{sensor:L,options:K}=P;if(Y.current==null)return;const J=_.get(Y.current);if(!J)return;const ie=Ct.nativeEvent,ce=new L({active:Y.current,activeNode:J,event:ie,options:K,context:Se,onAbort(ue){if(!_.get(ue))return;const{onDragAbort:fe}=q.current,me={id:ue};fe==null||fe(me),I({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!_.get(ue))return;const{onDragPending:Pt}=q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(nt),I({type:"onDragPending",event:nt})},onStart(ue){const we=Y.current;if(we==null)return;const fe=_.get(we);if(!fe)return;const{onDragStart:me}=q.current,De={activatorEvent:ie,active:{id:we,data:fe.data,rect:T}};Re.unstable_batchedUpdates(()=>{me==null||me(De),y(or.Initializing),S({type:mt.DragStart,initialCoordinates:ue,active:we}),I({type:"onDragStart",event:De}),$(ze.current),W(ie)})},onMove(ue){S({type:mt.DragMove,coordinates:ue})},onEnd:Ce(mt.DragEnd),onCancel:Ce(mt.DragCancel)});ze.current=ce;function Ce(ue){return function(){return k(this,null,function*(){const{active:fe,collisions:me,over:De,scrollAdjustedTranslate:Pt}=Se.current;let nt=null;if(fe&&Pt){const{cancelDrop:dn}=q.current;nt={activatorEvent:ie,active:fe,collisions:me,delta:Pt,over:De},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}Y.current=null,Re.unstable_batchedUpdates(()=>{S({type:ue}),y(or.Uninitialized),Io(null),$(null),W(null),ze.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(nt){const Sn=q.current[dn];Sn==null||Sn(nt),I({type:dn,event:nt})}})})}}},[_]),So=C.useCallback((Ct,P)=>(L,K)=>{const J=L.nativeEvent,ie=_.get(K);if(Y.current!==null||!ie||J.dndKit||J.defaultPrevented)return;const ce={active:ie};Ct(L,P.options,ce)===!0&&(J.dndKit={capturedBy:P.sensor},Y.current=K,mi(L,P))},[_,mi]),Ls=Q$(d,So);iN(d),ln(()=>{re&&w===or.Initializing&&y(or.Initialized)},[re,w]),C.useEffect(()=>{const{onDragMove:Ct}=q.current,{active:P,activatorEvent:L,collisions:K,over:J}=Se.current;if(!P||!L)return;const ie={active:P,activatorEvent:L,collisions:K,delta:{x:Lt.x,y:Lt.y},over:J};Re.unstable_batchedUpdates(()=>{Ct==null||Ct(ie),I({type:"onDragMove",event:ie})})},[Lt.x,Lt.y]),C.useEffect(()=>{const{active:Ct,activatorEvent:P,collisions:L,droppableContainers:K,scrollAdjustedTranslate:J}=Se.current;if(!Ct||Y.current==null||!P||!J)return;const{onDragOver:ie}=q.current,ce=K.get(Rs),Ce=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:Ct,activatorEvent:P,collisions:L,delta:{x:J.x,y:J.y},over:Ce};Re.unstable_batchedUpdates(()=>{Io(Ce),ie==null||ie(ue),I({type:"onDragOver",event:ue})})},[Rs]),ln(()=>{Se.current={activatorEvent:B,active:j,activeNode:se,collisionRect:qt,collisions:ar,droppableRects:U,draggableNodes:_,draggingNode:lt,draggingNodeRect:_t,droppableContainers:G,over:In,scrollableAncestors:Te,scrollAdjustedTranslate:Lt},T.current={initial:_t,translated:qt}},[j,se,ar,qt,_,lt,_t,U,G,In,Te,Lt]),G$(Q(N({},X),{delta:D,draggingRect:qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const vi=C.useMemo(()=>({active:j,activeNode:se,activeNodeRect:re,activatorEvent:B,collisions:ar,containerNodeRect:ge,dragOverlay:wt,draggableNodes:_,droppableContainers:G,droppableRects:U,over:In,measureDroppableContainers:H,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:M,measuringScheduled:ne,windowRect:xe}),[j,se,re,B,ar,ge,wt,_,G,U,In,H,Te,He,M,ne,xe]),Ao=C.useMemo(()=>({activatorEvent:B,activators:Ls,active:j,activeNodeRect:re,ariaDescribedById:{draggable:ee},dispatch:S,draggableNodes:_,over:In,measureDroppableContainers:H}),[B,Ls,j,re,S,ee,_,In,H]);return C.createElement(yv.Provider,{value:x},C.createElement(wo.Provider,{value:Ao},C.createElement(Wv.Provider,{value:vi},C.createElement(ks.Provider,{value:Lu},c)),C.createElement(hN,{disabled:(s==null?void 0:s.restoreFocus)===!1})),C.createElement(v$,Q(N({},s),{hiddenTextDescribedById:ee})));function un(){const Ct=(z==null?void 0:z.autoScrollEnabled)===!1,P=typeof l=="object"?l.enabled===!1:l===!1,L=A&&!Ct&&!P;return typeof l=="object"?Q(N({},l),{enabled:L}):{enabled:L}}}),mN=C.createContext(null),Kv="button",vN="Draggable";function bN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=mo(vN),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=C.useContext(wo),{role:p=Kv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},v=(l==null?void 0:l.id)===t,S=C.useContext(v?ks:mN),[I,x]=ms(),[w,y]=ms(),A=oN(a,t),E=po(n);ln(()=>(f.set(t,{id:t,key:o,node:I,activatorNode:w,data:E}),()=>{const D=f.get(t);D&&D.key===o&&f.delete(t)}),[f,t]);const _=C.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&p===Kv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:_,isDragging:v,listeners:r?void 0:A,node:I,over:h,setNodeRef:x,setActivatorNodeRef:y,transform:S}}function qv(){return C.useContext(Wv)}const yN="Droppable",xN={timeout:25};function CN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=mo(yN),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=C.useContext(wo),d=C.useRef({disabled:n}),f=C.useRef(!1),h=C.useRef(null),p=C.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:v}=N(N({},xN),i),S=po(g!=null?g:r),I=C.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),p.current=null},v)},[v]),x=Ts({callback:I,disabled:m||!a}),w=C.useCallback((_,D)=>{x&&(D&&(x.unobserve(D),f.current=!1),_&&x.observe(_))},[x]),[y,A]=ms(w),E=po(t);return C.useEffect(()=>{!x||!y.current||(x.disconnect(),f.current=!1,x.observe(y.current))},[y,x]),C.useEffect(()=>(s({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:y,rect:h,data:E}}),()=>s({type:mt.UnregisterDroppable,key:o,id:r})),[r]),C.useEffect(()=>{n!==d.current.disabled&&(s({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,s]),{active:a,rect:h,isOver:(l==null?void 0:l.id)===r,node:y,over:l,setNodeRef:A}}function wN(e){let{animation:t,children:n}=e;const[r,i]=C.useState(null),[o,a]=C.useState(null),s=vs(n);return!n&&!r&&s&&i(s),ln(()=>{if(!o)return;const l=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(l==null||c==null){i(null);return}Promise.resolve(t(c,o)).then(()=>{i(null)})},[t,r,o]),C.createElement(C.Fragment,null,n,r?C.cloneElement(r,{ref:a}):null)}const IN={x:0,y:0,scaleX:1,scaleY:1};function SN(e){let{children:t}=e;return C.createElement(wo.Provider,{value:Hv},C.createElement(ks.Provider,{value:IN},t))}const AN={position:"fixed",touchAction:"none"},TN=e=>bs(e)?"transform 250ms ease":void 0,EN=C.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:c,transition:d=TN}=e;if(!s)return null;const f=i?c:Q(N({},c),{scaleX:1,scaleY:1}),h=N(Q(N({},AN),{width:s.width,height:s.height,top:s.top,left:s.left,transform:Hn.Transform.toString(f),transformOrigin:i&&r?y$(r,s):void 0,transition:typeof d=="function"?d(r):d}),l);return C.createElement(n,{className:a,style:h,ref:t},o)}),Qv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,c]of Object.entries(i))n.node.style.setProperty(l,c);a!=null&&a.active&&n.node.classList.remove(a.active)}},kN={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Hn.Transform.toString(t)},{transform:Hn.Transform.toString(n)}]},sideEffects:Qv({styles:{active:{opacity:"0"}}})};function _N(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return gs((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const c=Vv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=Sv(d);if(!f)return;const h=typeof t=="function"?t:PN(t);return Ov(l,i.draggable.measure),h({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function PN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=N(N({},kN),e);return o=>{let I=o,{active:a,dragOverlay:s,transform:l}=I,c=We(I,["active","dragOverlay","transform"]);if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},f={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},h=N({x:l.x-d.x,y:l.y-d.y},f),p=i(Q(N({},c),{active:a,dragOverlay:s,transform:{initial:l,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const v=r==null?void 0:r(N({active:a,dragOverlay:s},c)),S=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{S.onfinish=()=>{v==null||v(),x()}})}}let Jv=0;function DN(e){return C.useMemo(()=>{if(e!=null)return Jv++,Jv},[e])}const ON=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:v,over:S,measuringConfiguration:I,scrollableAncestors:x,scrollableAncestorRects:w,windowRect:y}=qv(),A=C.useContext(ks),E=DN(f==null?void 0:f.id),_=Gv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:S,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:w,transform:A,windowRect:y}),D=Ou(h),G=_N({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:I}),F=D?v.setRef:void 0;return C.createElement(SN,null,C.createElement(wN,{animation:G},f&&E?C.createElement(EN,{key:E,id:f.id,ref:F,as:s,activatorEvent:d,adjustScale:t,className:l,transition:o,rect:D,style:N({zIndex:c},i),transform:_},n):null))});function _s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function RN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ps(e){return e!==null&&e>=0}function LN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function MN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Xv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_s(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},Zv="Sortable",eb=C.createContext({activeIndex:-1,containerId:Zv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Xv,disabled:{draggable:!1,droppable:!1}});function tb(e){let{children:t,id:n,items:r,strategy:i=Xv,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:d}=qv(),f=mo(Zv,n),h=s.rect!==null,p=C.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,S=C.useRef(p),I=!LN(p,S.current),x=v!==-1&&g===-1||I,w=MN(o);ln(()=>{I&&m&&d(p)},[I,p,m,d]),C.useEffect(()=>{S.current=p},[p]);const y=C.useMemo(()=>({activeIndex:g,containerId:f,disabled:w,disableTransforms:x,items:p,overIndex:v,useDragOverlay:h,sortedRects:RN(p,l),strategy:i}),[g,f,w.draggable,w.droppable,x,p,v,l,h,i]);return C.createElement(eb.Provider,{value:y},t)}const BN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _s(n,r,i).indexOf(t)},$N=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===l},NN={duration:200,easing:"ease"},nb="transform",FN=Hn.Transition.toString({property:nb,duration:0,easing:"linear"}),zN={roleDescription:"sortable"};function jN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=C.useState(null),s=C.useRef(n);return ln(()=>{if(!t&&n!==s.current&&r.current){const l=i.current;if(l){const c=gi(r.current,{ignoreTransform:!0}),d={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(d.x||d.y)&&a(d)}}n!==s.current&&(s.current=n)},[t,n,r,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function rb(e){let{animateLayoutChanges:t=$N,attributes:n,disabled:r,data:i,getNewIndex:o=BN,id:a,strategy:s,resizeObserverConfig:l,transition:c=NN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:v,useDragOverlay:S,strategy:I}=C.useContext(eb),x=UN(r,p),w=d.indexOf(a),y=C.useMemo(()=>N({sortable:{containerId:f,index:w,items:d}},i),[f,i,w,d]),A=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:_,isOver:D,setNodeRef:G}=CN({id:a,data:y,disabled:x.droppable,resizeObserverConfig:N({updateMeasurementsFor:A},l)}),{active:F,activatorEvent:T,activeNodeRect:j,attributes:Y,setNodeRef:z,listeners:$,isDragging:B,over:W,setActivatorNodeRef:q,transform:ee}=bN({id:a,data:y,attributes:N(N({},zN),n),disabled:x.draggable}),R=i$(G,z),M=!!F,U=M&&!m&&Ps(h)&&Ps(v),H=!S&&B,ne=H&&U?ee:null,se=s!=null?s:I,ae=U?ne!=null?ne:se({rects:g,activeNodeRect:j,activeIndex:h,overIndex:v,index:w}):null,X=Ps(h)&&Ps(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):w,le=F==null?void 0:F.id,re=C.useRef({activeId:le,items:d,newIndex:X,containerId:f}),ge=d!==re.current.items,Se=t({active:F,containerId:f,isDragging:B,isSorting:M,id:a,index:w,items:d,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:c,wasDragging:re.current.activeId!=null}),Ve=jN({disabled:!Se,index:w,node:_,rect:E});return C.useEffect(()=>{M&&re.current.newIndex!==X&&(re.current.newIndex=X),f!==re.current.containerId&&(re.current.containerId=f),d!==re.current.items&&(re.current.items=d)},[M,X,f,d]),C.useEffect(()=>{if(le===re.current.activeId)return;if(le!=null&&re.current.activeId==null){re.current.activeId=le;return}const lt=setTimeout(()=>{re.current.activeId=le},50);return()=>clearTimeout(lt)},[le]),{active:F,activeIndex:h,attributes:Y,data:y,rect:E,index:w,newIndex:X,items:d,isOver:D,isSorting:M,isDragging:B,listeners:$,node:_,overIndex:v,over:W,setNodeRef:R,setActivatorNodeRef:q,setDroppableNodeRef:G,setDraggableNodeRef:z,transform:Ve!=null?Ve:ae,transition:wt()};function wt(){if(Ve||ge&&re.current.newIndex===w)return FN;if(!(H&&!bs(T)||!c)&&(M||Se))return Hn.Transition.toString(Q(N({},c),{property:nb}))}}function UN(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Ds(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const VN=[ke.Down,ke.Right,ke.Up,ke.Left],ib=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(VN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case ke.Down:r.top<h.top&&l.push(f);break;case ke.Up:r.top>h.top&&l.push(f);break;case ke.Left:r.left>h.left&&l.push(f);break;case ke.Right:r.left<h.left&&l.push(f);break}});const c=w$({active:n,collisionRect:r,droppableRects:i,droppableContainers:l,pointerCoordinates:null});let d=wv(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[1].id),d!=null){const f=o.get(n.id),h=o.get(d),p=h?i.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&p&&f&&h){const v=ws(m).some((A,E)=>s[E]!==A),S=ob(f,h),I=HN(f,h),x=v||!S?{x:0,y:0}:{x:I?r.width-p.width:0,y:I?r.height-p.height:0},w={x:p.left,y:p.top};return x.x&&x.y?w:vo(w,x)}}}};function ob(e,t){return!Ds(e)||!Ds(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function HN(e,t){return!Ds(e)||!Ds(t)||!ob(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const ab=Ue(u.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),Os=C.createContext({attributes:{},listeners:void 0,ref(){}}),WN=()=>{const{attributes:e,listeners:t,ref:n}=C.useContext(Os);return u.jsx(b.Button,Q(N(N({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(ab,{})}))},sb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:s,listeners:l,setNodeRef:c,setActivatorNodeRef:d,transform:f,transition:h}=rb({id:t}),p=C.useMemo(()=>({attributes:a,listeners:l,ref:d}),[a,l,d]),m={opacity:s?.6:void 0,transform:Hn.Translate.toString(f),transition:h};return u.jsx(Os.Provider,{value:p,children:u.jsx(b.ListItem,{variant:o,ref:c,style:m,startAction:i?u.jsx(WN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(b.Tooltip,{title:n,children:u.jsx(b.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:u.jsx(Oe.Remove,{})})}):u.jsx(u.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},GN={sideEffects:Qv({styles:{active:{opacity:"0.6"}}})},lb=({children:e})=>u.jsx(ON,{dropAnimation:GN,children:e}),YN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=C.useState(null),s=C.useMemo(()=>e.find(c=>c.id===(o==null?void 0:o.id)),[o,e]),l=xv(Cs(Ss),Cs(Is,{coordinateGetter:ib}));return u.jsxs(Yv,{sensors:l,onDragStart:({active:c})=>{a(c)},onDragEnd:({active:c,over:d})=>{if(d&&c.id!==(d==null?void 0:d.id)){const f=e.findIndex(({id:p})=>p===c.id),h=e.findIndex(({id:p})=>p===d.id);r(_s(e,f,h))}a(null)},onDragCancel:()=>{a(null)},children:[u.jsx(tb,{items:e,children:u.jsx(b.List,{sx:{gap:"10px",padding:0},children:e.map(c=>u.jsxs(sb,{id:c.id,variant:"outlined",removeItem:()=>i(c.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[u.jsx(b.Typography,{ml:n?0:2.5,children:c.title||c.name}),c.type&&u.jsx(b.Chip,{color:dB(c.type),sx:{marginLeft:2,marginRight:4},children:fB(c.type)})]},`sortable-item-${c.id}`))})}),u.jsx(lb,{children:s?u.jsx(u.Fragment,{children:e.map(c=>u.jsx(sb,{id:c.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${c.id}`))}):u.jsx(u.Fragment,{})})]})},KN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>u.jsxs(b.FormControl,{size:r,disabled:i,children:[u.jsx(b.FormLabel,{children:e.itemsPerPage}),u.jsx(b.Select,{value:t,size:r,onChange:a,sx:Q(N({},o),{minHeight:"37px"}),children:n.map((s,l)=>u.jsx(b.Option,{value:s,children:s},`items-per-page-${s}-${l}`))})]}),qN=(e,t)=>{const[n,r]=C.useState(null),{sdk:i}=ft(),o=()=>k(this,null,function*(){let s=[];if(!e){r(s);return}try{switch(e){case"top_x":s=(yield i.topX.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":s=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"template":s=(yield i.loyalty.getTemplates(void 0,!0)).data.map(v=>({id:v.id,name:v.name,status:v.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":s=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"either_or":s=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"poll":s=(yield i.voting.getPolls({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"bracket":s=(yield i.bracketGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"standing":s=(yield i.standingGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break}}catch(l){console.error(l),r(s),t();return}r(s)});return C.useEffect(()=>(o(),()=>r(null)),[e]),n},QN=({status:e})=>{let t="neutral";switch(e){case"DYNAMIC":t="primary";break;case"CUSTOM":t="success";break;case"OPEN":t="primary";break;case"LIVE":t="primary";break;case"CANCELED":t="warning";break;case"SETTLED":t="success";break;case"INACTIVE":t="danger";break;case"ACTIVE":t="success";break;case"EXPIRED":t="neutral";break}return u.jsx(b.Chip,{color:t,variant:"solid",size:"sm",children:e})},JN=Ue(u.jsx("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),XN=Ue(u.jsx("path",{d:"m21.58 16.09-1.09-7.66C20.21 6.46 18.52 5 16.53 5H7.47C5.48 5 3.79 6.46 3.51 8.43l-1.09 7.66C2.2 17.63 3.39 19 4.94 19c.68 0 1.32-.27 1.8-.75L9 16h6l2.25 2.25c.48.48 1.13.75 1.8.75 1.56 0 2.75-1.37 2.53-2.91M11 11H9v2H8v-2H6v-1h2V8h1v2h2zm4-1c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"SportsEsports"),ZN=Ue(u.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),eF=Ue(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),tF=Ue(u.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z"}),"Poll"),nF=e=>{switch(e.entityType){case"top_x":return u.jsx(b.Tooltip,{title:"Top X",children:u.jsx(JN,{})});case"match_quiz":return u.jsx(b.Tooltip,{title:"Match Quiz",children:u.jsx(XN,{})});case"template":return u.jsx(b.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Oe.EmojiEvents,{})});case"classic_quiz":return u.jsx(b.Tooltip,{title:"Classic Quiz",children:u.jsx(ZN,{})});case"either_or":return u.jsx(b.Tooltip,{title:"Either/Or",children:u.jsx(eF,{})});case"poll":return u.jsx(b.Tooltip,{title:"Poll",children:u.jsx(tF,{})});case"bracket":return u.jsx(b.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Oe.EmojiEvents,{})});case"standing":return u.jsx(b.Tooltip,{title:"Custom Standings Game",children:u.jsx(Oe.EmojiEvents,{})});default:return null}},rF=({entity:e,deleteLabel:t,onDelete:n})=>u.jsx(u.Fragment,{children:u.jsx(b.Card,{sx:{p:2,mb:2},children:u.jsx(b.CardContent,{children:u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(b.Typography,{fontSize:"sm",startDecorator:u.jsx(nF,{entityType:e.type}),children:e.name}),u.jsx(b.Box,{display:{xs:"none",md:"block"},children:u.jsx(QN,{status:e.status})}),u.jsx(b.Box,{children:u.jsx(b.Tooltip,{title:t,children:u.jsx(b.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:u.jsx(Oe.Delete,{})})})})]})})})}),iF=(e,t,n,r)=>k(this,null,function*(){let o=[];const a=new Map;t.forEach(s=>{if(a.has(s.entity_type)){const l=a.get(s.entity_type);a.set(s.entity_type,[...l,[s.entity_id,s.entity_relationship]])}else a.set(s.entity_type,[[s.entity_id,s.entity_relationship]])});try{for(const[s,l]of a)switch(s){case"top_x":const c=l.map(([D])=>D),d=yield e.topX.getGames({limit:c.length,gameIds:c},!0);o=[...o,...d.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"match_quiz":const f=l.map(([D])=>D),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"template":const p=l.map(([D])=>D),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(D=>p.includes(D.id)).map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"classic_quiz":const g=l.map(([D])=>D),v=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...v.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"either_or":const S=l.map(([D])=>D),I=yield e.miniGames.getEitherOrs({limit:S.length,eitherOrIds:S},!1,!0);o=[...o,...I.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"poll":const x=l.map(([D])=>D),w=yield e.voting.getPolls({limit:x.length,pollIds:x},!0);o=[...o,...w.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"bracket":const y=l.map(([D])=>D),A=yield e.bracketGame.getGames({limit:y.length,gameIds:y},!0);o=[...o,...A.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"standing":const E=l.map(([D])=>D),_=yield e.standingGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,..._.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;default:}}catch(s){console.error("Error loading related entities",s),n(o),r()}n(o)}),oF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],aF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],sF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),cb=new Map().set("relatedTo","Related to").set("blocks","Blocks").set("blockedBy","Blocked by").set("nextInSeries","Next in series").set("previousInSeries","Previous in series").set("bonusPointsGame","Bonus points game"),lF=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState(""),[s,l]=C.useState(null),[c,d]=C.useState("relatedTo"),[f,h]=C.useState(!1),p=()=>h(!f),m=qN(s,p),{sdk:g}=ft();C.useEffect(()=>(e.length>0&&iF(g,e,i,p),()=>{i([]),a(""),l(null),d("relatedTo")}),[]);const v=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===c)){a("");return}const y=[...e,{entity_id:o,entity_type:s,entity_relationship:c}],A=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:s,status:E.status,relationship:c})))||[];i([...r,...A]),t(y),a("")},S=(w,y)=>{const A=e.filter(_=>!(_.entity_id===w&&_.entity_relationship===y)),E=r.filter(_=>!(_.id===w&&_.relationship===y));i(E),t(A)},I=r.reduce((w,y)=>{const A=y.relationship;return w[A]||(w[A]=[]),w[A].push(y),w},{}),x=Object.keys(I).sort();return u.jsxs(u.Fragment,{children:[x.map(w=>u.jsxs(b.Box,{sx:{mb:2},children:[u.jsx(b.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(b.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:cb.get(w)||"Unknown relationship"})}),I[w].map((y,A)=>u.jsx(rF,{entity:y,deleteLabel:n.delete,onDelete:S},`related-entity-relationship-${y.id}-${A}`))]},`relationship-group-${w}`)),u.jsxs(b.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(b.Select,{value:s,size:"sm",name:"entity_type",onChange:(w,y)=>l(y),sx:{minHeight:"37px"},children:oF.map(w=>u.jsx(b.Option,{value:w,children:sF.get(w)},`entity-type-option-${w}`))})]}),u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(b.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(w,y)=>d(y),sx:{minHeight:"37px"},children:aF.map(w=>u.jsx(b.Option,{value:w,children:cb.get(w)},`entity-relationship-option-${w}`))})]}),u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsx(b.Select,{value:o,size:"sm",name:"entity_id",onChange:(w,y)=>a(y),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&u.jsx(b.CircularProgress,{size:"sm"}),children:m&&m.map(w=>u.jsx(b.Option,{value:w.id,children:w.name},`entity--${w.id}`))})]}),u.jsx(b.Button,{startDecorator:u.jsx(Oe.Add,{}),disabled:!o||!s,onClick:v,sx:{mb:1},children:n.add})]}),u.jsx(at,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},cF=e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState("success"),[s,l]=C.useState(""),c=C.useContext(Zo),d=(h,p)=>{a(h),l(p),i(!0)},f=()=>k(this,null,function*(){n(!0);const h=yield c==null?void 0:c.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const p=yield h.blob(),m=URL.createObjectURL(p),g=document.createElement("a");g.href=m,g.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(m),n(!1),d("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),d("danger",e.labels.usersLeadsExportErrorMessage)});return u.jsxs(u.Fragment,{children:[u.jsxs(b.Box,{mb:2,children:[u.jsx(b.Box,{display:"flex",alignItems:"center",mb:1,children:u.jsx(b.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),u.jsx(b.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:u.jsxs(b.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left",width:"50%"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.category}),u.jsx("th",{children:e.labels.action})]})}),u.jsx("tbody",{children:u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx(b.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),u.jsx(b.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),u.jsx("td",{children:u.jsx(b.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),u.jsx(at,{showToast:r,color:o,message:s,hideToast:()=>i(!1)})]})},uF=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=C.useContext(Os);return u.jsx(b.Tooltip,{title:e,placement:"left",arrow:!0,children:u.jsx(b.IconButton,Q(N(N({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:u.jsx(ab,{})}))})},ub=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:s,setNodeRef:l,setActivatorNodeRef:c,transform:d,transition:f}=rb({id:e}),h=C.useMemo(()=>({attributes:o,listeners:s,ref:c}),[o,s,c]),p={opacity:a?.6:void 0,transform:Hn.Translate.toString(d),transition:f},m=v=>v.split(" ").map(S=>S[0]).join("").toUpperCase().substring(0,2),g=v=>r!=null&&r.color?r.color:`hsl(${v.split("").reduce((x,w)=>w.charCodeAt(0)+((x<<5)-x),0)%360}, 70%, 80%)`;return u.jsx(Os.Provider,{value:h,children:u.jsx(b.ListItem,{variant:n,ref:l,style:p,endAction:t?u.jsx(uF,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:u.jsxs(b.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[u.jsx(b.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:g(r.name)}}),u.jsx(b.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:g(r.name),my:2,ml:1},children:m(r.name)}),u.jsxs(b.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[u.jsx(b.Typography,{level:"title-md",children:r.name}),r.description&&u.jsx(b.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),u.jsx(b.Box,{sx:{mt:.5},children:r.type&&u.jsx(b.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${g(r.type)}40`},children:r.type})})]})]})})})},dF=({items:e=[],labels:t,setItems:n})=>{const[r,i]=C.useState(null),o=C.useMemo(()=>e.find(s=>s.id===(r==null?void 0:r.id)),[r,e]),a=xv(Cs(Ss,{activationConstraint:{distance:8}}),Cs(Is,{coordinateGetter:ib}));return e.length===0?u.jsx(b.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:u.jsx(b.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):u.jsxs(Yv,{sensors:a,onDragStart:({active:s})=>{i(s)},onDragEnd:({active:s,over:l})=>{if(l&&s.id!==(l==null?void 0:l.id)){const c=e.findIndex(({id:f})=>f===s.id),d=e.findIndex(({id:f})=>f===l.id);n(_s(e,c,d))}i(null)},onDragCancel:()=>{i(null)},children:[u.jsx(tb,{items:e,children:u.jsx(b.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(s=>u.jsx(ub,{id:s.id,variant:"outlined",item:s,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${s.id}`))})}),u.jsx(lb,{children:o?u.jsx(ub,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},fF=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const[i,o]=C.useState(!1),[a,s]=C.useState([]),[l,c]=C.useState("before"),[d,f]=C.useState(!1),[h,p]=C.useState(""),[m,g]=C.useState(""),v=`
|
|
2475
|
+
`},m$={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function v$(e){let{announcements:t=m$,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=g$}=e;const{announce:o,announcement:a}=f$(),s=mo("DndLiveRegion"),[l,c]=C.useState(!1);if(C.useEffect(()=>{c(!0)},[]),h$(C.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&o(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;o(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;o(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;o(t.onDragCancel({active:h,over:p}))}}),[o,t])),!l)return null;const d=C.createElement(C.Fragment,null,C.createElement(u$,{id:r,value:i.draggable}),C.createElement(d$,{id:s,announcement:a}));return n?Re.createPortal(d,n):d}var mt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(mt||(mt={}));function xs(){}function Cs(e,t){return C.useMemo(()=>({sensor:e,options:t!=null?t:{}}),[e,t])}function xv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return C.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const cn=Object.freeze({x:0,y:0});function b$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y$(e,t){const n=ys(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function x$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function C$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Cv(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function wv(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}const w$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=Cv(t),o=[];for(const a of r){const{id:s}=a,l=n.get(s);if(l){const c=Cv(l),d=i.reduce((h,p,m)=>h+b$(c[m],p),0),f=Number((d/4).toFixed(4));o.push({id:s,data:{droppableContainer:a,value:f}})}}return o.sort(x$)};function I$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,d=a*s,f=d/(l+c-d);return Number(f.toFixed(4))}return 0}const S$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:a}=o,s=n.get(a);if(s){const l=I$(s,t);l>0&&i.push({id:a,data:{droppableContainer:o,value:l}})}}return i.sort(C$)};function A$(e,t,n){return q(N({},e),{scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1})}function Iv(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:cn}function T$(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((a,s)=>q(N({},a),{top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),N({},n))}}const E$=T$(1);function Sv(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function k$(e,t,n){const r=Sv(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),c=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:l+d,bottom:c+f,left:l}}const _$={ignoreTransform:!1};function gi(e,t){t===void 0&&(t=_$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:d}=Rt(e).getComputedStyle(e);c&&(n=k$(n,c,d))}const{top:r,left:i,width:o,height:a,bottom:s,right:l}=n;return{top:r,left:i,width:o,height:a,bottom:s,right:l}}function Av(e){return gi(e,{ignoreTransform:!0})}function P$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function D$(e,t){return t===void 0&&(t=Rt(e).getComputedStyle(e)),t.position==="fixed"}function O$(e,t){t===void 0&&(t=Rt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function ws(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(wu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ho(i)||mv(i)||n.includes(i))return n;const o=Rt(e).getComputedStyle(i);return i!==e&&O$(i,o)&&n.push(i),D$(i,o)?n:r(i.parentNode)}return e?r(e):n}function Tv(e){const[t]=ws(e,1);return t!=null?t:null}function Su(e){return!ps||!e?null:fi(e)?e:Cu(e)?wu(e)||e===hi(e).scrollingElement?window:ho(e)?e:null:null}function Ev(e){return fi(e)?e.scrollX:e.scrollLeft}function kv(e){return fi(e)?e.scrollY:e.scrollTop}function Au(e){return{x:Ev(e),y:kv(e)}}var xt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(xt||(xt={}));function _v(e){return!ps||!e?!1:e===document.scrollingElement}function Pv(e){const t={x:0,y:0},n=_v(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const R$={x:.2,y:.2};function L$(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=R$);const{isTop:c,isBottom:d,isLeft:f,isRight:h}=Pv(e),p={x:0,y:0},m={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+g.height?(p.y=xt.Backward,m.y=r*Math.abs((t.top+g.height-o)/g.height)):!d&&l>=t.bottom-g.height&&(p.y=xt.Forward,m.y=r*Math.abs((t.bottom-g.height-l)/g.height)),!h&&s>=t.right-g.width?(p.x=xt.Forward,m.x=r*Math.abs((t.right-g.width-s)/g.width)):!f&&a<=t.left+g.width&&(p.x=xt.Backward,m.x=r*Math.abs((t.left+g.width-a)/g.width)),{direction:p,speed:m}}function M$(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Dv(e){return e.reduce((t,n)=>pi(t,Au(n)),cn)}function B$(e){return e.reduce((t,n)=>t+Ev(n),0)}function $$(e){return e.reduce((t,n)=>t+kv(n),0)}function Ov(e,t){if(t===void 0&&(t=gi),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);Tv(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const N$=[["x",["left","right"],B$],["y",["top","bottom"],$$]];class Tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=ws(n),i=Dv(r);this.rect=N({},t),this.width=t.width,this.height=t.height;for(const[o,a,s]of N$)for(const l of a)Object.defineProperty(this,l,{get:()=>{const c=s(r),d=i[o]-c;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class bo{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function F$(e){const{EventTarget:t}=Rt(e);return e instanceof t?e:hi(e)}function Eu(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(bi(n,2)+bi(r,2))>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var on;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(on||(on={}));function Rv(e){e.preventDefault()}function z$(e){e.stopPropagation()}var ke;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ke||(ke={}));const Lv={start:[ke.Space,ke.Enter],cancel:[ke.Esc],end:[ke.Space,ke.Enter,ke.Tab]},j$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ke.Right:return q(N({},n),{x:n.x+25});case ke.Left:return q(N({},n),{x:n.x-25});case ke.Down:return q(N({},n),{y:n.y+25});case ke.Up:return q(N({},n),{y:n.y-25})}};class Is{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new bo(hi(n)),this.windowListeners=new bo(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(on.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Ov(r),n(cn)}handleKeyDown(t){if(bs(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Lv,coordinateGetter:a=j$,scrollBehavior:s="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:cn;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const h=vo(f,d),p={x:0,y:0},{scrollableAncestors:m}=r.current;for(const g of m){const v=t.code,{isTop:S,isRight:I,isLeft:x,isBottom:w,maxScroll:y,minScroll:A}=Pv(g),E=M$(g),_={x:Math.min(v===ke.Right?E.right-E.width/2:E.right,Math.max(v===ke.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(v===ke.Down?E.bottom-E.height/2:E.bottom,Math.max(v===ke.Down?E.top:E.top+E.height/2,f.y))},D=v===ke.Right&&!I||v===ke.Left&&!x,G=v===ke.Down&&!w||v===ke.Up&&!S;if(D&&_.x!==f.x){const F=g.scrollLeft+h.x,T=v===ke.Right&&F<=y.x||v===ke.Left&&F>=A.x;if(T&&!h.y){g.scrollTo({left:F,behavior:s});return}T?p.x=g.scrollLeft-F:p.x=v===ke.Right?g.scrollLeft-y.x:g.scrollLeft-A.x,p.x&&g.scrollBy({left:-p.x,behavior:s});break}else if(G&&_.y!==f.y){const F=g.scrollTop+h.y,T=v===ke.Down&&F<=y.y||v===ke.Up&&F>=A.y;if(T&&!h.x){g.scrollTo({top:F,behavior:s});return}T?p.y=g.scrollTop-F:p.y=v===ke.Down?g.scrollTop-y.y:g.scrollTop-A.y,p.y&&g.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,pi(vo(f,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Is.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Lv,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Mv(e){return!!(e&&"distance"in e)}function Bv(e){return!!(e&&"delay"in e)}class ku{constructor(t,n,r){var i;r===void 0&&(r=F$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:a}=o;this.props=t,this.events=n,this.document=hi(a),this.documentListeners=new bo(this.document),this.listeners=new bo(r),this.windowListeners=new bo(Rt(a)),this.initialCoordinates=(i=ys(o))!=null?i:cn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(on.Resize,this.handleCancel),this.windowListeners.add(on.DragStart,Rv),this.windowListeners.add(on.VisibilityChange,this.handleCancel),this.windowListeners.add(on.ContextMenu,Rv),this.documentListeners.add(on.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Mv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(on.Click,z$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(on.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const l=(n=ys(t))!=null?n:cn,c=vo(i,l);if(!r&&s){if(Mv(s)){if(s.tolerance!=null&&Eu(c,s.tolerance))return this.handleCancel();if(Eu(c,s.distance))return this.handleStart()}if(Bv(s)&&Eu(c,s.tolerance))return this.handleCancel();this.handlePending(s,c);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ke.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const U$={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ss extends ku{constructor(t){const{event:n}=t,r=hi(n.target);super(t,U$,r)}}Ss.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const V$={move:{name:"mousemove"},end:{name:"mouseup"}};var _u;(function(e){e[e.RightClick=2]="RightClick"})(_u||(_u={}));class H$ extends ku{constructor(t){super(t,V$,hi(t.event.target))}}H$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===_u.RightClick?!1:(r==null||r({event:n}),!0)}}];const Pu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class W$ extends ku{constructor(t){super(t,Pu)}static setup(){return window.addEventListener(Pu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Pu.move.name,t)};function t(){}}}W$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r==null||r({event:n}),!0)}}];var yo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(yo||(yo={}));var As;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(As||(As={}));function G$(e){let{acceleration:t,activator:n=yo.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:a=5,order:s=As.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:d,delta:f,threshold:h}=e;const p=K$({delta:f,disabled:!o}),[m,g]=o$(),v=C.useRef({x:0,y:0}),S=C.useRef({x:0,y:0}),I=C.useMemo(()=>{switch(n){case yo.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case yo.DraggableRect:return i}},[n,i,l]),x=C.useRef(null),w=C.useCallback(()=>{const A=x.current;if(!A)return;const E=v.current.x*S.current.x,_=v.current.y*S.current.y;A.scrollBy(E,_)},[]),y=C.useMemo(()=>s===As.TreeOrder?[...c].reverse():c,[s,c]);C.useEffect(()=>{if(!o||!c.length||!I){g();return}for(const A of y){if((r==null?void 0:r(A))===!1)continue;const E=c.indexOf(A),_=d[E];if(!_)continue;const{direction:D,speed:G}=L$(A,_,I,t,h);for(const F of["x","y"])p[F][D[F]]||(G[F]=0,D[F]=0);if(G.x>0||G.y>0){g(),x.current=A,m(w,a),v.current=G,S.current=D;return}}v.current={x:0,y:0},S.current={x:0,y:0},g()},[t,w,r,g,o,a,JSON.stringify(I),JSON.stringify(p),m,c,y,d,JSON.stringify(h)])}const Y$={x:{[xt.Backward]:!1,[xt.Forward]:!1},y:{[xt.Backward]:!1,[xt.Forward]:!1}};function K$(e){let{delta:t,disabled:n}=e;const r=vs(t);return go(i=>{if(n||!r||!i)return Y$;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[xt.Backward]:i.x[xt.Backward]||o.x===-1,[xt.Forward]:i.x[xt.Forward]||o.x===1},y:{[xt.Backward]:i.y[xt.Backward]||o.y===-1,[xt.Forward]:i.y[xt.Forward]||o.y===1}}},[n,t,r])}function Q$(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return go(i=>{var o;return t==null?null:(o=r!=null?r:i)!=null?o:null},[r,t])}function q$(e,t){return C.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...o]},[]),[e,t])}var xo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(xo||(xo={}));var Du;(function(e){e.Optimized="optimized"})(Du||(Du={}));const $v=new Map;function J$(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,a]=C.useState(null),{frequency:s,measure:l,strategy:c}=i,d=C.useRef(e),f=v(),h=po(f),p=C.useCallback(function(S){S===void 0&&(S=[]),!h.current&&a(I=>I===null?S:I.concat(S.filter(x=>!I.includes(x))))},[h]),m=C.useRef(null),g=go(S=>{if(f&&!n)return $v;if(!S||S===$v||d.current!==e||o!=null){const I=new Map;for(let x of e){if(!x)continue;if(o&&o.length>0&&!o.includes(x.id)&&x.rect.current){I.set(x.id,x.rect.current);continue}const w=x.node.current,y=w?new Tu(l(w),w):null;x.rect.current=y,y&&I.set(x.id,y)}return I}return S},[e,o,n,f,l]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{f||p()},[n,f]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{f||typeof s!="number"||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,f,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:o!=null};function v(){switch(c){case xo.Always:return!1;case xo.BeforeDragging:return n;default:return!n}}}function Ou(e,t){return go(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function X$(e,t){return Ou(e,t)}function Z$(e){let{callback:t,disabled:n}=e;const r=gs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Ts(e){let{callback:t,disabled:n}=e;const r=gs(t),i=C.useMemo(()=>{if(n||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function eN(e){return new Tu(gi(e),e)}function Nv(e,t,n){t===void 0&&(t=eN);const[r,i]=C.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l!=null?l:n)!=null?c:null}const d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}const a=Z$({callback(l){if(e)for(const c of l){const{type:d,target:f}=c;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),s=Ts({callback:o});return ln(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),r}function tN(e){const t=Ou(e);return Iv(e,t)}const Fv=[];function nN(e){const t=C.useRef(e),n=go(r=>e?r&&r!==Fv&&e&&t.current&&e.parentNode===t.current.parentNode?r:ws(e):Fv,[e]);return C.useEffect(()=>{t.current=e},[e]),n}function rN(e){const[t,n]=C.useState(null),r=C.useRef(e),i=C.useCallback(o=>{const a=Su(o.target);a&&n(s=>s?(s.set(a,Au(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=r.current;if(e!==o){a(o);const s=e.map(l=>{const c=Su(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,Au(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(l=>{const c=Su(l);c==null||c.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>pi(o,a),cn):Dv(e):cn,[e,t])}function zv(e,t){t===void 0&&(t=[]);const n=C.useRef(null);return C.useEffect(()=>{n.current=null},t),C.useEffect(()=>{const r=e!==cn;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?vo(e,n.current):cn}function iN(e){C.useEffect(()=>{if(!ps)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function oN(e,t){return C.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=a=>{o(a,t)},n},{}),[e,t])}function jv(e){return C.useMemo(()=>e?P$(e):null,[e])}const Uv=[];function aN(e,t){t===void 0&&(t=gi);const[n]=e,r=jv(n?Rt(n):null),[i,o]=C.useState(Uv);function a(){o(()=>e.length?e.map(l=>_v(l)?r:new Tu(t(l),l)):Uv)}const s=Ts({callback:a});return ln(()=>{s==null||s.disconnect(),a(),e.forEach(l=>s==null?void 0:s.observe(l))},[e]),i}function Vv(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ho(t)?t:e}function sN(e){let{measure:t}=e;const[n,r]=C.useState(null),i=C.useCallback(c=>{for(const{target:d}of c)if(ho(d)){r(f=>{const h=t(d);return f?q(N({},f),{width:h.width,height:h.height}):h});break}},[t]),o=Ts({callback:i}),a=C.useCallback(c=>{const d=Vv(c);o==null||o.disconnect(),d&&(o==null||o.observe(d)),r(d?t(d):null)},[t,o]),[s,l]=ms(a);return C.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const lN=[{sensor:Ss,options:{}},{sensor:Is,options:{}}],cN={current:{}},Es={draggable:{measure:Av},droppable:{measure:Av,strategy:xo.WhileDragging,frequency:Du.Optimized},dragOverlay:{measure:gi}};class Co extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const uN={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Co,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xs},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Es,measureDroppableContainers:xs,windowRect:null,measuringScheduled:!1},Hv={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xs,draggableNodes:new Map,over:null,measureDroppableContainers:xs},wo=C.createContext(Hv),Wv=C.createContext(uN);function dN(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Co}}}function fN(e,t){switch(t.type){case mt.DragStart:return q(N({},e),{draggable:q(N({},e.draggable),{initialCoordinates:t.initialCoordinates,active:t.active})});case mt.DragMove:return e.draggable.active==null?e:q(N({},e),{draggable:q(N({},e.draggable),{translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}})});case mt.DragEnd:case mt.DragCancel:return q(N({},e),{draggable:q(N({},e.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case mt.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Co(e.droppable.containers);return i.set(r,n),q(N({},e),{droppable:q(N({},e.droppable),{containers:i})})}case mt.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Co(e.droppable.containers);return a.set(n,q(N({},o),{disabled:i})),q(N({},e),{droppable:q(N({},e.droppable),{containers:a})})}case mt.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Co(e.droppable.containers);return o.delete(n),q(N({},e),{droppable:q(N({},e.droppable),{containers:o})})}default:return e}}function hN(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=C.useContext(wo),o=vs(r),a=vs(n==null?void 0:n.id);return C.useEffect(()=>{if(!t&&!r&&o&&a!=null){if(!bs(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[l.current,c.current]){if(!d)continue;const f=l$(d);if(f){f.focus();break}}})}},[r,t,i,a,o]),null}function Gv(e,t){let i=t,{transform:n}=i,r=We(i,["transform"]);return e!=null&&e.length?e.reduce((o,a)=>a(N({transform:o},r)),n):n}function pN(e){return C.useMemo(()=>({draggable:N(N({},Es.draggable),e==null?void 0:e.draggable),droppable:N(N({},Es.droppable),e==null?void 0:e.droppable),dragOverlay:N(N({},Es.dragOverlay),e==null?void 0:e.dragOverlay)}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function gN(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;ln(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const d=n(c),f=Iv(d,r);if(a||(f.x=0),s||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=Tv(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const ks=C.createContext(q(N({},cn),{scaleX:1,scaleY:1}));var or;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(or||(or={}));const Yv=C.memo(function(t){var n,r,i,o;let Ms=t,{id:a,accessibility:s,autoScroll:l=!0,children:c,sensors:d=lN,collisionDetection:f=S$,measuring:h,modifiers:p}=Ms,m=We(Ms,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const g=C.useReducer(fN,void 0,dN),[v,S]=g,[I,x]=p$(),[w,y]=C.useState(or.Uninitialized),A=w===or.Initialized,{draggable:{active:E,nodes:_,translate:D},droppable:{containers:G}}=v,F=E!=null?_.get(E):null,T=C.useRef({initial:null,translated:null}),j=C.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=F==null?void 0:F.data)!=null?Ct:cN,rect:T}:null},[E,F]),Y=C.useRef(null),[z,$]=C.useState(null),[B,W]=C.useState(null),Q=po(m,Object.values(m)),te=mo("DndDescribedBy",a),R=C.useMemo(()=>G.getEnabled(),[G]),M=pN(h),{droppableRects:U,measureDroppableContainers:H,measuringScheduled:ne}=J$(R,{dragging:A,dependencies:[D.x,D.y],config:M.droppable}),se=Q$(_,E),ae=C.useMemo(()=>B?ys(B):null,[B]),X=un(),le=X$(se,M.draggable.measure);gN({activeNode:E!=null?_.get(E):null,config:X.layoutShiftCompensation,initialRect:le,measure:M.draggable.measure});const re=Nv(se,M.draggable.measure,le),ge=Nv(se?se.parentElement:null),Se=C.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=G.getNodeFor((n=Se.current.over)==null?void 0:n.id),wt=sN({measure:M.dragOverlay.measure}),lt=(r=wt.nodeRef.current)!=null?r:se,_t=A?(i=wt.rect)!=null?i:re:null,de=!!(wt.nodeRef.current&&wt.rect),he=tN(de?null:re),xe=jv(lt?Rt(lt):null),Te=nN(A?Ve!=null?Ve:se:null),He=aN(Te),Pe=Gv(p,{transform:{x:D.x-he.x,y:D.y-he.y,scaleX:1,scaleY:1},activatorEvent:B,active:j,activeNodeRect:re,containerNodeRect:ge,draggingNodeRect:_t,over:Se.current.over,overlayNodeRect:wt.rect,scrollableAncestors:Te,scrollableAncestorRects:He,windowRect:xe}),Ee=ae?pi(ae,D):null,It=rN(Te),St=zv(It),jt=zv(It,[re]),Lt=pi(Pe,St),Qt=_t?E$(_t,Pe):null,ar=j&&Qt?f({active:j,collisionRect:Qt,droppableRects:U,droppableContainers:R,pointerCoordinates:Ee}):null,Rs=wv(ar,"id"),[In,Io]=C.useState(null),Ru=de?Pe:pi(Pe,jt),Lu=A$(Ru,(o=In==null?void 0:In.rect)!=null?o:null,re),ze=C.useRef(null),mi=C.useCallback((Ct,P)=>{let{sensor:L,options:K}=P;if(Y.current==null)return;const J=_.get(Y.current);if(!J)return;const ie=Ct.nativeEvent,ce=new L({active:Y.current,activeNode:J,event:ie,options:K,context:Se,onAbort(ue){if(!_.get(ue))return;const{onDragAbort:fe}=Q.current,me={id:ue};fe==null||fe(me),I({type:"onDragAbort",event:me})},onPending(ue,we,fe,me){if(!_.get(ue))return;const{onDragPending:Pt}=Q.current,nt={id:ue,constraint:we,initialCoordinates:fe,offset:me};Pt==null||Pt(nt),I({type:"onDragPending",event:nt})},onStart(ue){const we=Y.current;if(we==null)return;const fe=_.get(we);if(!fe)return;const{onDragStart:me}=Q.current,De={activatorEvent:ie,active:{id:we,data:fe.data,rect:T}};Re.unstable_batchedUpdates(()=>{me==null||me(De),y(or.Initializing),S({type:mt.DragStart,initialCoordinates:ue,active:we}),I({type:"onDragStart",event:De}),$(ze.current),W(ie)})},onMove(ue){S({type:mt.DragMove,coordinates:ue})},onEnd:Ce(mt.DragEnd),onCancel:Ce(mt.DragCancel)});ze.current=ce;function Ce(ue){return function(){return k(this,null,function*(){const{active:fe,collisions:me,over:De,scrollAdjustedTranslate:Pt}=Se.current;let nt=null;if(fe&&Pt){const{cancelDrop:dn}=Q.current;nt={activatorEvent:ie,active:fe,collisions:me,delta:Pt,over:De},ue===mt.DragEnd&&typeof dn=="function"&&(yield Promise.resolve(dn(nt)))&&(ue=mt.DragCancel)}Y.current=null,Re.unstable_batchedUpdates(()=>{S({type:ue}),y(or.Uninitialized),Io(null),$(null),W(null),ze.current=null;const dn=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(nt){const Sn=Q.current[dn];Sn==null||Sn(nt),I({type:dn,event:nt})}})})}}},[_]),So=C.useCallback((Ct,P)=>(L,K)=>{const J=L.nativeEvent,ie=_.get(K);if(Y.current!==null||!ie||J.dndKit||J.defaultPrevented)return;const ce={active:ie};Ct(L,P.options,ce)===!0&&(J.dndKit={capturedBy:P.sensor},Y.current=K,mi(L,P))},[_,mi]),Ls=q$(d,So);iN(d),ln(()=>{re&&w===or.Initializing&&y(or.Initialized)},[re,w]),C.useEffect(()=>{const{onDragMove:Ct}=Q.current,{active:P,activatorEvent:L,collisions:K,over:J}=Se.current;if(!P||!L)return;const ie={active:P,activatorEvent:L,collisions:K,delta:{x:Lt.x,y:Lt.y},over:J};Re.unstable_batchedUpdates(()=>{Ct==null||Ct(ie),I({type:"onDragMove",event:ie})})},[Lt.x,Lt.y]),C.useEffect(()=>{const{active:Ct,activatorEvent:P,collisions:L,droppableContainers:K,scrollAdjustedTranslate:J}=Se.current;if(!Ct||Y.current==null||!P||!J)return;const{onDragOver:ie}=Q.current,ce=K.get(Rs),Ce=ce&&ce.rect.current?{id:ce.id,rect:ce.rect.current,data:ce.data,disabled:ce.disabled}:null,ue={active:Ct,activatorEvent:P,collisions:L,delta:{x:J.x,y:J.y},over:Ce};Re.unstable_batchedUpdates(()=>{Io(Ce),ie==null||ie(ue),I({type:"onDragOver",event:ue})})},[Rs]),ln(()=>{Se.current={activatorEvent:B,active:j,activeNode:se,collisionRect:Qt,collisions:ar,droppableRects:U,draggableNodes:_,draggingNode:lt,draggingNodeRect:_t,droppableContainers:G,over:In,scrollableAncestors:Te,scrollAdjustedTranslate:Lt},T.current={initial:_t,translated:Qt}},[j,se,ar,Qt,_,lt,_t,U,G,In,Te,Lt]),G$(q(N({},X),{delta:D,draggingRect:Qt,pointerCoordinates:Ee,scrollableAncestors:Te,scrollableAncestorRects:He}));const vi=C.useMemo(()=>({active:j,activeNode:se,activeNodeRect:re,activatorEvent:B,collisions:ar,containerNodeRect:ge,dragOverlay:wt,draggableNodes:_,droppableContainers:G,droppableRects:U,over:In,measureDroppableContainers:H,scrollableAncestors:Te,scrollableAncestorRects:He,measuringConfiguration:M,measuringScheduled:ne,windowRect:xe}),[j,se,re,B,ar,ge,wt,_,G,U,In,H,Te,He,M,ne,xe]),Ao=C.useMemo(()=>({activatorEvent:B,activators:Ls,active:j,activeNodeRect:re,ariaDescribedById:{draggable:te},dispatch:S,draggableNodes:_,over:In,measureDroppableContainers:H}),[B,Ls,j,re,S,te,_,In,H]);return C.createElement(yv.Provider,{value:x},C.createElement(wo.Provider,{value:Ao},C.createElement(Wv.Provider,{value:vi},C.createElement(ks.Provider,{value:Lu},c)),C.createElement(hN,{disabled:(s==null?void 0:s.restoreFocus)===!1})),C.createElement(v$,q(N({},s),{hiddenTextDescribedById:te})));function un(){const Ct=(z==null?void 0:z.autoScrollEnabled)===!1,P=typeof l=="object"?l.enabled===!1:l===!1,L=A&&!Ct&&!P;return typeof l=="object"?q(N({},l),{enabled:L}):{enabled:L}}}),mN=C.createContext(null),Kv="button",vN="Draggable";function bN(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=mo(vN),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:h}=C.useContext(wo),{role:p=Kv,roleDescription:m="draggable",tabIndex:g=0}=i!=null?i:{},v=(l==null?void 0:l.id)===t,S=C.useContext(v?ks:mN),[I,x]=ms(),[w,y]=ms(),A=oN(a,t),E=po(n);ln(()=>(f.set(t,{id:t,key:o,node:I,activatorNode:w,data:E}),()=>{const D=f.get(t);D&&D.key===o&&f.delete(t)}),[f,t]);const _=C.useMemo(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&p===Kv?!0:void 0,"aria-roledescription":m,"aria-describedby":d.draggable}),[r,p,g,v,m,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:_,isDragging:v,listeners:r?void 0:A,node:I,over:h,setNodeRef:x,setActivatorNodeRef:y,transform:S}}function Qv(){return C.useContext(Wv)}const yN="Droppable",xN={timeout:25};function CN(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=mo(yN),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=C.useContext(wo),d=C.useRef({disabled:n}),f=C.useRef(!1),h=C.useRef(null),p=C.useRef(null),{disabled:m,updateMeasurementsFor:g,timeout:v}=N(N({},xN),i),S=po(g!=null?g:r),I=C.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),p.current=null},v)},[v]),x=Ts({callback:I,disabled:m||!a}),w=C.useCallback((_,D)=>{x&&(D&&(x.unobserve(D),f.current=!1),_&&x.observe(_))},[x]),[y,A]=ms(w),E=po(t);return C.useEffect(()=>{!x||!y.current||(x.disconnect(),f.current=!1,x.observe(y.current))},[y,x]),C.useEffect(()=>(s({type:mt.RegisterDroppable,element:{id:r,key:o,disabled:n,node:y,rect:h,data:E}}),()=>s({type:mt.UnregisterDroppable,key:o,id:r})),[r]),C.useEffect(()=>{n!==d.current.disabled&&(s({type:mt.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,s]),{active:a,rect:h,isOver:(l==null?void 0:l.id)===r,node:y,over:l,setNodeRef:A}}function wN(e){let{animation:t,children:n}=e;const[r,i]=C.useState(null),[o,a]=C.useState(null),s=vs(n);return!n&&!r&&s&&i(s),ln(()=>{if(!o)return;const l=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(l==null||c==null){i(null);return}Promise.resolve(t(c,o)).then(()=>{i(null)})},[t,r,o]),C.createElement(C.Fragment,null,n,r?C.cloneElement(r,{ref:a}):null)}const IN={x:0,y:0,scaleX:1,scaleY:1};function SN(e){let{children:t}=e;return C.createElement(wo.Provider,{value:Hv},C.createElement(ks.Provider,{value:IN},t))}const AN={position:"fixed",touchAction:"none"},TN=e=>bs(e)?"transform 250ms ease":void 0,EN=C.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:a,rect:s,style:l,transform:c,transition:d=TN}=e;if(!s)return null;const f=i?c:q(N({},c),{scaleX:1,scaleY:1}),h=N(q(N({},AN),{width:s.width,height:s.height,top:s.top,left:s.left,transform:Hn.Transform.toString(f),transformOrigin:i&&r?y$(r,s):void 0,transition:typeof d=="function"?d(r):d}),l);return C.createElement(n,{className:a,style:h,ref:t},o)}),qv=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,l]of Object.entries(o.active))l!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,l));if(o!=null&&o.dragOverlay)for(const[s,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(s,l);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[l,c]of Object.entries(i))n.node.style.setProperty(l,c);a!=null&&a.active&&n.node.classList.remove(a.active)}},kN={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Hn.Transform.toString(t)},{transform:Hn.Transform.toString(n)}]},sideEffects:qv({styles:{active:{opacity:"0"}}})};function _N(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return gs((o,a)=>{if(t===null)return;const s=n.get(o);if(!s)return;const l=s.node.current;if(!l)return;const c=Vv(a);if(!c)return;const{transform:d}=Rt(a).getComputedStyle(a),f=Sv(d);if(!f)return;const h=typeof t=="function"?t:PN(t);return Ov(l,i.draggable.measure),h({active:{id:o,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:f})})}function PN(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}=N(N({},kN),e);return o=>{let I=o,{active:a,dragOverlay:s,transform:l}=I,c=We(I,["active","dragOverlay","transform"]);if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},f={scaleX:l.scaleX!==1?a.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?a.rect.height*l.scaleY/s.rect.height:1},h=N({x:l.x-d.x,y:l.y-d.y},f),p=i(q(N({},c),{active:a,dragOverlay:s,transform:{initial:l,final:h}})),[m]=p,g=p[p.length-1];if(JSON.stringify(m)===JSON.stringify(g))return;const v=r==null?void 0:r(N({active:a,dragOverlay:s},c)),S=s.node.animate(p,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{S.onfinish=()=>{v==null||v(),x()}})}}let Jv=0;function DN(e){return C.useMemo(()=>{if(e!=null)return Jv++,Jv},[e])}const ON=C.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:l,zIndex:c=999}=e;const{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:m,droppableContainers:g,dragOverlay:v,over:S,measuringConfiguration:I,scrollableAncestors:x,scrollableAncestorRects:w,windowRect:y}=Qv(),A=C.useContext(ks),E=DN(f==null?void 0:f.id),_=Gv(a,{activatorEvent:d,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:S,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:w,transform:A,windowRect:y}),D=Ou(h),G=_N({config:r,draggableNodes:m,droppableContainers:g,measuringConfiguration:I}),F=D?v.setRef:void 0;return C.createElement(SN,null,C.createElement(wN,{animation:G},f&&E?C.createElement(EN,{key:E,id:f.id,ref:F,as:s,activatorEvent:d,adjustScale:t,className:l,transition:o,rect:D,style:N({zIndex:c},i),transform:_},n):null))});function _s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function RN(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function Ps(e){return e!==null&&e>=0}function LN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function MN(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Xv=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_s(t,r,n),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},Zv="Sortable",eb=C.createContext({activeIndex:-1,containerId:Zv,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Xv,disabled:{draggable:!1,droppable:!1}});function tb(e){let{children:t,id:n,items:r,strategy:i=Xv,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:d}=Qv(),f=mo(Zv,n),h=s.rect!==null,p=C.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),m=a!=null,g=a?p.indexOf(a.id):-1,v=c?p.indexOf(c.id):-1,S=C.useRef(p),I=!LN(p,S.current),x=v!==-1&&g===-1||I,w=MN(o);ln(()=>{I&&m&&d(p)},[I,p,m,d]),C.useEffect(()=>{S.current=p},[p]);const y=C.useMemo(()=>({activeIndex:g,containerId:f,disabled:w,disableTransforms:x,items:p,overIndex:v,useDragOverlay:h,sortedRects:RN(p,l),strategy:i}),[g,f,w.draggable,w.droppable,x,p,v,l,h,i]);return C.createElement(eb.Provider,{value:y},t)}const BN=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _s(n,r,i).indexOf(t)},$N=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==o&&i===a?!1:n?!0:a!==i&&t===l},NN={duration:200,easing:"ease"},nb="transform",FN=Hn.Transition.toString({property:nb,duration:0,easing:"linear"}),zN={roleDescription:"sortable"};function jN(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,a]=C.useState(null),s=C.useRef(n);return ln(()=>{if(!t&&n!==s.current&&r.current){const l=i.current;if(l){const c=gi(r.current,{ignoreTransform:!0}),d={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(d.x||d.y)&&a(d)}}n!==s.current&&(s.current=n)},[t,n,r,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function rb(e){let{animateLayoutChanges:t=$N,attributes:n,disabled:r,data:i,getNewIndex:o=BN,id:a,strategy:s,resizeObserverConfig:l,transition:c=NN}=e;const{items:d,containerId:f,activeIndex:h,disabled:p,disableTransforms:m,sortedRects:g,overIndex:v,useDragOverlay:S,strategy:I}=C.useContext(eb),x=UN(r,p),w=d.indexOf(a),y=C.useMemo(()=>N({sortable:{containerId:f,index:w,items:d}},i),[f,i,w,d]),A=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:E,node:_,isOver:D,setNodeRef:G}=CN({id:a,data:y,disabled:x.droppable,resizeObserverConfig:N({updateMeasurementsFor:A},l)}),{active:F,activatorEvent:T,activeNodeRect:j,attributes:Y,setNodeRef:z,listeners:$,isDragging:B,over:W,setActivatorNodeRef:Q,transform:te}=bN({id:a,data:y,attributes:N(N({},zN),n),disabled:x.draggable}),R=i$(G,z),M=!!F,U=M&&!m&&Ps(h)&&Ps(v),H=!S&&B,ne=H&&U?te:null,se=s!=null?s:I,ae=U?ne!=null?ne:se({rects:g,activeNodeRect:j,activeIndex:h,overIndex:v,index:w}):null,X=Ps(h)&&Ps(v)?o({id:a,items:d,activeIndex:h,overIndex:v}):w,le=F==null?void 0:F.id,re=C.useRef({activeId:le,items:d,newIndex:X,containerId:f}),ge=d!==re.current.items,Se=t({active:F,containerId:f,isDragging:B,isSorting:M,id:a,index:w,items:d,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:c,wasDragging:re.current.activeId!=null}),Ve=jN({disabled:!Se,index:w,node:_,rect:E});return C.useEffect(()=>{M&&re.current.newIndex!==X&&(re.current.newIndex=X),f!==re.current.containerId&&(re.current.containerId=f),d!==re.current.items&&(re.current.items=d)},[M,X,f,d]),C.useEffect(()=>{if(le===re.current.activeId)return;if(le!=null&&re.current.activeId==null){re.current.activeId=le;return}const lt=setTimeout(()=>{re.current.activeId=le},50);return()=>clearTimeout(lt)},[le]),{active:F,activeIndex:h,attributes:Y,data:y,rect:E,index:w,newIndex:X,items:d,isOver:D,isSorting:M,isDragging:B,listeners:$,node:_,overIndex:v,over:W,setNodeRef:R,setActivatorNodeRef:Q,setDroppableNodeRef:G,setDraggableNodeRef:z,transform:Ve!=null?Ve:ae,transition:wt()};function wt(){if(Ve||ge&&re.current.newIndex===w)return FN;if(!(H&&!bs(T)||!c)&&(M||Se))return Hn.Transition.toString(q(N({},c),{property:nb}))}}function UN(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function Ds(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const VN=[ke.Down,ke.Right,ke.Up,ke.Left],ib=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:a,scrollableAncestors:s}}=t;if(VN.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case ke.Down:r.top<h.top&&l.push(f);break;case ke.Up:r.top>h.top&&l.push(f);break;case ke.Left:r.left>h.left&&l.push(f);break;case ke.Right:r.left<h.left&&l.push(f);break}});const c=w$({active:n,collisionRect:r,droppableRects:i,droppableContainers:l,pointerCoordinates:null});let d=wv(c,"id");if(d===(a==null?void 0:a.id)&&c.length>1&&(d=c[1].id),d!=null){const f=o.get(n.id),h=o.get(d),p=h?i.get(h.id):null,m=h==null?void 0:h.node.current;if(m&&p&&f&&h){const v=ws(m).some((A,E)=>s[E]!==A),S=ob(f,h),I=HN(f,h),x=v||!S?{x:0,y:0}:{x:I?r.width-p.width:0,y:I?r.height-p.height:0},w={x:p.left,y:p.top};return x.x&&x.y?w:vo(w,x)}}}};function ob(e,t){return!Ds(e)||!Ds(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function HN(e,t){return!Ds(e)||!Ds(t)||!ob(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const ab=Ue(u.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),Os=C.createContext({attributes:{},listeners:void 0,ref(){}}),WN=()=>{const{attributes:e,listeners:t,ref:n}=C.useContext(Os);return u.jsx(b.Button,q(N(N({sx:{backgroundColor:"transparent",color:"#919eab",width:"10px",":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}},e),t),{ref:n,children:u.jsx(ab,{})}))},sb=({children:e,id:t,tooltipTitle:n,removeItem:r,useDraggable:i=!0,variant:o="plain"})=>{const{attributes:a,isDragging:s,listeners:l,setNodeRef:c,setActivatorNodeRef:d,transform:f,transition:h}=rb({id:t}),p=C.useMemo(()=>({attributes:a,listeners:l,ref:d}),[a,l,d]),m={opacity:s?.6:void 0,transform:Hn.Translate.toString(f),transition:h};return u.jsx(Os.Provider,{value:p,children:u.jsx(b.ListItem,{variant:o,ref:c,style:m,startAction:i?u.jsx(WN,{}):u.jsx(u.Fragment,{}),endAction:i?u.jsx(b.Tooltip,{title:n,children:u.jsx(b.Button,{variant:"outlined",color:"danger",onClick:r,sx:{ml:"auto",p:.5},size:"sm",children:u.jsx(Oe.Remove,{})})}):u.jsx(u.Fragment,{}),sx:{p:2,borderRadius:"sm"},children:e})})},GN={sideEffects:qv({styles:{active:{opacity:"0.6"}}})},lb=({children:e})=>u.jsx(ON,{dropAnimation:GN,children:e}),YN=({entities:e=[],labels:t,disabled:n,setEntities:r,removeItem:i})=>{const[o,a]=C.useState(null),s=C.useMemo(()=>e.find(c=>c.id===(o==null?void 0:o.id)),[o,e]),l=xv(Cs(Ss),Cs(Is,{coordinateGetter:ib}));return u.jsxs(Yv,{sensors:l,onDragStart:({active:c})=>{a(c)},onDragEnd:({active:c,over:d})=>{if(d&&c.id!==(d==null?void 0:d.id)){const f=e.findIndex(({id:p})=>p===c.id),h=e.findIndex(({id:p})=>p===d.id);r(_s(e,f,h))}a(null)},onDragCancel:()=>{a(null)},children:[u.jsx(tb,{items:e,children:u.jsx(b.List,{sx:{gap:"10px",padding:0},children:e.map(c=>u.jsxs(sb,{id:c.id,variant:"outlined",removeItem:()=>i(c.id),tooltipTitle:t.removeEntity,useDraggable:!n,children:[u.jsx(b.Typography,{ml:n?0:2.5,children:c.title||c.name}),c.type&&u.jsx(b.Chip,{color:dB(c.type),sx:{marginLeft:2,marginRight:4},children:fB(c.type)})]},`sortable-item-${c.id}`))})}),u.jsx(lb,{children:s?u.jsx(u.Fragment,{children:e.map(c=>u.jsx(sb,{id:c.id,useDraggable:!1,removeItem:()=>{},tooltipTitle:t.removeEntity},`sortable-overlay-item-${c.id}`))}):u.jsx(u.Fragment,{})})]})},KN=({labels:e,value:t,options:n,size:r="sm",disabled:i=!1,sx:o={},onChange:a})=>u.jsxs(b.FormControl,{size:r,disabled:i,children:[u.jsx(b.FormLabel,{children:e.itemsPerPage}),u.jsx(b.Select,{value:t,size:r,onChange:a,sx:q(N({},o),{minHeight:"37px"}),children:n.map((s,l)=>u.jsx(b.Option,{value:s,children:s},`items-per-page-${s}-${l}`))})]}),QN=(e,t)=>{const[n,r]=C.useState(null),{sdk:i}=ft(),o=()=>k(this,null,function*(){let s=[];if(!e){r(s);return}try{switch(e){case"top_x":s=(yield i.topX.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"match_quiz":s=(yield i.matchQuiz.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"template":s=(yield i.loyalty.getTemplates(void 0,!0)).data.map(v=>({id:v.id,name:v.name,status:v.status,type:e,relationship:"relatedTo"}));break;case"classic_quiz":s=(yield i.miniGames.getClassicQuizzes({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"either_or":s=(yield i.miniGames.getEitherOrs({limit:50},!1,!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"poll":s=(yield i.voting.getPolls({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"bracket":s=(yield i.bracketGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break;case"standing":s=(yield i.standingGame.getGames({limit:50},!0)).data.map(v=>({id:v.id,name:v.title,status:v.status,type:e,relationship:"relatedTo"}));break}}catch(l){console.error(l),r(s),t();return}r(s)});return C.useEffect(()=>(o(),()=>r(null)),[e]),n},qN=({status:e})=>{let t="neutral";switch(e){case"DYNAMIC":t="primary";break;case"CUSTOM":t="success";break;case"OPEN":t="primary";break;case"LIVE":t="primary";break;case"CANCELED":t="warning";break;case"SETTLED":t="success";break;case"INACTIVE":t="danger";break;case"ACTIVE":t="success";break;case"EXPIRED":t="neutral";break}return u.jsx(b.Chip,{color:t,variant:"solid",size:"sm",children:e})},JN=Ue(u.jsx("path",{d:"M12.16 3h-.32L9.21 8.25h5.58zm4.3 5.25h5.16L19 3h-5.16zm4.92 1.5h-8.63V20.1zM11.25 20.1V9.75H2.62zM7.54 8.25 10.16 3H5L2.38 8.25z"}),"Diamond"),XN=Ue(u.jsx("path",{d:"m21.58 16.09-1.09-7.66C20.21 6.46 18.52 5 16.53 5H7.47C5.48 5 3.79 6.46 3.51 8.43l-1.09 7.66C2.2 17.63 3.39 19 4.94 19c.68 0 1.32-.27 1.8-.75L9 16h6l2.25 2.25c.48.48 1.13.75 1.8.75 1.56 0 2.75-1.37 2.53-2.91M11 11H9v2H8v-2H6v-1h2V8h1v2h2zm4-1c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m2 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"SportsEsports"),ZN=Ue(u.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),eF=Ue(u.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),tF=Ue(u.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-7h2zm4 0h-2V7h2zm4 0h-2v-4h2z"}),"Poll"),nF=e=>{switch(e.entityType){case"top_x":return u.jsx(b.Tooltip,{title:"Top X",children:u.jsx(JN,{})});case"match_quiz":return u.jsx(b.Tooltip,{title:"Match Quiz",children:u.jsx(XN,{})});case"template":return u.jsx(b.Tooltip,{title:"Leaderboard Templates",children:u.jsx(Oe.EmojiEvents,{})});case"classic_quiz":return u.jsx(b.Tooltip,{title:"Classic Quiz",children:u.jsx(ZN,{})});case"either_or":return u.jsx(b.Tooltip,{title:"Either/Or",children:u.jsx(eF,{})});case"poll":return u.jsx(b.Tooltip,{title:"Poll",children:u.jsx(tF,{})});case"bracket":return u.jsx(b.Tooltip,{title:"Custom Bracket Game",children:u.jsx(Oe.EmojiEvents,{})});case"standing":return u.jsx(b.Tooltip,{title:"Custom Standings Game",children:u.jsx(Oe.EmojiEvents,{})});default:return null}},rF=({entity:e,deleteLabel:t,onDelete:n})=>u.jsx(u.Fragment,{children:u.jsx(b.Card,{sx:{p:2,mb:2},children:u.jsx(b.CardContent,{children:u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"space-between"},children:[u.jsx(b.Typography,{fontSize:"sm",startDecorator:u.jsx(nF,{entityType:e.type}),children:e.name}),u.jsx(b.Box,{display:{xs:"none",md:"block"},children:u.jsx(qN,{status:e.status})}),u.jsx(b.Box,{children:u.jsx(b.Tooltip,{title:t,children:u.jsx(b.IconButton,{onClick:()=>n(e.id,e.relationship),color:"danger",size:"sm",children:u.jsx(Oe.Delete,{})})})})]})})})}),iF=(e,t,n,r)=>k(this,null,function*(){let o=[];const a=new Map;t.forEach(s=>{if(a.has(s.entity_type)){const l=a.get(s.entity_type);a.set(s.entity_type,[...l,[s.entity_id,s.entity_relationship]])}else a.set(s.entity_type,[[s.entity_id,s.entity_relationship]])});try{for(const[s,l]of a)switch(s){case"top_x":const c=l.map(([D])=>D),d=yield e.topX.getGames({limit:c.length,gameIds:c},!0);o=[...o,...d.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"match_quiz":const f=l.map(([D])=>D),h=yield e.matchQuiz.getGames({limit:f.length,gameIds:f},!0);o=[...o,...h.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"template":const p=l.map(([D])=>D),m=yield e.loyalty.getTemplates(void 0,!0);o=[...o,...m.data.filter(D=>p.includes(D.id)).map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"classic_quiz":const g=l.map(([D])=>D),v=yield e.miniGames.getClassicQuizzes({limit:g.length,classicQuizIds:g},!1,!0);o=[...o,...v.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"either_or":const S=l.map(([D])=>D),I=yield e.miniGames.getEitherOrs({limit:S.length,eitherOrIds:S},!1,!0);o=[...o,...I.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"poll":const x=l.map(([D])=>D),w=yield e.voting.getPolls({limit:x.length,pollIds:x},!0);o=[...o,...w.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"bracket":const y=l.map(([D])=>D),A=yield e.bracketGame.getGames({limit:y.length,gameIds:y},!0);o=[...o,...A.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;case"standing":const E=l.map(([D])=>D),_=yield e.standingGame.getGames({limit:E.length,gameIds:E},!0);o=[...o,..._.data.map(D=>{var F;const G=((F=l.find(([T])=>T===D.id))==null?void 0:F[1])||"relatedTo";return{id:D.id,name:D.title,status:D.status,type:s,relationship:G}})];break;default:}}catch(s){console.error("Error loading related entities",s),n(o),r()}n(o)}),oF=["top_x","match_quiz","template","classic_quiz","poll","either_or","bracket","standing"],aF=["relatedTo","blocks","blockedBy","bonusPointsGame","nextInSeries","previousInSeries"],sF=new Map().set("template","Leaderboard Templates").set("classic_quiz","Classic Quiz").set("either_or","Either/Or").set("match_quiz","Match Quiz").set("top_x","Top X").set("bracket","Custom Bracket Game").set("standing","Custom Standing Game").set("poll","Poll"),cb=new Map().set("relatedTo","Related to").set("blocks","Blocks").set("blockedBy","Blocked by").set("nextInSeries","Next in series").set("previousInSeries","Previous in series").set("bonusPointsGame","Bonus points game"),lF=({defaultValue:e=[],onChange:t,labels:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState(""),[s,l]=C.useState(null),[c,d]=C.useState("relatedTo"),[f,h]=C.useState(!1),p=()=>h(!f),m=QN(s,p),{sdk:g}=ft();C.useEffect(()=>(e.length>0&&iF(g,e,i,p),()=>{i([]),a(""),l(null),d("relatedTo")}),[]);const v=()=>{if(e.some(E=>E.entity_id===o&&E.entity_relationship===c)){a("");return}const y=[...e,{entity_id:o,entity_type:s,entity_relationship:c}],A=(m==null?void 0:m.filter(E=>E.id===o).map(E=>({id:E.id,name:E.name,type:s,status:E.status,relationship:c})))||[];i([...r,...A]),t(y),a("")},S=(w,y)=>{const A=e.filter(_=>!(_.entity_id===w&&_.entity_relationship===y)),E=r.filter(_=>!(_.id===w&&_.relationship===y));i(E),t(A)},I=r.reduce((w,y)=>{const A=y.relationship;return w[A]||(w[A]=[]),w[A].push(y),w},{}),x=Object.keys(I).sort();return u.jsxs(u.Fragment,{children:[x.map(w=>u.jsxs(b.Box,{sx:{mb:2},children:[u.jsx(b.Typography,{level:"title-md",sx:{fontWeight:"bold",mb:1},children:u.jsx(b.Chip,{variant:"outlined",size:"md",sx:{bgcolor:"background.surface"},children:cb.get(w)||"Unknown relationship"})}),I[w].map((y,A)=>u.jsx(rF,{entity:y,deleteLabel:n.delete,onDelete:S},`related-entity-relationship-${y.id}-${A}`))]},`relationship-group-${w}`)),u.jsxs(b.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:1},children:[u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:n.type}),u.jsx(b.Select,{value:s,size:"sm",name:"entity_type",onChange:(w,y)=>l(y),sx:{minHeight:"37px"},children:oF.map(w=>u.jsx(b.Option,{value:w,children:sF.get(w)},`entity-type-option-${w}`))})]}),u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:n.relationship}),u.jsx(b.Select,{value:c,size:"sm",name:"entity_relationship",onChange:(w,y)=>d(y),sx:{minHeight:"37px"},children:aF.map(w=>u.jsx(b.Option,{value:w,children:cb.get(w)},`entity-relationship-option-${w}`))})]}),u.jsxs(b.FormControl,{children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:n.entity}),u.jsx(b.Select,{value:o,size:"sm",name:"entity_id",onChange:(w,y)=>a(y),sx:{width:"100%",mr:{xs:0,md:1},mb:{xs:1,md:0},minHeight:"37px"},endDecorator:!m&&u.jsx(b.CircularProgress,{size:"sm"}),children:m&&m.map(w=>u.jsx(b.Option,{value:w.id,children:w.name},`entity--${w.id}`))})]}),u.jsx(b.Button,{startDecorator:u.jsx(Oe.Add,{}),disabled:!o||!s,onClick:v,sx:{mb:1},children:n.add})]}),u.jsx(at,{showToast:f,message:n.relatedEntitiesErrorMessage,color:"danger",hideToast:p})]})},cF=e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState("success"),[s,l]=C.useState(""),c=C.useContext(Zo),d=(h,p)=>{a(h),l(p),i(!0)},f=()=>k(this,null,function*(){n(!0);const h=yield c==null?void 0:c.https.exportLeadsPerEntity(e.entityId);if(h!=null&&h.ok){const p=yield h.blob(),m=URL.createObjectURL(p),g=document.createElement("a");g.href=m,g.download=`${e.entityType}_${e.entityName}_exported_users_leads.csv`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(m),n(!1),d("success",e.labels.usersLeadsExportMessage)}else console.error("Failed to export all users leads: ",yield h==null?void 0:h.json()),n(!1),d("danger",e.labels.usersLeadsExportErrorMessage)});return u.jsxs(u.Fragment,{children:[u.jsxs(b.Box,{mb:2,children:[u.jsx(b.Box,{display:"flex",alignItems:"center",mb:1,children:u.jsx(b.Typography,{level:"body-lg",sx:{mx:"auto"},children:e.labels.exportUsersLeads})}),u.jsx(b.Sheet,{sx:{overflowX:"auto",minWidth:"700px"},children:u.jsxs(b.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:first-child, & > tbody > tr > td:first-child":{textAlign:"left",width:"50%"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"},"& > thead > tr > th, & > tbody > tr > td":{textAlign:"right"}},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.category}),u.jsx("th",{children:e.labels.action})]})}),u.jsx("tbody",{children:u.jsxs("tr",{children:[u.jsxs("td",{children:[u.jsx(b.Typography,{level:"body-sm",fontWeight:"600",children:e.labels.exportAllUsersLeads}),u.jsx(b.Typography,{level:"body-xs",color:"neutral",children:e.labels.exportAllUsersLeadsDescription})]}),u.jsx("td",{children:u.jsx(b.Button,{loading:t,onClick:f,children:e.labels.exportAllUsersLeads})})]})})]})})]}),u.jsx(at,{showToast:r,color:o,message:s,hideToast:()=>i(!1)})]})},uF=({tooltipContent:e="Drag to reorder"})=>{const{attributes:t,listeners:n,ref:r}=C.useContext(Os);return u.jsx(b.Tooltip,{title:e,placement:"left",arrow:!0,children:u.jsx(b.IconButton,q(N(N({variant:"plain",color:"neutral",size:"sm",sx:{color:"text.tertiary",my:"auto",mr:1,":hover":{bgcolor:"action.hover"},":active":{bgcolor:"action.selected"},transition:"all 0.2s",cursor:"grab","&:active":{cursor:"grabbing"}}},t),n),{ref:r,children:u.jsx(ab,{})}))})},ub=({id:e,useDraggable:t=!0,variant:n="outlined",item:r,tooltipContent:i})=>{const{attributes:o,isDragging:a,listeners:s,setNodeRef:l,setActivatorNodeRef:c,transform:d,transition:f}=rb({id:e}),h=C.useMemo(()=>({attributes:o,listeners:s,ref:c}),[o,s,c]),p={opacity:a?.6:void 0,transform:Hn.Translate.toString(d),transition:f},m=v=>v.split(" ").map(S=>S[0]).join("").toUpperCase().substring(0,2),g=v=>r!=null&&r.color?r.color:`hsl(${v.split("").reduce((x,w)=>w.charCodeAt(0)+((x<<5)-x),0)%360}, 70%, 80%)`;return u.jsx(Os.Provider,{value:h,children:u.jsx(b.ListItem,{variant:n,ref:l,style:p,endAction:t?u.jsx(uF,{tooltipContent:i}):null,sx:{p:0,borderRadius:"md",overflow:"hidden",transition:"all 0.2s",boxShadow:a?"md":"sm",transform:`scale(${a?1.02:1})`,border:"1px solid",borderColor:"divider"},children:u.jsxs(b.Box,{sx:{display:"flex",width:"100%",alignItems:"center",gap:2,p:0},children:[u.jsx(b.Sheet,{sx:{width:"8px",alignSelf:"stretch",bgcolor:g(r.name)}}),u.jsx(b.Avatar,{src:r.image,alt:r.name,sx:{bgcolor:g(r.name),my:2,ml:1},children:m(r.name)}),u.jsxs(b.Box,{sx:{py:2,pr:2,flexGrow:1,display:"flex",flexDirection:"column",gap:.5},children:[u.jsx(b.Typography,{level:"title-md",children:r.name}),r.description&&u.jsx(b.Typography,{level:"body-sm",sx:{color:"text.secondary",textOverflow:"ellipsis"},children:r.description}),u.jsx(b.Box,{sx:{mt:.5},children:r.type&&u.jsx(b.Chip,{variant:"soft",color:"primary",size:"sm",sx:{px:1,bgcolor:`${g(r.type)}40`},children:r.type})})]})]})})})},dF=({items:e=[],labels:t,setItems:n})=>{const[r,i]=C.useState(null),o=C.useMemo(()=>e.find(s=>s.id===(r==null?void 0:r.id)),[r,e]),a=xv(Cs(Ss,{activationConstraint:{distance:8}}),Cs(Is,{coordinateGetter:ib}));return e.length===0?u.jsx(b.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",border:"1px dashed",borderColor:"divider",borderRadius:"md"},children:u.jsx(b.Typography,{level:"body-lg",color:"neutral",children:(t==null?void 0:t.noItemsToDisplay)||"No items to display"})}):u.jsxs(Yv,{sensors:a,onDragStart:({active:s})=>{i(s)},onDragEnd:({active:s,over:l})=>{if(l&&s.id!==(l==null?void 0:l.id)){const c=e.findIndex(({id:f})=>f===s.id),d=e.findIndex(({id:f})=>f===l.id);n(_s(e,c,d))}i(null)},onDragCancel:()=>{i(null)},children:[u.jsx(tb,{items:e,children:u.jsx(b.List,{sx:{gap:2,maxHeight:"70vh",overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"action.focus",borderRadius:"4px"}},children:e.map(s=>u.jsx(ub,{id:s.id,variant:"outlined",item:s,tooltipContent:t==null?void 0:t.dragToReorder},`sortable-item-${s.id}`))})}),u.jsx(lb,{children:o?u.jsx(ub,{id:o.id,useDraggable:!1,item:o,tooltipContent:t.dragToReorder},`sortable-overlay-item-${o.id}`):null})]})},fF=({entityType:e,entityId:t,authRequirement:n,labels:r})=>{const[i,o]=C.useState(!1),[a,s]=C.useState([]),[l,c]=C.useState("before"),[d,f]=C.useState(!1),[h,p]=C.useState(""),[m,g]=C.useState(""),v=`
|
|
2476
2476
|
data-content-type="${e}"`,S=`
|
|
2477
2477
|
data-content-id="${t}"`,I=a.length>0?`
|
|
2478
2478
|
data-lead-fields="${a.join(", ")}"`:"",x=i?`
|
|
@@ -2490,4 +2490,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2490
2490
|
data-widget-mode="${m}"`,D=`<div
|
|
2491
2491
|
data-component="fu-widget"
|
|
2492
2492
|
data-content-type="list"${v}${S}${I}${x}${A}${E}${_}
|
|
2493
|
-
></div>`,G=({title:j})=>u.jsx(b.Tooltip,{title:j,sx:{maxWidth:300},children:u.jsx(ni,{color:"primary"})}),F=()=>u.jsxs(b.Card,{sx:{pb:1,mb:3},children:[u.jsx(xn,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:u.jsx(G,{title:t.quizzesInfoMessage}),onChange:j=>o(j.target.value)}),u.jsx(xn,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:u.jsx(G,{title:t.eitherOrsInfoMessage}),onChange:j=>s(j.target.value)}),u.jsx(xn,{label:t.pollURL,placeholder:"",defaultValue:l,required:!1,size:"md",endDecorator:u.jsx(G,{title:t.pollsInfoMessage}),onChange:j=>c(j.target.value)})]}),T=()=>u.jsxs(b.Card,{sx:{pb:1,mb:3},children:[u.jsx(xu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:d,onChange:j=>f(j||null),size:"md"}),u.jsx(xu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:h,onChange:j=>p(j||null),size:"md"}),u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:t.mode}),u.jsx(b.Select,{defaultValue:m,onChange:(j,Y)=>g(Y),children:hF.map((j,Y)=>u.jsx(b.Option,{value:j,children:pF[j]},`basic-select-${j}-${Y}`))}),u.jsx(b.FormHelperText,{children:t.modeDescription})]})]});return u.jsxs(b.Box,{mt:1,children:[T(),u.jsx(fs,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:j=>{j===!1&&(o(""),s(""),c("")),r(j)}}),n&&F(),u.jsxs(b.Box,{position:"relative",mb:1,children:[u.jsx(b.Textarea,{value:D,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:j=>j.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),u.jsx(b.Tooltip,{title:t.copyToClipboard,children:u.jsx(b.Button,{onClick:()=>{navigator.clipboard.writeText(D)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:u.jsx(Oe.ContentCopy,{})})})]}),u.jsx(b.Alert,{variant:"outlined",color:"primary",startDecorator:u.jsx(ni,{}),sx:{mb:1,width:"fit-content"},children:u.jsxs(b.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,u.jsx(b.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},db=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})))||[],mF={Login:
|
|
2493
|
+
></div>`,G=({title:j})=>u.jsx(b.Tooltip,{title:j,sx:{maxWidth:300},children:u.jsx(ni,{color:"primary"})}),F=()=>u.jsxs(b.Card,{sx:{pb:1,mb:3},children:[u.jsx(xn,{label:t.classicQuizURL,placeholder:"",defaultValue:i,required:!1,size:"md",endDecorator:u.jsx(G,{title:t.quizzesInfoMessage}),onChange:j=>o(j.target.value)}),u.jsx(xn,{label:t.eitherOrURL,placeholder:"",defaultValue:a,required:!1,size:"md",endDecorator:u.jsx(G,{title:t.eitherOrsInfoMessage}),onChange:j=>s(j.target.value)}),u.jsx(xn,{label:t.pollURL,placeholder:"",defaultValue:l,required:!1,size:"md",endDecorator:u.jsx(G,{title:t.pollsInfoMessage}),onChange:j=>c(j.target.value)})]}),T=()=>u.jsxs(b.Card,{sx:{pb:1,mb:3},children:[u.jsx(xu,{label:t.itemsPerPage,description:t.itemsPerPageDescription,defaultValue:d,onChange:j=>f(j||null),size:"md"}),u.jsx(xu,{label:t.itemsPerRow,description:t.itemsPerRowDescription,defaultValue:h,onChange:j=>p(j||null),size:"md"}),u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:t.mode}),u.jsx(b.Select,{defaultValue:m,onChange:(j,Y)=>g(Y),children:hF.map((j,Y)=>u.jsx(b.Option,{value:j,children:pF[j]},`basic-select-${j}-${Y}`))}),u.jsx(b.FormHelperText,{children:t.modeDescription})]})]});return u.jsxs(b.Box,{mt:1,children:[T(),u.jsx(fs,{defaultValue:n,label:t.configureURLs,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:j=>{j===!1&&(o(""),s(""),c("")),r(j)}}),n&&F(),u.jsxs(b.Box,{position:"relative",mb:1,children:[u.jsx(b.Textarea,{value:D,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:j=>j.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),u.jsx(b.Tooltip,{title:t.copyToClipboard,children:u.jsx(b.Button,{onClick:()=>{navigator.clipboard.writeText(D)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:u.jsx(Oe.ContentCopy,{})})})]}),u.jsx(b.Alert,{variant:"outlined",color:"primary",startDecorator:u.jsx(ni,{}),sx:{mb:1,width:"fit-content"},children:u.jsxs(b.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[t.divElementTextInfo,u.jsx(b.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},db=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})))||[],mF={Login:QR,InformationInput:xn,RichText:dc,HeaderButtons:SP,MarketSelection:uL,Accordion:fT,DynamicFields:jP,BasicSelect:pT,BooleanSwitch:fs,Branding:IP,ProfileSearchSelect:DM,RangeCalendar:FP,CompetitionSearchSelect:_M,Related:pL,Images:AR,Duration:NP,DatePickerComponent:no,Flags:CR,Spinner:ds,Tags:Rm,Toast:at,AdContent:hT,Match:dL,Winners:xB,CompetitionsSearchSelect:PM,TeamsSearchSelect:OM,CustomSelect:PL,Schedule:IL,NoPermissionCard:zP,CustomFlatpickrCalendar:Qc,ContextSelectFilter:wB,NumberInput:xu,EntityContext:e$,MiniGamesImages:n$,AuthRequirement:r$,SortableList:YN,ItemsPerPageFilter:KN,ImageCard:lo,RelatedRelationship:lF,ExportUsersLeads:cF,SignOutButton:sg,BasicSortableList:dF,WidgetEmbedCode:fF,WidgetListEmbedCode:gF,AdvancedProfileSearchSelect:({labels:e,ids:t,onChange:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState([]),[s,l]=C.useState(""),[c,d]=C.useState("name"),[f,h]=C.useState(!1),[p,m]=C.useState(!1),{sdk:g}=ft(),v=!0,S=()=>m(!p),I=(A,E)=>{i(E);const _=E.map(D=>D.id);n(_&&_.length?_:null)},x=3;C.useEffect(()=>{!s&&t&&t.length&&g.profile.getByIds(t,void 0,v).then(A=>{i(db(A))}).catch(A=>{S(),console.error(A),i([])})},[]);const w=C.useMemo(()=>Sr((A,E)=>{h(!0),g.profile.getByIds(E==="id"?[A]:[],E==="name"?A:void 0,v).then(_=>{a([...db(_)]),h(!1)}).catch(_=>{console.error(_),S(),a([]),h(!1)})},300),[]);C.useEffect(()=>{if(!s||s.length<x){a([]);return}return w(s,c),()=>w.cancel()},[s,w,c]);const y=(A,E)=>A.map((_,D)=>{var G;return u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:F=>E({index:D}).onClick(F),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:(G=_.avatar)!=null?G:st.avatar}),u.jsx(b.Typography,{children:_.label})]})},_.id)});return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:f,disableClearable:!0,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(A,E)=>A.id===E.id,endDecorator:u.jsxs(u.Fragment,{children:[f&&u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary",marginRight:2}}),u.jsx(b.Divider,{orientation:"vertical"}),u.jsxs(b.Select,{variant:"plain",value:c,onChange:(A,E)=>d(E),slotProps:{listbox:{variant:"outlined"}},sx:{mr:-1.5,"&:hover":{bgcolor:"transparent"}},children:[u.jsx(b.Option,{value:"name",children:e.searchByName}),u.jsx(b.Option,{value:"id",children:e.searchById})]})]}),placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:A=>A.filter(E=>!r.some(_=>_.value===E.value)),onInputChange:(A,E)=>{l(E)},onChange:I,getOptionKey:A=>A.id,value:r,renderTags:y,renderOption:(A,E)=>{var _;return u.jsx(b.AutocompleteOption,q(N({},A),{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.avatar)!=null?_:st.avatar}),u.jsx(b.Typography,{children:E.label})]})}))}})}),u.jsx(at,{showToast:p,message:e.searchProfilesErrorMessage,color:"danger",hideToast:S})]})},FormatNumber:({value:e,sx:t,tooltipPlacement:n})=>{const r=l=>{const c=Math.abs(l);return c>=1e9?(l/1e9).toFixed(1)+"b":c>=1e6?(l/1e6).toFixed(1)+"m":c>=1e3?(l/1e3).toFixed(1)+"k":l.toString()},i=l=>new Intl.NumberFormat("en-US").format(l),o=Math.abs(e)>=1e3,a=r(e),s=i(e);return o?u.jsx(b.Tooltip,{title:s,placement:n,arrow:!0,children:u.jsx(b.Typography,{sx:t,children:a})}):u.jsx(b.Typography,{sx:t,children:a})}},fb=C.createContext(null),vF=({children:e})=>u.jsx(fb.Provider,{value:mF,children:e}),bF=()=>{const e=C.useContext(fb);if(!e)throw new Error("useComponentContext must be used within a ComponentProvider");return e},hb=425,pb=1024;return{APIProvider:AI,AuthProvider:TI,AuthContext:jf,ComponentProvider:vF,useComponentContext:bF,useAPIContext:ft,useIsMobile:()=>{const[e,t]=C.useState(window.innerWidth<=pb),[n,r]=C.useState(window.innerWidth<=hb);return C.useLayoutEffect(()=>{const i=()=>{t(window.innerWidth<=pb),r(window.innerWidth<=hb)};return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),{isMobile:e,isPhone:n}}}});
|