bstp-agent-widget 0.2.119 → 0.2.122

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/dist/shadow.cjs CHANGED
@@ -316,7 +316,7 @@ React keys must be passed directly to JSX without using spread:
316
316
  `)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[HC]=this[HC]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=UC(e);t[r]||(YC(n,e),t[r]=!0)}return Z.isArray(e)?e.forEach(r):r(e),this}};XC.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Z.reduceDescriptors(XC.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Z.freezeMethods(XC);function ZC(e,t){let n=this||zC,r=t||n,i=XC.from(r.headers),a=r.data;return Z.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function QC(e){return!!(e&&e.__CANCEL__)}var $C=class extends fC{constructor(e,t,n){super(e??`canceled`,fC.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function ew(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new fC(`Request failed with status code `+n.status,[fC.ERR_BAD_REQUEST,fC.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tw(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function nw(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function rw(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var iw=(e,t,n=3)=>{let r=0,i=nw(50,250);return rw(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},aw=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ow=e=>(...t)=>Z.asap(()=>e(...t)),sw=NC.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,NC.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(NC.origin),NC.navigator&&/(msie|trident)/i.test(NC.navigator.userAgent)):()=>!0,cw=NC.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Z.isString(r)&&s.push(`path=${r}`),Z.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),Z.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function lw(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function uw(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function dw(e,t,n){let r=!lw(t);return e&&(r||n==0)?uw(e,t):t}var fw=e=>e instanceof XC?{...e}:e;function pw(e,t){t||={};let n={};function r(e,t,n,r){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:r},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function i(e,t,n,i){if(!Z.isUndefined(t))return r(e,t,n,i);if(!Z.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!Z.isUndefined(t))return r(void 0,t)}function o(e,t){if(!Z.isUndefined(t))return r(void 0,t);if(!Z.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(fw(e),fw(t),n,!0)};return Z.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=Z.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);Z.isUndefined(o)&&a!==s||(n[r]=o)}),n}var mw=e=>{let t=pw({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=XC.from(o),t.url=CC(dw(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),Z.isFormData(n)){if(NC.hasStandardBrowserEnv||NC.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Z.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(NC.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(t)),r||r!==!1&&sw(t.url))){let e=i&&a&&cw.read(a);e&&o.set(i,e)}return t},hw=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=mw(e),i=r.data,a=XC.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=XC.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());ew(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new fC(`Request aborted`,fC.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new fC(t&&t.message?t.message:`Network Error`,fC.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||TC;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new fC(t,i.clarifyTimeoutError?fC.ETIMEDOUT:fC.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&Z.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),Z.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=iw(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=iw(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new $C(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=tw(r.url);if(_&&NC.protocols.indexOf(_)===-1){n(new fC(`Unsupported protocol `+_+`:`,fC.ERR_BAD_REQUEST,e));return}h.send(i||null)})},gw=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof fC?t:new $C(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new fC(`timeout of ${t}ms exceeded`,fC.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>Z.asap(o),s}},_w=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},vw=async function*(e,t){for await(let n of yw(e))yield*_w(n,t)},yw=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},bw=(e,t,n,r)=>{let i=vw(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},xw=64*1024,{isFunction:Sw}=Z,Cw=(({Request:e,Response:t})=>({Request:e,Response:t}))(Z.global),{ReadableStream:ww,TextEncoder:Tw}=Z.global,Ew=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dw=e=>{e=Z.merge.call({skipUndefined:!0},Cw,e);let{fetch:t,Request:n,Response:r}=e,i=t?Sw(t):typeof fetch==`function`,a=Sw(n),o=Sw(r);if(!i)return!1;let s=i&&Sw(ww),c=i&&(typeof Tw==`function`?(e=>t=>e.encode(t))(new Tw):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Ew(()=>{let e=!1,t=new ww,r=new n(NC.origin,{body:t,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return t.cancel(),e&&!r}),u=o&&s&&Ew(()=>Z.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new fC(`Response type '${e}' is not supported`,fC.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e))return(await new n(NC.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(e)||Z.isArrayBuffer(e))return e.byteLength;if(Z.isURLSearchParams(e)&&(e+=``),Z.isString(e))return(await c(e)).byteLength},p=async(e,t)=>Z.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=mw(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=gw([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(Z.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=aw(T,iw(ow(g)));s=bw(e.body,xw,t,n)}}Z.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=Z.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&aw(t,iw(ow(h),!0))||[];f=new r(bw(f.body,xw,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let E=await d[Z.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{ew(t,n,{data:E,headers:XC.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new fC(`Network Error`,fC.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):fC.from(t,t&&t.code,e,C,t&&t.response)}}},Ow=new Map,kw=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Ow;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Dw(t)),l=c;return c};kw();var Aw={http:null,xhr:hw,fetch:{get:kw}};Z.forEach(Aw,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var jw=e=>`- ${e}`,Mw=e=>Z.isFunction(e)||e===null||e===!1;function Nw(e,t){e=Z.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Mw(r)&&(i=Aw[(n=String(r)).toLowerCase()],i===void 0))throw new fC(`Unknown adapter '${n}'`);if(i&&(Z.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new fC(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
317
317
  `+e.map(jw).join(`
318
318
  `):` `+jw(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Pw={getAdapter:Nw,adapters:Aw};function Fw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $C(null,e)}function Iw(e){return Fw(e),e.headers=XC.from(e.headers),e.data=ZC.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Pw.getAdapter(e.adapter||zC.adapter,e)(e).then(function(t){return Fw(e),t.data=ZC.call(e,e.transformResponse,t),t.headers=XC.from(t.headers),t},function(t){return QC(t)||(Fw(e),t&&t.response&&(t.response.data=ZC.call(e,e.transformResponse,t.response),t.response.headers=XC.from(t.response.headers))),Promise.reject(t)})}var Lw=`1.14.0`,Rw={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Rw[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var zw={};Rw.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Lw+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new fC(r(i,` has been removed`+(t?` in `+t:``)),fC.ERR_DEPRECATED);return t&&!zw[i]&&(zw[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Rw.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Bw(e,t,n){if(typeof e!=`object`)throw new fC(`options must be an object`,fC.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new fC(`option `+a+` must be `+n,fC.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fC(`Unknown option `+a,fC.ERR_BAD_OPTION)}}var Vw={assertOptions:Bw,validators:Rw},Hw=Vw.validators,Uw=class{constructor(e){this.defaults=e||{},this.interceptors={request:new wC,response:new wC}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=`
319
- `+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=pw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Vw.assertOptions(n,{silentJSONParsing:Hw.transitional(Hw.boolean),forcedJSONParsing:Hw.transitional(Hw.boolean),clarifyTimeoutError:Hw.transitional(Hw.boolean),legacyInterceptorReqResOrdering:Hw.transitional(Hw.boolean)},!1),r!=null&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:Vw.assertOptions(r,{encode:Hw.function,serialize:Hw.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Vw.assertOptions(t,{baseUrl:Hw.spelling(`baseURL`),withXsrfToken:Hw.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&Z.merge(i.common,i[t.method]);i&&Z.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=XC.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||TC;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Iw.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Iw.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=pw(this.defaults,e),CC(dw(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Z.forEach([`delete`,`get`,`head`,`options`],function(e){Uw.prototype[e]=function(t,n){return this.request(pw(n||{},{method:e,url:t,data:(n||{}).data}))}}),Z.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(pw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Uw.prototype[e]=t(),Uw.prototype[e+`Form`]=t(!0)});var Ww=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new $C(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Gw(e){return function(t){return e.apply(null,t)}}function Kw(e){return Z.isObject(e)&&e.isAxiosError===!0}var qw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qw).forEach(([e,t])=>{qw[t]=e});function Jw(e){let t=new Uw(e),n=tS(Uw.prototype.request,t);return Z.extend(n,Uw.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Jw(pw(e,t))},n}var Yw=Jw(zC);Yw.Axios=Uw,Yw.CanceledError=$C,Yw.CancelToken=Ww,Yw.isCancel=QC,Yw.VERSION=Lw,Yw.toFormData=vC,Yw.AxiosError=fC,Yw.Cancel=Yw.CanceledError,Yw.all=function(e){return Promise.all(e)},Yw.spread=Gw,Yw.isAxiosError=Kw,Yw.mergeConfig=pw,Yw.AxiosHeaders=XC,Yw.formToJSON=e=>LC(Z.isHTMLForm(e)?new FormData(e):e),Yw.getAdapter=Pw.getAdapter,Yw.HttpStatusCode=qw,Yw.default=Yw;var{Axios:Xw,AxiosError:Zw,CanceledError:Qw,isCancel:$w,CancelToken:eT,VERSION:tT,all:nT,Cancel:rT,isAxiosError:iT,spread:aT,toFormData:oT,AxiosHeaders:sT,HttpStatusCode:cT,formToJSON:lT,getAdapter:uT,mergeConfig:dT}=Yw,fT=`genai_access_token`,pT=`genai_tenant_id`,mT=`genai_switch_ready`;function hT(e){try{let t=JSON.parse(atob(e.split(`.`)[1]));return t.exp?t.exp*1e3<Date.now():!1}catch{return!0}}function gT(){if(typeof sessionStorage<`u`){let e=sessionStorage.getItem(fT);return e&&hT(e)?(sessionStorage.removeItem(fT),null):e}return null}function _T(e){typeof sessionStorage<`u`&&sessionStorage.setItem(fT,e)}function vT(){return typeof sessionStorage<`u`?sessionStorage.getItem(pT):null}function yT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(pT,String(e))}function bT(){return typeof sessionStorage<`u`?sessionStorage.getItem(mT)===`true`:!1}function xT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(mT,String(e))}function ST(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function CT(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var wT=ST({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5});function TT(e,t){let n=e.getState(),r=CT(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function ET(e,t=wT){let n=e.id||gt();return TT(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function DT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M11.992 15H12.001`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M12 12V8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function OT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function kT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M12.2422 17V12C12.2422 11.5286 12.2422 11.2929 12.0957 11.1464C11.9493 11 11.7136 11 11.2422 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M11.992 8H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function AT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M5.32171 9.68293C7.73539 5.41199 8.94222 3.27651 10.5983 2.72681C11.5093 2.4244 12.4907 2.4244 13.4017 2.72681C15.0578 3.27651 16.2646 5.41199 18.6783 9.68293C21.092 13.9538 22.2988 16.0893 21.9368 17.8293C21.7376 18.7866 21.2469 19.6548 20.535 20.3097C19.241 21.5 16.8274 21.5 12 21.5C7.17265 21.5 4.75897 21.5 3.46496 20.3097C2.75308 19.6548 2.26239 18.7866 2.06322 17.8293C1.70119 16.0893 2.90803 13.9538 5.32171 9.68293Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M11.992 16H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M12 13V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var jT={danger:(0,U.jsx)(DT,{}),info:(0,U.jsx)(kT,{}),success:(0,U.jsx)(OT,{}),warning:(0,U.jsx)(AT,{})};function MT(e,t){let n=jT[e];ET({...t,variant:e,icon:n})}function NT(e){MT(`danger`,{title:Pe._({id:`SlfejT`}),...e})}function PT(){return Pe._({id:`Qlh+W2`})}function FT(e,t){return{}[e]}function IT(e){return e?{401:Pe._({id:`9cOLBO`}),403:Pe._({id:`qriaXz`}),404:Pe._({id:`373i3G`}),500:Pe._({id:`lkE00/`}),502:Pe._({id:`9dPdtH`}),503:Pe._({id:`Vw36Gt`}),504:Pe._({id:`3R0fAs`})}[e]:``}var LT=`react-starter-kit-`,RT=Object.entries({BUILD_META_DATA_INSPECTOR:`buildMetaDataInspector`,COLOR_SCHEME:`colorScheme`,DEBUG:`debug`,ENVIRONMENT_INSPECTOR:`environmentInspector`,INCLUDE_BEARER:`includeBearer`,KEYCLOAK_ERROR:`keycloakError`,LANGUAGE:`language`,LOCAL_STORAGE_INSPECTOR:`localStorageInspector`,LOGGER_LOG_LEVEL:`loggerLogLevel`,LOGGER:`logger`,SHOW_HTTP_ERROR_DEBUG_TOASTER:`showHttpErrorDebugToaster`,TABLE_VIEW:`tableView`,DRAWER_EXPANDED:`drawerExpanded`,PANEL_OPEN:`panelOpen`,PERMISSION_GOD_MODE:`permissionGodMode`}).reduce((e,[t,n])=>({...e,[t]:`${LT}${n}`}),{});function zT(e,t=null){let n=localStorage.getItem(e);if(n===null)return t;try{let e=JSON.parse(n);return typeof t==`boolean`?typeof e==`boolean`?e:t:typeof t==`number`?typeof e==`number`&&!Number.isNaN(e)?e:t:e}catch{return typeof t==`string`?n:t}}function BT(){return zT(RT.DEBUG,!1),!0}function VT(){return BT()?zT(RT.SHOW_HTTP_ERROR_DEBUG_TOASTER,!1):!1}function HT(e){return e?.operationResultCode!==void 0}function UT(e){return e?.error!==void 0}function WT(e){let t=e.response?.headers;if(!t)return!1;let n=`application/problem+json`,r=`Content-Type`;return typeof t.get==`function`?t.get(r)===n:t[r]===n}function GT(e){return HT(e)?e.description:UT(e)?e.error:e?.message||e?.errorCode||PT()}function KT(e){return e.code?FT(e.code)||PT():``}function qT(e){return{url:e.config?.url,method:e.config?.method?.toUpperCase(),status:e.response?.status,response:e.response?.data}}function JT(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function YT({url:e,method:t,status:n,response:r}){let i=r!=null&&Object.keys(r).length>0;return(0,U.jsxs)(By,{children:[[{label:Pe._({id:`IagCbF`}),value:e},{label:Pe._({id:`fiPesM`}),value:t},{label:Pe._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,U.jsxs)(Tu,{gap:4,children:[(0,U.jsxs)(Yf,{size:`xs`,fw:500,children:[e,`:`]}),(0,U.jsx)(Yf,{size:`xs`,children:t})]},n)),i&&(0,U.jsx)(Fm,{block:!0,lh:1.2,children:JT(r)})]})}function XT(e){let t=e.response?.data;return HT(t)?t.operationResultCode:UT(t)?t.error:t?.errorCode||t?.code||t?.message||``}function ZT(e){return e.response?.data?.status||e.response?.status||e.status}function QT(e){let t=e.response?.data,n=XT(e);if(n){let e=FT(n);if(e)return e}return GT(t)}function $T(e){let t=e.response?.data;return KT(t)||IT(ZT(e))}function eE(e){return e.response?.data?WT(e)?$T(e):QT(e):e.message}function tE(e){return e.response?.data?.errorId}function nE(e){let t=eE(e),n=WT(e)?tE(e):void 0;return n?(0,U.jsxs)(By,{gap:8,children:[(0,U.jsx)(Yf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,U.jsxs)(Yf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Pe._({id:`jf+o1U`}),`: `,n]})]}):t}function rE(e){if(!e)return PT();if(VT()){let t=qT(e);return Object.values(t).some(Boolean)?(0,U.jsx)(By,{children:YT(t)}):nE(e)}return nE(e)}function iE(){return VT()?Pe._({id:`J5ej6L`}):Pe._({id:`SlfejT`})}function aE(e){NT({title:iE(),message:rE(e),autoClose:VT()?!1:5e3})}var oE=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},sE=(e=>e?oE(e):oE),cE=e=>e;function lE(e,t=cE){let n=H.useSyncExternalStore(e.subscribe,H.useCallback(()=>t(e.getState()),[e,t]),H.useCallback(()=>t(e.getInitialState()),[e,t]));return H.useDebugValue(n),n}var uE=e=>{let t=sE(e),n=e=>lE(t,e);return Object.assign(n,t),n},dE=(e=>e?uE(e):uE),fE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function pE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var mE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:pE(),spanId:pE().substring(0,16)};return this.contextMap.set(e,t),t}startSpan(e){let t=this.contextMap.get(e);if(!t)return this.startTrace(e);let n=pE().substring(0,16),r={traceId:t.traceId,spanId:n,parentSpanId:t.spanId};return this.contextMap.set(e,r),r}getCurrentContext(e){return this.contextMap.get(e)}clearContext(e){this.contextMap.delete(e)}}.getInstance(),hE=class e{static{this.globalConfig={enabled:!0,minLogLevel:`INFO`,applicationName:`frontend`}}constructor(t,n={}){this.name=t,this.additionalFields=n.additionalFields??{},this.config={enabled:n.enabled??BT(),minLogLevel:n.minLogLevel??e.globalConfig.minLogLevel}}createLogEntry(t,n,r){let i=mE.getCurrentContext(this.name)??mE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:fE[t],applicationName:e.globalConfig.applicationName,traceId:i.traceId,spanId:i.spanId,...i.parentSpanId&&{parentSpanId:i.parentSpanId},...this.additionalFields,...r}}log(t,n,r){if(!(!this.config.enabled||!e.globalConfig.enabled||fE[t]<fE[this.config.minLogLevel])){let e=Object.fromEntries(Object.entries(r??{}).map(([e,t])=>[e,t?.toString()??t]));Object.keys(e).length>0?console.log(n,e):console.log(n)}}debug(e,t){this.log(`DEBUG`,e,t)}info(e,t){this.log(`INFO`,e,t)}warn(e,t){this.log(`WARN`,e,t)}error(e,t){this.log(`ERROR`,e,t)}startSpan(){mE.startSpan(this.name)}clearTraceContext(){mE.clearContext(this.name)}setEnabled(e){this.config.enabled=e}setMinLogLevel(e){this.config.minLogLevel=e}static setGlobalEnabled(t){e.globalConfig.enabled=t}static getGlobalEnabled(){return e.globalConfig.enabled}static setGlobalMinLogLevel(t){e.globalConfig.minLogLevel=t}static getGlobalMinLogLevel(){return e.globalConfig.minLogLevel}static setGlobalApplicationName(t){e.globalConfig.applicationName=t}};new hE(`KeycloakService`);var gE=null;function _E(){return gE?.token?`Bearer ${gE.token}`:void 0}function vE(){return gE}var yE=new Xx({queryCache:new Yx({onError:(e,t)=>{(t.meta?.handleGlobalError??!0)&&e instanceof Zw&&aE(e)}}),mutationCache:new Kx({onError:(e,t,n,r)=>{(r.meta?.handleGlobalError??!0)&&e instanceof Zw&&aE(e)}}),defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:600*1e3},mutations:{retry:!1}}});function bE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?xE(r):t===`private`||n?SE(r):xE(r):r}function xE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function SE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function CE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function wE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Yw.create({baseURL:CE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=vE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=bE(e.url||``,e.accessScope,t));let i=gT(),a=vT();i&&!e.headers.has(`Authorization`)&&(e.headers.Authorization=`Bearer ${i}`),a&&!e.headers.has(`x-tenant-id`)&&(e.headers[`x-tenant-id`]=a);let o=_E();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Pe.locale),!e.headers.has(`Content-Type`)&&!(e.data instanceof FormData)&&(e.headers[`Content-Type`]=`application/json`),e.method?.toLowerCase()===`get`&&(e.data={}),e},e=>Promise.reject(e)),i}var TE;function EE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;wE({baseUrl:n,prefix:r.crm}),wE({baseUrl:n,prefix:r.uiAuthz}),TE=wE({baseUrl:i,prefix:``,timeoutMs:12e4})}var Q=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,g={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(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))(),1);function DE({type:e,date:t,locale:n,format:r,labelSeparator:i}){let a=e=>(0,Q.default)(e).locale(n).format(r);return e===`default`?t===null?``:a(t):e===`multiple`?t.map(a).join(`, `):e===`range`&&Array.isArray(t)?t[0]&&t[1]?`${a(t[0])} ${i} ${a(t[1])}`:t[0]?`${a(t[0])} ${i} `:``:``}function OE({formatter:e,...t}){return(e||DE)(t)}function kE({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function AE({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=kE({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?AE({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function jE(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function ME(e){return e.current?.map(e=>e.map(e=>e.length))}function NE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=jE(i.key);a&&(i.preventDefault(),AE({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:ME(e)}))}function PE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD`)}function FE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function IE({minDate:e,maxDate:t}){let n=(0,Q.default)();return!e&&!t?PE(n):e&&(0,Q.default)(n).isBefore(e)?PE(e):t&&(0,Q.default)(n).isAfter(t)?PE(t):PE(n)}var LE=(0,H.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function RE(){let e=(0,H.use)(LE),t=(0,H.useCallback)(t=>t||e.locale,[e.locale]),n=(0,H.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,H.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,H.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function zE({value:e,type:t,withTime:n}){let r=n?FE:PE;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} – ${n}`:`${t} –`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function BE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,U.jsx)(`input`,{type:`hidden`,value:zE({value:e,type:t,withTime:i}),name:n,form:r})}BE.displayName=`@mantine/dates/HiddenDatesInput`;var VE={day:`m_396ce5cb`},HE=Sn((e,{size:t})=>({day:{"--day-size":it(t,`day-size`)}})),UE=K(e=>{let t=W(`Day`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,date:c,disabled:l,__staticSelector:u,weekend:d,outside:f,selected:p,renderDay:m,inRange:h,firstInRange:g,lastInRange:_,hidden:v,static:y,highlightToday:b,fullWidth:x,attributes:S,...C}=t;return(0,U.jsx)(ul,{...G({name:u||`Day`,classes:VE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:HE,rootSelector:`day`})(`day`,{style:v?{display:`none`}:void 0}),component:y?`div`:`button`,disabled:l,"data-today":(0,Q.default)(c).isSame(new Date,`day`)||void 0,"data-hidden":v||void 0,"data-highlight-today":b||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!f&&d||void 0,"data-outside":!l&&f||void 0,"data-selected":!l&&p||void 0,"data-in-range":h&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":_&&!l||void 0,"data-static":y||void 0,"data-full-width":x||void 0,unstyled:o,...C,children:m?.(c)||(0,Q.default)(c).date()})});UE.classes=VE,UE.varsResolver=HE,UE.displayName=`@mantine/dates/Day`;function WE({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,Q.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,Q.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,Q.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var GE={weekday:`m_18a3eca`},KE=Sn((e,{size:t})=>({weekdaysRow:{"--wr-fz":st(t),"--wr-spacing":at(t)}})),qE=K(e=>{let t=W(`WeekdaysRow`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,locale:c,firstDayOfWeek:l,weekdayFormat:u,cellComponent:d=`th`,__staticSelector:f,withWeekNumbers:p,attributes:m,...h}=t,g=G({name:f||`WeekdaysRow`,classes:GE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:KE,rootSelector:`weekdaysRow`}),_=RE(),v=WE({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,U.jsx)(d,{...g(`weekday`),children:e},t));return(0,U.jsxs)(q,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,U.jsx)(d,{...g(`weekday`),children:`#`}),v]})});qE.classes=GE,qE.varsResolver=KE,qE.displayName=`@mantine/dates/WeekdaysRow`;function JE(e,t=1){let n=(0,Q.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function YE(e,t=1){let n=(0,Q.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function XE({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,Q.default)((0,Q.default)(e).subtract((0,Q.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=JE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Q.default)(YE(i,t));for(;(0,Q.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,Q.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function ZE(e,t){return(0,Q.default)(e).format(`YYYY-MM`)===(0,Q.default)(t).format(`YYYY-MM`)}function QE(e,t){return t?(0,Q.default)(e).isAfter((0,Q.default)(t).subtract(1,`day`),`day`):!0}function $E(e,t){return t?(0,Q.default)(e).isBefore((0,Q.default)(t).add(1,`day`),`day`):!0}function eD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>$E(e,n)&&QE(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||ZE(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Q.default)().isSame(e,`date`))||s[0]}var tD=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){"use strict";var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);Q.default.extend(tD.default);function nD(e){return(0,Q.default)(e.find(e=>(0,Q.default)(e).day()===1)).isoWeek()}var rD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},iD={withCellSpacing:!0},aD=Sn((e,{size:t})=>({weekNumber:{"--wn-fz":st(t),"--wn-size":it(t,`wn-size`)}})),oD=K(e=>{let t=W(`Month`,iD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,month:f,weekendDays:p,getDayProps:m,excludeDate:h,minDate:g,maxDate:_,renderDay:v,hideOutsideDates:y,hideWeekdays:b,getDayAriaLabel:x,static:S,__getDayRef:C,__onDayKeyDown:w,__onDayClick:T,__onDayMouseEnter:E,__preventFocus:D,__stopPropagation:O,withCellSpacing:k,size:A,highlightToday:j,withWeekNumbers:M,fullWidth:N,attributes:P,...ee}=t,F=G({name:c||`Month`,classes:rD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:aD,rootSelector:`month`}),I=RE(),te=XE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=eD({dates:te,minDate:PE(g),maxDate:PE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Hr({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!ZE(e,f),i=x?.(e)||(0,Q.default)(e).locale(l||I.locale).format(`D MMMM YYYY`),a=m?.(e),s=(0,Q.default)(e).isSame(ne,`date`);return(0,U.jsx)(`td`,{...F(`monthCell`),"data-with-spacing":k||void 0,children:(0,U.jsx)(UE,{__staticSelector:c||`Month`,classNames:re,styles:ie,attributes:P,unstyled:o,"data-mantine-stop-propagation":O||void 0,highlightToday:j,renderDay:v,date:e,size:A,weekend:I.getWeekendDays(p).includes((0,Q.default)(e).get(`day`)),outside:r,hidden:y?r:!1,"aria-label":i,static:S,fullWidth:N,disabled:h?.(e)||!$E(e,PE(_))||!QE(e,PE(g)),ref:e=>{e&&C?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),w?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),E?.(t,e)},onClick:t=>{a?.onClick?.(t),T?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),D&&e.preventDefault()},tabIndex:D||!s?-1:0})},e.toString())});return(0,U.jsxs)(`tr`,{...F(`monthRow`),children:[M&&(0,U.jsx)(`td`,{...F(`weekNumber`),children:nD(e)}),n]},t)});return(0,U.jsxs)(q,{component:`table`,...F(`month`),size:A,"data-full-width":N||void 0,...ee,children:[!b&&(0,U.jsx)(`thead`,{...F(`monthThead`),children:(0,U.jsx)(qE,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:re,styles:ie,unstyled:o,attributes:P})}),(0,U.jsx)(`tbody`,{...F(`monthTbody`),children:L})]})});oD.classes=rD,oD.varsResolver=aD,oD.displayName=`@mantine/dates/Month`;var sD={pickerControl:`m_dc6a3c71`},cD=Sn((e,{size:t})=>({pickerControl:{"--dpc-fz":st(t),"--dpc-size":it(t,`dpc-size`)}})),lD=K(e=>{let t=W(`PickerControl`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,firstInRange:c,lastInRange:l,inRange:u,__staticSelector:d,selected:f,disabled:p,fullWidth:m,attributes:h,...g}=t;return(0,U.jsx)(ul,{...G({name:d||`PickerControl`,classes:sD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:cD,rootSelector:`pickerControl`})(`pickerControl`),unstyled:o,"data-picker-control":!0,"data-full-width":m||void 0,"data-selected":f&&!p||void 0,"data-disabled":p||void 0,"data-in-range":u&&!p&&!f||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":l&&!p||void 0,disabled:p,...g})});lD.classes=sD,lD.varsResolver=cD,lD.displayName=`@mantine/dates/PickerControl`;function uD({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Q.default)(e).isBefore(t,`year`)||n&&(0,Q.default)(e).isAfter(n,`year`))}function dD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!uD({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Q.default)().isSame(e,`year`))||i[0]}function fD(e){let t=(0,Q.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,Q.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var pD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},mD={yearsListFormat:`YYYY`,withCellSpacing:!0},hD=K(e=>{let t=W(`YearsList`,mD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,decade:c,yearsListFormat:l,locale:u,minDate:d,maxDate:f,getYearControlProps:p,__staticSelector:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=G({name:m||`YearsList`,classes:pD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=RE(),O=fD(c),k=dD({years:O,minDate:d,maxDate:f,getYearControlProps:p}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=p?.(e),i=(0,Q.default)(e).isSame(k,`year`);return(0,U.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,U.jsx)(lD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:uD({year:e,minDate:d,maxDate:f}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Q.default)(e).locale(D.getLocale(u)).format(l)})},n)});return(0,U.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,U.jsx)(q,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,U.jsx)(`tbody`,{children:A})})});hD.classes=pD,hD.displayName=`@mantine/dates/YearsList`;function gD({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Q.default)(e).isBefore(t,`month`)||n&&(0,Q.default)(e).isAfter(n,`month`))}function _D({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!gD({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Q.default)().isSame(e,`month`))||i[0]}function vD(e){let t=(0,Q.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,Q.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var yD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},bD={monthsListFormat:`MMM`,withCellSpacing:!0},xD=K(e=>{let t=W(`MonthsList`,bD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,year:l,monthsListFormat:u,locale:d,minDate:f,maxDate:p,getMonthControlProps:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=G({name:c||`MonthsList`,classes:yD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=RE(),O=vD(l),k=_D({months:O,minDate:PE(f),maxDate:PE(p),getMonthControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,Q.default)(e).isSame(k,`month`);return(0,U.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,U.jsx)(lD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:gD({month:e,minDate:PE(f),maxDate:PE(p)}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Q.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,U.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,U.jsx)(q,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,U.jsx)(`tbody`,{children:A})})});xD.classes=yD,xD.displayName=`@mantine/dates/MonthsList`;var SD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},CD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},wD=Sn((e,{size:t})=>({calendarHeader:{"--dch-control-size":it(t,`dch-control-size`),"--dch-fz":st(t)}})),TD=K(e=>{let t=W(`CalendarHeader`,CD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,nextIcon:c,previousIcon:l,nextLabel:u,previousLabel:d,onNext:f,onPrevious:p,onLevelClick:m,label:h,nextDisabled:g,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:y,withNext:b,withPrevious:x,headerControlsOrder:S,fullWidth:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=t,k=G({name:w||`CalendarHeader`,classes:SD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:wD,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,H.createElement)(ul,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":d,onClick:p,unstyled:o,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,U.jsx)(Nf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,H.createElement)(ul,{component:v?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:v?m:void 0,unstyled:o,onMouseDown:v?A:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":y,tabIndex:T||!v?-1:0,"data-mantine-stop-propagation":E||void 0},h),N=b&&(0,H.createElement)(ul,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":u,onClick:f,unstyled:o,onMouseDown:A,disabled:g,"data-disabled":g||void 0,tabIndex:T||g?-1:0,"data-mantine-stop-propagation":E||void 0},c||(0,U.jsx)(Nf,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=S.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,U.jsx)(q,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});TD.classes=SD,TD.varsResolver=wD,TD.displayName=`@mantine/dates/CalendarHeader`;function ED(e){let t=fD(e);return[t[0][0],t[3][0]]}var DD={decadeLabelFormat:`YYYY`},OD=K(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:y,previousDisabled:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,decadeLabelFormat:T,classNames:E,styles:D,unstyled:O,__staticSelector:k,__stopPropagation:A,size:j,fullWidth:M,attributes:N,...P}=W(`DecadeLevel`,DD,e),ee=RE(),[F,I]=ED(t),te={__staticSelector:k||`DecadeLevel`,classNames:E,styles:D,unstyled:O,size:j,attributes:N},ne=typeof y==`boolean`?y:i?!(0,Q.default)(I).endOf(`year`).isBefore(i):!1,re=typeof b==`boolean`?b:r?!(0,Q.default)(F).startOf(`year`).isAfter(r):!1,ie=(e,t)=>(0,Q.default)(e).locale(n||ee.locale).format(t);return(0,U.jsxs)(q,{"data-decade-level":!0,size:j,...P,children:[(0,U.jsx)(TD,{label:typeof T==`function`?T(F,I):`${ie(F,T)} – ${ie(I,T)}`,__preventFocus:f,__stopPropagation:A,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:ne,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,fullWidth:M,...te}),(0,U.jsx)(hD,{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:A,withCellSpacing:d,fullWidth:M,...te})]})});OD.classes={...hD.classes,...TD.classes},OD.displayName=`@mantine/dates/DecadeLevel`;var kD={yearLabelFormat:`YYYY`},AD=K(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,yearLabelFormat:D,__staticSelector:O,__stopPropagation:k,size:A,classNames:j,styles:M,unstyled:N,fullWidth:P,attributes:ee,...F}=W(`YearLevel`,kD,e),I=RE(),te={__staticSelector:O||`YearLevel`,classNames:j,styles:M,unstyled:N,size:A,attributes:ee},ne=typeof b==`boolean`?b:i?!(0,Q.default)(t).endOf(`year`).isBefore(i):!1,re=typeof x==`boolean`?x:r?!(0,Q.default)(t).startOf(`year`).isAfter(r):!1;return(0,U.jsxs)(q,{"data-year-level":!0,size:A,...F,children:[(0,U.jsx)(TD,{label:typeof D==`function`?D(t):(0,Q.default)(t).locale(n||I.locale).format(D),__preventFocus:f,__stopPropagation:k,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:ne,previousDisabled:re,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,fullWidth:P,...te}),(0,U.jsx)(xD,{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:k,withCellSpacing:d,fullWidth:P,...te})]})});AD.classes={...TD.classes,...xD.classes},AD.displayName=`@mantine/dates/YearLevel`;var jD={monthLabelFormat:`MMMM YYYY`},MD=K(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:A,previousDisabled:j,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,monthLabelFormat:I,classNames:te,styles:ne,unstyled:re,__staticSelector:ie,size:L,static:ae,fullWidth:oe,attributes:se,...ce}=W(`MonthLevel`,jD,e),le=RE(),ue={__staticSelector:ie||`MonthLevel`,classNames:te,styles:ne,unstyled:re,size:L,attributes:se},de=typeof A==`boolean`?A:l?!(0,Q.default)(t).endOf(`month`).isBefore(l):!1,fe=typeof j==`boolean`?j:c?!(0,Q.default)(t).startOf(`month`).isAfter(c):!1;return(0,U.jsxs)(q,{"data-month-level":!0,size:L,...ce,children:[(0,U.jsx)(TD,{label:typeof I==`function`?I(t):(0,Q.default)(t).locale(n||le.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:de,previousDisabled:fe,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,fullWidth:oe,...ue}),(0,U.jsx)(oD,{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,__preventFocus:x,__stopPropagation:S,static:ae,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:oe,...ue})]})});MD.classes={...oD.classes,...TD.classes},MD.displayName=`@mantine/dates/MonthLevel`;var ND={levelsGroup:`m_30b26e33`},PD=K(e=>{let t=W(`LevelsGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,fullWidth:l,attributes:u,...d}=t;return(0,U.jsx)(q,{...G({name:c||`LevelsGroup`,classes:ND,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,rootSelector:`levelsGroup`})(`levelsGroup`),"data-full-width":l||void 0,...d})});PD.classes=ND,PD.displayName=`@mantine/dates/LevelsGroup`;var FD={numberOfColumns:1},ID=K(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,headerControlsOrder:y,classNames:b,styles:x,unstyled:S,__staticSelector:C,__stopPropagation:w,numberOfColumns:T,levelControlAriaLabel:E,decadeLabelFormat:D,size:O,fullWidth:k,vars:A,attributes:j,...M}=W(`DecadeLevelGroup`,FD,e),N=(0,H.useRef)([]),P=Array(T).fill(0).map((e,A)=>{let M=(0,Q.default)(t).add(A*10,`years`).format(`YYYY-MM-DD`);return(0,U.jsx)(OD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:A,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,t,n)=>{Array.isArray(N.current[A])||(N.current[A]=[]),Array.isArray(N.current[A][e])||(N.current[A][e]=[]),N.current[A][e][t]=n},levelControlAriaLabel:typeof E==`function`?E(M):E,locale:n,minDate:r,maxDate:i,__preventFocus:u,__stopPropagation:w,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,getYearControlProps:o,__staticSelector:C||`DecadeLevelGroup`,classNames:b,styles:x,unstyled:S,withCellSpacing:l,headerControlsOrder:y,fullWidth:k,attributes:j},A)});return(0,U.jsx)(PD,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});ID.classes={...PD.classes,...OD.classes},ID.displayName=`@mantine/dates/DecadeLevelGroup`;var LD={numberOfColumns:1},RD=K(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,yearLabelFormat:k,size:A,fullWidth:j,vars:M,attributes:N,...P}=W(`YearLevelGroup`,LD,e),ee=(0,H.useRef)([]),F=Array(D).fill(0).map((e,M)=>{let P=(0,Q.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,U.jsx)(AD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:M,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:ee}),__getControlRef:(e,t,n)=>{Array.isArray(ee.current[M])||(ee.current[M]=[]),Array.isArray(ee.current[M][e])||(ee.current[M][e]=[]),ee.current[M][e][t]=n},levelControlAriaLabel:typeof O==`function`?O(P):O,locale:n,minDate:r,maxDate:i,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,getMonthControlProps:o,classNames:S,styles:C,unstyled:w,__staticSelector:T||`YearLevelGroup`,withCellSpacing:l,headerControlsOrder:x,fullWidth:j,attributes:N},M)});return(0,U.jsx)(PD,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});RD.classes={...AD.classes,...PD.classes},RD.displayName=`@mantine/dates/YearLevelGroup`;var zD={numberOfColumns:1},BD=K(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__onDayClick:m,__onDayMouseEnter:h,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,headerControlsOrder:A,classNames:j,styles:M,unstyled:N,numberOfColumns:P,levelControlAriaLabel:ee,monthLabelFormat:F,__staticSelector:I,__stopPropagation:te,size:ne,static:re,fullWidth:ie,vars:L,attributes:ae,...oe}=W(`MonthLevelGroup`,zD,e),se=(0,H.useRef)([]),ce=Array(P).fill(0).map((e,L)=>{let oe=(0,Q.default)(t).add(L,`months`).format(`YYYY-MM-DD`);return(0,U.jsx)(MD,{month:oe,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>NE({levelIndex:L,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:se}),__getDayRef:(e,t,n)=>{Array.isArray(se.current[L])||(se.current[L]=[]),Array.isArray(se.current[L][e])||(se.current[L][e]=[]),se.current[L][e][t]=n},levelControlAriaLabel:typeof ee==`function`?ee(oe):ee,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,classNames:j,styles:M,unstyled:N,__staticSelector:I||`MonthLevelGroup`,size:ne,static:re,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,headerControlsOrder:A,fullWidth:ie,attributes:ae},L)});return(0,U.jsx)(PD,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:ae,...oe,children:ce})});BD.classes={...PD.classes,...MD.classes},BD.displayName=`@mantine/dates/MonthLevelGroup`;var VD={input:`m_6fa5e2aa`},HD=K(e=>{let{inputProps:t,wrapperProps:n,placeholder:r,classNames:i,styles:a,unstyled:o,popoverProps:s,modalProps:c,dropdownType:l,children:u,formattedValue:d,dropdownHandlers:f,dropdownOpened:p,onClick:m,clearable:h,clearSectionMode:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=bf(`PickerInputBase`,{size:`sm`},e),A=(0,U.jsx)(yf.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,U.jsxs)(U.Fragment,{children:[l===`modal`&&!x&&(0,U.jsx)(hg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,U.jsx)(yf.Wrapper,{...n,children:(0,U.jsxs)($l,{position:`bottom-start`,opened:p,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...s,disabled:s?.disabled||l===`modal`||x,onChange:e=>{e||(s?.onClose?.(),j())},children:[(0,U.jsx)($l.Target,{children:(0,U.jsx)(yf,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{m?.(e),f.toggle()},__clearSection:A,__clearable:h&&b&&!x&&!S,__clearSectionMode:g,rightSection:y,...t,classNames:{...i,input:wn(VD.input,i?.input)},...k,children:d||(0,U.jsx)(yf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,U.jsx)($l.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,U.jsx)(BE,{value:C,name:w,form:T,type:E,withTime:O})]})});HD.classes=VD,HD.displayName=`@mantine/dates/PickerInputBase`;var UD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,WD=(e,t)=>{let n=t?FE:PE;return Array.isArray(e)?e.map(n):n(e)};function GD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,H.useRef)(e),[o,s,c]=Jt({value:WD(t,i),defaultValue:WD(n,i),finalValue:UD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?UD(e):n,s(l))),[l,s,c]}function KD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function qD(e){return e===0?`month`:e===1?`year`:`decade`}function JD(e,t,n){return qD(ht(KD(e,0),KD(t,0),KD(n,2)))}var YD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},XD=K(e=>{let t=W(`Calendar`,YD,e),{vars:n,maxLevel:r,minLevel:i,defaultLevel:a,level:o,onLevelChange:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,headerControlsOrder:b,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:S,__setDateRef:C,__setLevelRef:w,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,monthLabelFormat:P,nextIcon:ee,previousIcon:F,__onDayClick:I,__onDayMouseEnter:te,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,monthsListFormat:L,getMonthControlProps:ae,yearLabelFormat:oe,yearsListFormat:se,getYearControlProps:ce,decadeLabelFormat:le,classNames:ue,styles:de,unstyled:fe,minDate:R,maxDate:pe,locale:me,__staticSelector:he,size:ge,__preventFocus:z,__stopPropagation:_e,onNextDecade:ve,onPreviousDecade:B,onNextYear:ye,onPreviousYear:be,onNextMonth:xe,onPreviousMonth:Se,static:Ce,enableKeyboardNavigation:we,fullWidth:Te,attributes:Ee,ref:De,...Oe}=t,{resolvedClassNames:ke,resolvedStyles:Ae}=Hr({classNames:ue,styles:de,props:t}),[je,Me]=Jt({value:o?JD(o,i,r):void 0,defaultValue:a?JD(a,i,r):void 0,finalValue:JD(void 0,i,r),onChange:s}),[Ne,Pe]=GD({type:`default`,value:PE(c),defaultValue:PE(l),onChange:u});(0,H.useImperativeHandle)(C,()=>e=>{Pe(e)}),(0,H.useImperativeHandle)(w,()=>e=>{Me(e)});let Fe={__staticSelector:he||`Calendar`,styles:Ae,classNames:ke,unstyled:fe,size:ge,attributes:Ee},Ie=f||d||1,Le=(0,H.useRef)(null);if(Le.current===null){let e=new Date;Le.current=R&&(0,Q.default)(e).isAfter(R)?R:(0,Q.default)(e).format(`YYYY-MM-DD`)}let Re=Ne||Le.current,ze=()=>{let e=(0,Q.default)(Re).add(Ie,`month`).format(`YYYY-MM-DD`);xe?.(e),Pe(e)},Be=()=>{let e=(0,Q.default)(Re).subtract(Ie,`month`).format(`YYYY-MM-DD`);Se?.(e),Pe(e)},Ve=()=>{let e=(0,Q.default)(Re).add(Ie,`year`).format(`YYYY-MM-DD`);ye?.(e),Pe(e)},He=()=>{let e=(0,Q.default)(Re).subtract(Ie,`year`).format(`YYYY-MM-DD`);be?.(e),Pe(e)},V=()=>{let e=(0,Q.default)(Re).add(10*Ie,`year`).format(`YYYY-MM-DD`);ve?.(e),Pe(e)},Ue=()=>{let e=(0,Q.default)(Re).subtract(10*Ie,`year`).format(`YYYY-MM-DD`);B?.(e),Pe(e)},We=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(!we||Ce)return;let e=e=>{if(!We.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),Ue()):t&&(e.preventDefault(),He());break;case`ArrowDown`:t&&n?(e.preventDefault(),V()):t&&(e.preventDefault(),Ve());break;case`y`:case`Y`:je===`month`&&(e.preventDefault(),Me(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[we,Ce,je,Ve,He,V,Ue]),(0,U.jsxs)(q,{ref:qt(We,De),size:ge,"data-calendar":!0,"data-full-width":Te||void 0,...Oe,children:[je===`month`&&(0,U.jsx)(BD,{month:Re,minDate:R,maxDate:pe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:ze,onPrevious:Be,hasNextLevel:r!==`month`,onLevelClick:()=>Me(`year`),numberOfColumns:d,locale:me,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:ee,previousLabel:p?.previousMonth??h,previousIcon:F,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:z,__stopPropagation:_e,static:Ce,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:b,fullWidth:Te,...Fe}),je===`year`&&(0,U.jsx)(RD,{year:Re,numberOfColumns:d,minDate:R,maxDate:pe,monthsListFormat:L,getMonthControlProps:ae,locale:me,onNext:Ve,onPrevious:He,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>Me(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:ee,previousLabel:p?.previousYear??h,previousIcon:F,yearLabelFormat:oe,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Pe(t),Me(JD(`month`,i,r)),_?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe}),je===`decade`&&(0,U.jsx)(ID,{decade:Re,minDate:R,maxDate:pe,yearsListFormat:se,getYearControlProps:ce,locale:me,onNext:V,onPrevious:Ue,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:ee,previousLabel:p?.previousDecade??h,previousIcon:F,decadeLabelFormat:le,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Pe(t),Me(JD(`year`,i,r)),g?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe})]})});XD.classes={...ID.classes,...RD.classes,...BD.classes},XD.displayName=`@mantine/dates/Calendar`;function ZD(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:de,allowSingleDateInRange:fe,allowDeselect:R,minDate:pe,maxDate:me,locale:he,...ge}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:de,allowSingleDateInRange:fe,allowDeselect:R,minDate:pe,maxDate:me,locale:he},others:ge}}function QD(e,t){let n=[...t].sort((e,t)=>(0,Q.default)(e).isAfter((0,Q.default)(t))?1:-1);return(0,Q.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,Q.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function $D({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=GD({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,H.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,H.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,Q.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,Q.default)(e).isAfter((0,Q.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,Q.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,Q.default)(e).isSame(n,t))?l(c.filter(e=>!(0,Q.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,Q.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?QD(e,[f,u]):c[0]&&c[1]?QD(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,Q.default)(e).isSame(c[0],t)?!(f&&(0,Q.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,Q.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,Q.default)(f).isBefore(c[0])&&(0,Q.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,Q.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,Q.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,Q.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,Q.default)(c[0]).isSame(n,t)||void 0};let r=(0,Q.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,H.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var eO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},tO=Sn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":st(t)}})),nO={type:`default`},rO=K(e=>{let t=W(`YearPicker`,nO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getYearControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onYearSelect:m,__updateDateOnYearSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,...w}=t,{calendarProps:T,others:E}=ZD(w),D=(0,H.useRef)(null),O=(0,H.useRef)(null),k=G({name:l||`YearPicker`,classes:eO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:tO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=$D({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Hr({classNames:n,styles:r,props:t}),I=(0,U.jsx)(XD,{classNames:ee,styles:F,size:S,...T,...v?{}:E,minLevel:`decade`,__updateDateOnYearSelect:h??!1,__staticSelector:l||`YearPicker`,onMouseLeave:j,onYearMouseEnter:(e,t)=>M(t),onYearSelect:e=>{A(e),m?.(e)},getYearControlProps:e=>({...N(e),...u?.(e)}),__setDateRef:D,__setLevelRef:O,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return I;let te=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(D.current?.(t),O.current?.(`decade`),g?g(t):P(e))},ne=v.map((e,t)=>(0,U.jsx)(ul,{...k(`presetButton`),onClick:()=>te(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,U.jsxs)(q,{...k(`yearPickerRoot`),size:S,...E,children:[(0,U.jsx)(`div`,{...k(`presetsList`),children:ne}),I]})});rO.classes={...XD.classes,...eO},rO.varsResolver=tO,rO.displayName=`@mantine/dates/YearPicker`;var iO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},aO=Sn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":st(t)}})),oO={type:`default`},sO=K(e=>{let t=W(`MonthPicker`,oO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getMonthControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onMonthSelect:m,__updateDateOnMonthSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,onLevelChange:w,...T}=t,{calendarProps:E,others:D}=ZD(T),O=(0,H.useRef)(null),k=(0,H.useRef)(null),A=G({name:l||`MonthPicker`,classes:iO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:aO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=$D({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Hr({classNames:n,styles:r,props:t}),te=(0,U.jsx)(XD,{classNames:F,styles:I,size:S,...E,...v?{}:D,minLevel:`year`,__updateDateOnMonthSelect:h??!1,__staticSelector:l||`MonthPicker`,onMouseLeave:M,onMonthMouseEnter:(e,t)=>N(t),onMonthSelect:e=>{j(e),m?.(e)},getMonthControlProps:e=>({...P(e),...u?.(e)}),onLevelChange:w,__setDateRef:O,__setLevelRef:k,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return te;let ne=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(O.current?.(t),k.current?.(`year`),g?g(t):ee(e))},re=v.map((e,t)=>(0,U.jsx)(ul,{...A(`presetButton`),onClick:()=>ne(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,U.jsxs)(q,{...A(`monthPickerRoot`),size:S,...D,children:[(0,U.jsx)(`div`,{...A(`presetsList`),children:re}),te]})});sO.classes={...XD.classes,...iO},sO.varsResolver=aO,sO.displayName=`@mantine/dates/MonthPicker`;var cO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},lO=Sn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":st(t)}})),uO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},dO=K(e=>{let t=W(`DatePicker`,uO,e),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s,classNames:c,styles:l,__staticSelector:u,__onDayClick:d,__onDayMouseEnter:f,__onPresetSelect:p,__stopPropagation:m,presets:h,className:g,style:_,unstyled:v,size:y,vars:b,attributes:x,...S}=t,{calendarProps:C,others:w}=ZD(S),T=(0,H.useRef)(null),E=(0,H.useRef)(null),D=G({name:u||`DatePicker`,classes:cO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:lO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=$D({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Hr({classNames:c,styles:l,props:t}),F=(0,U.jsx)(XD,{classNames:P,styles:ee,__staticSelector:u||`DatePicker`,onMouseLeave:k,size:y,...C,...h?{}:w,__stopPropagation:m,__setDateRef:T,__setLevelRef:E,minLevel:C.minLevel||`month`,__onDayMouseEnter:(e,t)=>{A(t),f?.(e,t)},__onDayClick:(e,t)=>{O(t),d?.(e,t)},getDayProps:e=>({...j(e),...C.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof M==`string`?ZE(e,M):!1,...C.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof M==`string`?(0,Q.default)(e).isSame(M,`year`):!1,...C.getYearControlProps?.(e)}),hideOutsideDates:C.hideOutsideDates??C.numberOfColumns!==1,attributes:x,...h?{}:{className:g,style:_}});if(!h)return F;let I=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(T.current?.(t),E.current?.(`month`),p?p(t):N(e))},te=h.map((e,t)=>(0,U.jsx)(ul,{...D(`presetButton`),onClick:()=>I(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":m||void 0,children:e.label},t));return(0,U.jsxs)(q,{...D(`datePickerRoot`),size:y,...w,children:[(0,U.jsx)(`div`,{...D(`presetsList`),children:te}),F]})});dO.classes=XD.classes,dO.varsResolver=lO,dO.displayName=`@mantine/dates/DatePicker`;function fO(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,Q.default)(t).format(`YYYY-MM-DD`)}function pO({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,Q.default)(e).isAfter(t,`date`)||n&&(0,Q.default)(e).isBefore(n,`date`))}var mO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},hO=K(e=>{let{inputProps:t,wrapperProps:n,value:r,defaultValue:i,onChange:a,clearable:o,clearSectionMode:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,withTime:p,dateParser:m,minDate:h,maxDate:g,fixOnBlur:_,onFocus:v,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:M,getMonthControlProps:N,getYearControlProps:P,disabled:ee,...F}=bf(`DateInput`,mO,e),I=(0,H.useRef)(null),te=(0,H.useRef)(null),[ne,re]=(0,H.useState)(!1),{calendarProps:ie,others:L}=ZD(F),ae=RE(),oe=m||(e=>{let t=(0,Q.default)(e,f,ae.getLocale(d)).toDate();return Number.isNaN(t.getTime())?fO(e):(0,Q.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),se=k===void 0?o:k,ce=e=>e?(0,Q.default)(e).locale(ae.getLocale(d)).format(f):``,[le,ue,de]=GD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[fe,R]=GD({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,H.useEffect)(()=>{de&&r!==null&&R(r)},[de,r]);let[pe,me]=(0,H.useState)(ce(le));(0,H.useEffect)(()=>{me(ce(le))},[ae.getLocale(d)]);let he=e=>{let t=e.currentTarget.value;if(me(t),re(!0),t.trim()===``&&(k||o))ue(null);else{let e=oe(t);e&&pO({date:e,minDate:h,maxDate:g})&&(ue(e),R(e))}},ge=e=>{y?.(e),re(!1),_&&me(ce(le))},z=e=>{v?.(e),re(!0)},_e=e=>{b?.(e),re(!0)},ve=e=>{e.key===`Escape`&&re(!1),x?.(e)},B=e=>({...u?.(e),selected:(0,Q.default)(le).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=se&&(0,Q.default)(le).isSame(e,`day`)?null:e;ue(n),!de&&n&&me(ce(n)),re(!1)}}),ye=(0,U.jsx)(yf.ClearButton,{onClick:()=>{ue(null),!de&&me(``),re(!1)},unstyled:E,...c}),be=o&&!!le&&!S&&!ee;return Tt(()=>{le!==void 0&&!ne&&me(ce(le))},[le]),xt(()=>re(!1),void 0,[I.current,te.current]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(yf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,U.jsxs)($l,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,U.jsx)($l.Target,{children:(0,U.jsx)(yf,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:pe,onChange:he,onBlur:ge,onFocus:z,onClick:_e,onKeyDown:ve,readOnly:S,rightSection:T,__clearSection:ye,__clearable:be,__clearSectionMode:s,...t,...L,disabled:ee,__staticSelector:`DateInput`})}),(0,U.jsx)($l.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,U.jsx)(XD,{__staticSelector:`DateInput`,...ie,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:B,size:t.size,date:fe,onDateChange:R,getMonthControlProps:e=>({selected:typeof le==`string`?ZE(e,le):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof le==`string`?(0,Q.default)(e).isSame(le,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,U.jsx)(BE,{name:C,form:w,value:le,type:`default`,withTime:p})]})});hO.classes={...yf.classes,...XD.classes},hO.displayName=`@mantine/dates/DateInput`;function gO({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=RE(),[d,f]=nn(!1),[p,m]=GD({type:e,value:t,defaultValue:n,onChange:r}),h=OE({type:e,date:p,locale:u.getLocale(i),format:a,labelSeparator:u.getLabelSeparator(c),formatter:l}),g=t=>{o&&(e===`default`&&f.close(),e===`range`&&t[0]&&t[1]&&f.close()),m(s&&e===`multiple`?[...t].sort((e,t)=>(0,Q.default)(e).isAfter((0,Q.default)(t))?1:-1):t)};return{_value:p,setValue:g,onClear:()=>g(e===`range`?[null,null]:e===`multiple`?[]:null),shouldClear:e===`range`?!!p[0]:e===`multiple`?p.length>0:p!==null,formattedValue:h,dropdownOpened:d,dropdownHandlers:f}}var _O={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},vO=K(e=>{let t=W(`YearPickerInput`,_O,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,type:n,__staticSelector:`YearPickerInput`,attributes:S,children:(0,U.jsx)(rO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`YearPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});vO.classes={...HD.classes,...rO.classes},vO.displayName=`@mantine/dates/YearPickerInput`;var yO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},bO=K(e=>{let t=W(`MonthPickerInput`,yO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,attributes:S,type:n,__staticSelector:`MonthPickerInput`,children:(0,U.jsx)(sO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`MonthPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});bO.classes={...HD.classes,...sO.classes},bO.displayName=`@mantine/dates/MonthPickerInput`;var xO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},SO=K(e=>{let t=W(`DatePickerInput`,xO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,defaultDate:b,valueFormatter:x,presets:S,attributes:C,...w}=t,{resolvedClassNames:T,resolvedStyles:E}=Hr({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=ZD(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:x}),F=Array.isArray(k)?k[0]||b:k||b;return(0,U.jsx)(HD,{formattedValue:j,dropdownOpened:N,dropdownHandlers:M,classNames:T,styles:E,unstyled:d,onClear:P,shouldClear:ee,value:k,size:p,variant:m,dropdownType:h,...O,type:n,__staticSelector:`DatePickerInput`,attributes:C,children:(0,U.jsx)(dO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||IE({maxDate:v,minDate:_}),onChange:A,locale:c,classNames:T,styles:E,unstyled:d,__staticSelector:`DatePickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:S,attributes:C})})});SO.classes={...HD.classes,...dO.classes},SO.displayName=`@mantine/dates/DatePickerInput`;var CO=`DD/MM/YYYY`,wO=hO.extend({defaultProps:{placeholder:CO,valueFormat:CO}});function TO({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M18 9.00005L12 15L6 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var EO=Vf.extend({classNames:{item:`_item_wy8vo_1`,control:`_control_wy8vo_10`,chevron:`_chevron_wy8vo_20`,label:`_label_wy8vo_21`,content:`_content_wy8vo_43`},defaultProps:{chevron:(0,U.jsx)(TO,{}),variant:`separated`}}),DO=hu.extend({classNames:{root:`_root_8921i_1`},defaultProps:{size:`md`,variant:`primary`}}),OO=Wf.extend({classNames:{root:`_root_nrydo_1`,icon:`_icon_nrydo_10`,title:`_title_nrydo_38`,message:`_message_nrydo_42`},styles:{root:{overflow:`initial`},message:{overflow:`initial`}}}),kO=Qf.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),AO=vm.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),jO=xm.extend({classNames:{root:`_root_c4e34_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),MO=Am.extend({classNames:{root:`_root_d2yo7_1`,section:`_section_d2yo7_204`},defaultProps:{size:`md`,variant:`primary`}}),[NO,PO]=qe(`Carousel component was not found in tree`),FO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},IO=K(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=W(`CarouselSlide`,null,e),c=PO();return(0,U.jsx)(q,{mod:[{orientation:c.orientation},o],role:`group`,"aria-roledescription":`slide`,"aria-label":`Carousel slide`,...c.getStyles(`slide`,{className:n,style:r,classNames:t,styles:i}),...s})});IO.classes=FO,IO.displayName=`@mantine/carousel/CarouselSlide`;function LO({slideGap:e,slideSize:t,selector:n}){let r=Cr(),i=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":V(pt(t))}),a=Fe(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,U.jsx)(ai,{styles:i,media:ft(Fe(a),r.breakpoints).filter(e=>Fe(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function RO(e){return typeof e==`object`&&e?Fe(e):[]}function zO(e){return e.sort((e,t)=>Be(e)-Be(t))}function BO({slideGap:e,slideSize:t}){return zO(Array.from(new Set([...RO(e),...RO(t)])))}function VO({slideGap:e,slideSize:t,selector:n}){let r=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":V(pt(t))}),i=BO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,U.jsx)(ai,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function HO({dir:e,orientation:t,direction:n}){return n===`previous`?t===`horizontal`?90*(e===`ltr`?1:-1):-180:t===`horizontal`?90*(e===`ltr`?-1:1):0}function UO(e){return Object.prototype.toString.call(e)===`[object Object]`}function WO(e){return UO(e)||Array.isArray(e)}function GO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function KO(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!WO(r)||!WO(i)?r===i:KO(r,i)})}function qO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function JO(e,t){if(e.length!==t.length)return!1;let n=qO(e),r=qO(t);return n.every((e,t)=>{let n=r[t];return KO(e,n)})}function YO(e){return typeof e==`number`}function XO(e){return typeof e==`string`}function ZO(e){return typeof e==`boolean`}function QO(e){return Object.prototype.toString.call(e)===`[object Object]`}function $O(e){return Math.abs(e)}function ek(e){return Math.sign(e)}function tk(e,t){return $O(e-t)}function nk(e,t){return e===0||t===0||$O(e)<=$O(t)?0:$O(tk($O(e),$O(t))/e)}function rk(e){return Math.round(e*100)/100}function ik(e){return lk(e).map(Number)}function ak(e){return e[ok(e)]}function ok(e){return Math.max(0,e.length-1)}function sk(e,t){return t===ok(e)}function ck(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function lk(e){return Object.keys(e)}function uk(e,t){return[e,t].reduce((e,t)=>(lk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=QO(r)&&QO(i)?uk(r,i):i}),e),{})}function dk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function fk(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return XO(e)?n[e](r):e(t,r,i)}return{measure:o}}function pk(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function mk(e,t,n,r){let i=pk(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function hk(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function gk(e=0,t=0){let n=$O(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function _k(e,t,n){let{constrain:r}=gk(0,e),i=e+1,a=o(t);function o(e){return n?$O((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return _k(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function vk(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=pk(),w=pk(),T=gk(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,ee=!1;function F(e){if(!v)return;function n(t){(ZO(v)||v(e,t))&&L(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,oe).add(r,`contextmenu`,oe).add(r,`click`,se,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,ae,S).add(e,`touchend`,oe).add(e,`mousemove`,ae,S).add(e,`mouseup`,oe)}function ne(e){let t=e.nodeName||``;return x.includes(t)}function re(){return(m?D:E)[ee?`mouse`:`touch`]}function ie(e,t){let n=d.add(ek(e)*-1),r=u.byDistance(e,!m).distance;return m||$O(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=dk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=tk(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ne(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),te(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function ae(e){if(!dk(e,r)&&e.touches.length>=2)return oe(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=tk(t,A),c=tk(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return oe(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function oe(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=ie(b(n),t),i=nk(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),ee=!1,f.emit(`pointerUp`)}function se(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function ce(){return M}return{init:F,destroy:I,pointerDown:ce}}function yk(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(dk(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&$O(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function bk(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function xk(e){function t(t){return t/100*e}return{measure:t}}function Sk(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if($O(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(ZO(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Ck(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=ek(a),d=u,x}function p(){return $O(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function wk(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=gk(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=$O(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&$O(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Tk(e,t,n,r,i){let a=gk(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return tk(e,t)<=1}function u(){let e=o[0],t=ak(o);return gk(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=sk(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Ek(e,t,n){let r=t[0];return{limit:gk(n?r-e:ak(t),r)}}function Dk(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=gk(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function Ok(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function kk(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>ak(e)[o]-e[0][a]).map($O)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-$O(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Ak(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=sk(n,t);return r?ck(ak(n[0])+1):i?ck(ok(a)-ak(n)[0]+1,ak(n)[0]):e})}return{slideRegistry:l}}function jk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>$O(e)-$O(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>$O(e.diff)-$O(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>ek(e)===r);return a.length?c(a):ak(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Mk(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function Nk(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));YO(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(ZO(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Pk(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return YO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Fk(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=rk(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Ik(e,t,n,r,i,a,o,s,c){let l=.5,u=ik(i),d=ik(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Pk(-1),translate:Fk(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function Lk(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(ZO(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Rk(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return lk(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function zk(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return $O(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ak(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=sk(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map($O)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Bk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=YO(n);function p(e,t){return ik(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ik(e).reduce((n,f,p)=>{let m=ak(n)||0,h=m===0,g=f===ok(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=$O(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Vk(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=bk(),w=C.measure(t),T=n.map(C.measure),E=hk(c,l),D=E.measureSize(w),O=xk(D),k=fk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=zk(E,w,T,n,d||!!v,i),ee=Bk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=kk(E,k,w,T,ee),te=-ak(F)+ak(M),{snapsContained:ne,scrollContainLimit:re}=Tk(D,te,I,v,2),ie=A?ne:I,{limit:L}=Ek(te,ie,d),ae=_k(ok(ie),u,d),oe=ae.clone(),se=ik(n),ce=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},le=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ue=mk(r,i,()=>ce(Se),e=>le(Se,e)),de=.68,fe=ie[ae.get()],R=Pk(fe),pe=Pk(fe),me=Pk(fe),he=Pk(fe),ge=Ck(R,me,pe,he,f,de),z=jk(d,ie,te,L,he),_e=Mk(ue,ae,oe,ge,z,he,o),ve=Ok(L),B=pk(),ye=Rk(t,n,o,h),{slideRegistry:be}=Ak(A,v,ie,re,ee,se),xe=Nk(e,n,be,_e,ge,B,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:ue,axis:E,dragHandler:vk(E,e,r,i,he,yk(E,i),R,ue,_e,ge,z,ae,o,O,p,m,_,de,x),eventStore:B,percentOfView:O,index:ae,indexPrevious:oe,limit:L,location:R,offsetLocation:me,previousLocation:pe,options:a,resizeHandler:Sk(t,o,i,n,E,y,C),scrollBody:ge,scrollBounds:wk(L,me,he,ge,O),scrollLooper:Dk(te,L,me,[R,me,pe,he]),scrollProgress:ve,scrollSnapList:ie.map(ve.get),scrollSnaps:ie,scrollTarget:z,scrollTo:_e,slideLooper:Ik(E,D,te,j,M,F,ie,me,n),slideFocus:xe,slidesHandler:Lk(t,o,b),slidesInView:ye,slideIndexes:se,slideRegistry:be,slidesToScroll:ee,target:he,translate:Fk(E,t)};return Se}function Hk(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var Uk={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Wk(e){function t(e,t){return uk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,lk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>lk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Gk(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function Kk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Wk(i),o=Gk(a),s=pk(),c=Hk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Uk,Kk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(XO(t)?e.querySelector(t):t)||e.children[0];let r=XO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Vk(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(ce),_.eventHandler.init(ce),_.resizeHandler.init(ce),_.slidesHandler.init(ce),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(ce),x=o.init(ce,b)))}function D(e,t){let n=I();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==I()}function P(){return _.index.add(-1).get()!==I()}function ee(){return _.scrollSnapList}function F(){return _.scrollProgress.get(_.offsetLocation.get())}function I(){return _.index.get()}function te(){return _.indexPrevious.get()}function ne(){return _.slidesInView.get()}function re(){return _.slidesInView.get(!1)}function ie(){return x}function L(){return _}function ae(){return e}function oe(){return S}function se(){return C}let ce={canScrollNext:N,canScrollPrev:P,containerNode:oe,internalEngine:L,destroy:k,off:p,on:f,emit:m,plugins:ie,previousScrollSnap:te,reInit:h,rootNode:ae,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:se,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),ce}Kk.globalOptions=void 0;function qk(e={},t=[]){let n=(0,H.useRef)(e),r=(0,H.useRef)(t),[i,a]=(0,H.useState)(),[o,s]=(0,H.useState)(),c=(0,H.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,H.useEffect)(()=>{KO(n.current,e)||(n.current=e,c())},[e,c]),(0,H.useEffect)(()=>{JO(r.current,t)||(r.current=t,c())},[t,c]),(0,H.useEffect)(()=>{if(GO()&&o){Kk.globalOptions=qk.globalOptions;let e=Kk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}qk.globalOptions=void 0;var Jk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Yk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Xk=Sn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":V(t),"--carousel-control-size":V(n),"--carousel-controls-offset":at(r)}})),Zk=K(e=>{let t=W(`Carousel`,Jk,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,getEmblaApi:l,onNextSlide:u,onPreviousSlide:d,onSlideChange:f,nextControlProps:p,previousControlProps:m,controlSize:h,controlsOffset:g,slideSize:_,slideGap:v,orientation:y,height:b,includeGapInSize:x,draggable:S,initialSlide:C,withControls:w,withIndicators:T,plugins:E,nextControlIcon:D,previousControlIcon:O,withKeyboardEvents:k,mod:A,type:j,emblaOptions:M,attributes:N,getIndicatorProps:P,id:ee,...F}=t,I=G({name:`Carousel`,classes:FO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Xk}),te=Lt(ee),ne=ji(),{dir:re}=Gi(),[ie,L]=qk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Yk,...M},E),[ae,oe]=(0,H.useState)(0),[se,ce]=(0,H.useState)(0),le=(0,H.useCallback)(e=>L&&L.scrollTo(e),[L]),ue=(0,H.useCallback)(()=>{if(!L)return;let e=L.selectedScrollSnap();oe(e),e!==ae&&f?.(e)},[L,oe,f,ae]),de=(0,H.useCallback)(()=>{L?.scrollPrev(),d?.()},[L]),fe=(0,H.useCallback)(()=>{L?.scrollNext(),u?.()},[L]),R=(0,H.useCallback)(e=>{k&&(e.key===`ArrowRight`&&(e.preventDefault(),fe()),e.key===`ArrowLeft`&&(e.preventDefault(),de()),e.key===`Home`&&(e.preventDefault(),L?.scrollTo(0)),e.key===`End`&&(e.preventDefault(),L?.scrollTo(L.scrollSnapList().length-1)))},[L,fe,de]);(0,H.useEffect)(()=>{if(L)return l?.(L),ue(),ce(L.scrollSnapList().length),L.on(`select`,ue),()=>{L.off(`select`,ue)}},[L,M?.slidesToScroll,ue]),(0,H.useEffect)(()=>{L&&(L.reInit(),ce(L.scrollSnapList().length),oe(e=>ht(e,0,H.Children.toArray(c).length-1)))},[H.Children.toArray(c).length,M?.slidesToScroll]);let pe=L?.canScrollPrev()||!1,me=L?.canScrollNext()||!1,he=(0,H.useCallback)((e,t)=>{let n=y===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,i=n?`ArrowLeft`:`ArrowUp`;if(e.key===r){e.preventDefault();let n=t<se-1?t+1:0;le(n),(e.currentTarget.parentElement?.children[n])?.focus()}if(e.key===i){e.preventDefault();let n=t>0?t-1:se-1;le(n),(e.currentTarget.parentElement?.children[n])?.focus()}e.key===`Home`&&(e.preventDefault(),le(0),(e.currentTarget.parentElement?.children[0])?.focus()),e.key===`End`&&(e.preventDefault(),le(se-1),(e.currentTarget.parentElement?.children[se-1])?.focus())},[y,se,le]),ge=Array(se).fill(0).map((e,t)=>(0,H.createElement)(ul,{...I(`indicator`),key:t,role:`tab`,"aria-label":`Go to slide ${t+1}`,"aria-selected":t===ae,tabIndex:t===ae?0:-1,"data-active":t===ae||void 0,onClick:()=>le(t),onKeyDown:e=>he(e,t),"data-orientation":y,onMouseDown:e=>e.preventDefault(),...P?.(t)}));return(0,U.jsxs)(NO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,U.jsx)(VO,{...t,selector:`.${ne}`}):(0,U.jsx)(LO,{...t,selector:`.${ne}`}),(0,U.jsxs)(q,{role:`region`,"aria-roledescription":`carousel`,...I(`root`,{className:ne}),...F,id:te,mod:[{orientation:y,"include-gap-in-size":x},A],onKeyDownCapture:R,children:[(0,U.jsx)(fl,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:se>0&&`Slide ${ae+1} of ${se}`}),w&&(0,U.jsxs)(`div`,{...I(`controls`),"data-orientation":y,children:[(0,U.jsx)(ul,{"aria-controls":te,"aria-label":`Previous slide`,"aria-disabled":!pe,"data-inactive":!pe||void 0,"data-type":`previous`,tabIndex:pe?0:-1,...m,...I(`control`,{className:m?.className,style:m?.style}),onClick:e=>{de(),m?.onClick?.(e)},children:O===void 0?(0,U.jsx)(Nf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,U.jsx)(ul,{"aria-controls":te,"aria-label":`Next slide`,"aria-disabled":!me,"data-inactive":!me||void 0,"data-type":`next`,tabIndex:me?0:-1,...I(`control`,{className:p?.className,style:p?.style}),...p,onClick:e=>{fe(),p?.onClick?.(e)},children:D===void 0?(0,U.jsx)(Nf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`next`})}deg)`}}):D})]}),(0,U.jsx)(`div`,{...I(`viewport`),ref:ie,"data-type":j,children:(0,U.jsx)(`div`,{...I(`container`,{className:ne}),"data-orientation":y,children:c})}),T&&(0,U.jsx)(`div`,{...I(`indicators`),role:`tablist`,"aria-label":`Slides`,"data-orientation":y,children:ge})]})]})});Zk.classes=FO,Zk.varsResolver=Xk,Zk.displayName=`@mantine/carousel/Carousel`,Zk.Slide=IO;function Qk({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function $k({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M9.00005 6L15 12L9 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var eA={"space-0":`0`,"space-025":`1px`,"space-050":`2px`,"space-100":`4px`,"space-150":`6px`,"space-200":`8px`,"space-300":`12px`,"space-400":`16px`,"space-500":`20px`,"space-600":`24px`,"space-700":`32px`,"space-800":`40px`,"space-900":`48px`},tA=Zk.extend({classNames:{root:`_root_nuq5f_1`,control:`_control_nuq5f_1`,indicators:`_indicators_nuq5f_10`,indicator:`_indicator_nuq5f_10`,slide:`_slide_nuq5f_26`,controls:`_controls_nuq5f_34`},defaultProps:{controlSize:32,nextControlIcon:(0,U.jsx)($k,{height:16,width:16}),previousControlIcon:(0,U.jsx)(Qk,{height:16,width:16}),slideGap:V(eA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),nA={root:`_root_1edmf_1`,input:`_input_1edmf_8`,label:`_label_1edmf_26`,icon:`_icon_1edmf_47`,inner:`_inner_1edmf_54`,error:`_error_1edmf_58`};function rA({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function iA({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M2.5 4L7.5 4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var aA=em.extend({classNames:nA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,U.jsx)(iA,{...t}):(0,U.jsx)(rA,{...t})}}),oA=zm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),sA={XS:352,SM:584,MD:800,LG:1160,XL:1160},cA=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:V(n)}),{}),lA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},uA=Um.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:wn({[lA.fluidContainer]:n,[lA.miniContainer]:t===`mini`,[lA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in cA?cA[t]:V(t)}})}),dA={placeholder:CO,getYearControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`month`)&&{"current-month":!0}}})},fA={day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},pA=dO.extend({classNames:fA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,Q.default)(e),n=(0,Q.default)().isSame(t,`day`);return(0,U.jsx)(Yf,{span:!0,className:wn({[fA.dayToday]:n}),children:t.format(`D`)})},...dA}}),mA=SO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA,valueFormat:CO}}),hA=qm.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),gA={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},_A=ph.extend({classNames:{root:`_root_dlog2_1`,title:`_title_dlog2_9`,content:`_content_dlog2_17`,header:`_header_dlog2_30`,body:`_body_dlog2_38`,close:`_close_dlog2_48`},defaultProps:{size:`md`,position:`right`,overlayProps:{backgroundOpacity:gA.xl,blur:6}}}),vA=Dh.extend({defaultProps:{columnGap:24,rowGap:16}}),yA=Tu.extend({defaultProps:{gap:0,align:`flex-start`}}),bA={wrapper:`_wrapper_4biwb_1`,input:`_input_4biwb_9`,section:`_section_4biwb_42`},xA={placeholder:`_placeholder_1o876_1`},SA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},CA=yf.extend({classNames:bA}),wA=yf.Wrapper.extend({classNames:SA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),TA=yf.Placeholder.extend({classNames:xA}),EA=su.extend({defaultProps:{size:`xs`}}),DA=$h.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),OA=hg.extend({classNames:{root:`_root_ax69a_1`,header:`_header_ax69a_8`,title:`_title_ax69a_12`,content:`_content_ax69a_19`,body:`_body_ax69a_29`,close:`_close_ax69a_35`},defaultProps:{size:`md`,yOffset:`5vh`,transitionProps:{duration:300,transition:`fade-down`},closeButtonProps:{size:24},overlayProps:{backgroundOpacity:gA.xl,blur:6},scrollAreaComponent:ol.Autosize}}),kA=sO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),AA=bO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),jA=Ng.extend({classNames:{input:`_input_z7ary_1`,section:`_section_z7ary_6`,inputField:`_inputField_z7ary_28`,dropdown:`_dropdown_z7ary_41`,option:`_option_z7ary_47`,pillsList:`_pillsList_z7ary_60`,pill:`_pill_z7ary_60`},defaultProps:{renderOption:({checked:e,option:t})=>(0,U.jsxs)(Tu,{gap:8,children:[(0,U.jsx)(em,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,U.jsx)(Yf,{span:!0,children:t.label})]}),searchable:!0}}),MA=Ig.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),NA=Bg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),PA=Z_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),FA=bv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:$k,previousIcon:Qk,size:`lg`}}),IA=hl.extend({defaultProps:{shadow:`none`}});function LA({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M22 8C22 8 18 14 12 14C6 14 2 8 2 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,U.jsx)(`path`,{d:`M15 13.5L16.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M20 11L22 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M2 13L4 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M9 13.5L7.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function RA({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M21.544 11.045C21.848 11.4713 22 11.6845 22 12C22 12.3155 21.848 12.5287 21.544 12.955C20.1779 14.8706 16.6892 19 12 19C7.31078 19 3.8221 14.8706 2.45604 12.955C2.15201 12.5287 2 12.3155 2 12C2 11.6845 2.15201 11.4713 2.45604 11.045C3.8221 9.12944 7.31078 5 12 5C16.6892 5 20.1779 9.12944 21.544 11.045Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}var zA=Tv.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,U.jsx)(LA,{}):(0,U.jsx)(RA,{})}}),BA=Cg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),VA=$l.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),HA=Pv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),UA=Xv.extend({classNames:{root:`_root_1njtj_1`,radio:`_radio_1njtj_9`,label:`_label_1njtj_22`,icon:`_icon_1njtj_40`,error:`_error_1njtj_58`,inner:`_inner_1njtj_62`}}),WA=Xv.Card.extend({classNames:{card:`_card_11cie_1`}}),GA=Xv.Indicator.extend({classNames:{indicator:`_indicator_yh8fo_1`,icon:`_icon_yh8fo_17`}}),KA=Sy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function qA({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var JA=({checked:e,option:t})=>(0,U.jsxs)(Tu,{gap:8,children:[e&&(0,U.jsx)(qA,{width:16,height:16}),(0,U.jsx)(Yf,{span:!0,children:t.label})]}),YA=wy.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:JA}}),XA=By.extend({defaultProps:{gap:0}}),ZA=Xy.extend({classNames:{root:`_root_bk7hc_1`,stepIcon:`_stepIcon_bk7hc_6`,separator:`_separator_bk7hc_22`,step:`_step_bk7hc_6`,stepLabel:`_stepLabel_bk7hc_29`},defaultProps:{allowNextStepsSelect:!1,iconSize:30}}),QA=rb.extend({classNames:{root:`_root_1xr8m_1`,track:`_track_1xr8m_6`,input:`_input_1xr8m_10`,thumb:`_thumb_1xr8m_22`,label:`_label_1xr8m_29`},defaultProps:{withThumbIndicator:!1}}),$A=Sb.extend({classNames:{table:`_table_1nke6_1`,thead:`_thead_1nke6_8`,th:`_th_1nke6_8`,tbody:`_tbody_1nke6_41`,td:`_td_1nke6_44`},defaultProps:{withTableBorder:!0}}),ej=Mb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),tj=Lb.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),nj=Yf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),rj=Ih.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),ij=Jb.extend({classNames:{root:`_root_6pd11_1`}}),aj=uy.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),oj=rO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),sj=vO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),cj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],lj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],uj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],dj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],fj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],pj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],mj={xs:V(10),sm:V(12),md:V(14),lg:V(16),xl:V(20)},hj={xs:V(12),sm:V(16),md:V(20),lg:V(24),xl:V(28)},gj={fontWeight:`500`,sizes:{h1:{fontSize:V(32),lineHeight:V(36)},h2:{fontSize:V(24),lineHeight:V(28)},h3:{fontSize:V(20),lineHeight:V(24)},h4:{fontSize:V(18),lineHeight:V(20)},h5:{fontSize:V(12),lineHeight:V(16)},h6:{fontSize:V(12),lineHeight:V(16)}}},_j=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:Ue(n)}),{});function vj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(vj(a)&&vj(i)?n[r]=yj(a,i):n[r]=i)}return n}var bj={"brand-dark-blue":cj,"brand-orange":lj,accent:lj,blue:uj,orange:dj,red:fj,green:pj},xj={Accordion:EO,ActionIcon:DO,Alert:OO,Anchor:kO,Avatar:AO,Badge:jO,Button:MO,Carousel:tA,Checkbox:aA,ColorSwatch:oA,Container:uA,DateInput:wO,DatePicker:pA,DatePickerInput:mA,Divider:hA,Drawer:_A,Grid:vA,Group:yA,Input:CA,InputPlaceholder:TA,InputWrapper:wA,Loader:EA,Menu:DA,Modal:OA,MonthPicker:kA,MonthPickerInput:AA,MultiSelect:jA,NavLink:MA,Notification:NA,NumberInput:PA,Paper:IA,Pagination:FA,PasswordInput:zA,Pill:BA,Popover:VA,Progress:HA,Radio:UA,RadioCard:WA,RadioIndicator:GA,SegmentedControl:KA,Select:YA,Stack:XA,Stepper:ZA,Switch:QA,Table:$A,Tabs:ej,TagsInput:tj,Text:nj,Textarea:rj,Title:ij,Tooltip:aj,YearPicker:oj,YearPickerInput:sj};function Sj(e={}){let t={...mj,...e.fontSizes},n={...hj,...e.lineHeights},r=yj(gj,e.headings??{}),i={..._j,...e.breakpoints},a={...bj,...e.colors};return Br({components:xj,cursorType:e.cursorType??`pointer`,defaultRadius:`sm`,primaryColor:e.primaryColor??`brand-dark-blue`,primaryShade:e.primaryShade??6,breakpoints:i,fontFamily:e.fontFamily??`Geist`,fontSizes:t,fontWeights:{medium:`500`},lineHeights:n,headings:r,black:e.black??`#000000`,white:e.white??`#FFFFFF`,colors:a})}Sj();var Cj={"border-025":`1px`,"border-050":`2px`},wj={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Tj={"primary-lighter":`#F8F8FB`,"primary-light":`#EFEFF6`,"primary-default":`#414275`,"primary-dark":`#35355F`,"primary-darker":`#18182B`},Ej={"secondary-lighter":`#FFF7F0`,"secondary-light":`#FFA34D`,"secondary-default":`#FF7A00`,"secondary-dark":`#A85100`,"secondary-darker":`#7A3B00`},Dj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},Oj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},kj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},Aj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},jj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Mj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Nj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Pj={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Fj={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Ij={"radius-0":`0`,"radius-050":`2px`,"radius-100":`4px`,"radius-150":`6px`,"radius-200":`8px`,"radius-300":`12px`,"radius-400":`16px`,"radius-500":`20px`,"radius-600":`24px`,"radius-full":`50%`},Lj={"shadow-xs":`0 1px 2px 0 rgba(0, 0, 0, 0.16)`,"shadow-above-sm":`0 3px 0 0 rgba(0, 0, 0, 0.04)`,"shadow-below-sm":`0 -2px 2px 0 rgba(65, 66, 117, 0.12)`},Rj={...wj,...Tj,...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj},zj=gA;function Bj(e={}){let{tokens:t={},theme:n={}}=e;return Vr(Sj(n),Br({other:{border:{...Cj,...t.border},color:{...Rj,...t.color},iconSize:{...Fj,...t.iconSize},opacity:{...zj,...t.opacity},radius:{...Ij,...t.radius},space:{...eA,...t.space},shadow:{...Lj,...t.shadow}}}))}Bj();function Vj(){return Cr()}var Hj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Uj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Wj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},Gj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},Kj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},qj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Jj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Yj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Xj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},Zj={...Wj,...Gj,...Kj,...qj,...Jj,...Yj,...Xj},Qj={"icon-xs":Fj[`icon-xs`],"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},$j={"radius-150":Ij[`radius-150`],"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},eM={"space-150":eA[`space-150`],"space-200":eA[`space-200`],"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`]},tM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(12),md:V(14),lg:V(16)}},brand:{darkBlue:Hj,orange:Uj},tokens:{color:Zj,radius:$j,space:eM,iconSize:Qj}},nM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],rM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],iM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},aM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},oM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},sM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},cM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},lM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},uM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},dM={...iM,...aM,...oM,...sM,...cM,...lM,...uM},fM={"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},pM={"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},mM={"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`],"space-700":eA[`space-700`],"space-800":eA[`space-800`],"space-900":eA[`space-900`]},hM={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(13),md:V(15),lg:V(17)}},brand:{darkBlue:nM,orange:rM},tokens:{color:dM,radius:pM,space:mM,iconSize:fM}},gM={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`accent`},brand:{darkBlue:cj,orange:lj},tokens:{color:{...wj,...Tj,...Ej,...jj,...Mj,...Nj,...Pj},radius:Ij,space:eA,iconSize:Fj,border:Cj,shadow:Lj,opacity:gA}},ocean:hM,forest:tM},_M=[`foundations`,`ocean`,`forest`],vM=`foundations`;function yM(e){let{theme:t,brand:n,tokens:r}=e;return{label:e.label,options:{theme:{...t,colors:{...t.colors??{},accent:n.orange,"brand-dark-blue":n.darkBlue,"brand-orange":n.orange}},tokens:{radius:r.radius,space:r.space,iconSize:r.iconSize,border:r.border,shadow:r.shadow,opacity:r.opacity,color:r.color}}}}var bM={foundations:yM(gM.foundations),ocean:yM(gM.ocean),forest:yM(gM.forest)};function xM(e){return typeof e==`string`&&_M.includes(e)}function SM(e){return bM[xM(e)?e:vM]}function CM({themeName:e}={}){return Bj(SM(e).options)}var wM=(0,H.createContext)(null),TM=e=>{let t=(0,H.useContext)(wM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function EM(){return TM()}var DM=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,H.useRef)(e.locale),i=(0,H.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,H.useState)(i());return(0,H.useEffect)(()=>{let t=()=>{r.current=e.locale,o(i())},n=e.on(`change`,t);return r.current!==e.locale&&t(),n},[e,i]),r.current?(0,U.jsx)(wM.Provider,{value:a,children:n}):(process.env.NODE_ENV===`development`&&console.log("I18nProvider rendered `null`. A call to `i18n.activate` needs to happen in order for translations to be activated and for the I18nProvider to render.This is not an error but an informational message logged only in development."),null)},OM=(0,H.createContext)(null),kM=(0,H.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function AM({runtime:e,children:t}){return(0,U.jsx)(kM.Provider,{value:e,children:t})}function jM({config:e,children:t}){return(0,U.jsx)(OM.Provider,{value:e,children:t})}var MM=(0,H.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),NM=({children:e,config:t})=>(0,U.jsx)(MM.Provider,{value:t,children:e});function PM({children:e,appConfig:t,config:n,runtime:r,theme:i,rootElement:a}){let o=typeof document>`u`?void 0:document.documentElement,s=!!a?.shadowRoot,c=s?`:host`:`:root`,l=s?a??void 0:o;return(0,H.useEffect)(()=>{if(!a)return;let e=a.style,t=i,n=t.other??{},r=t.colors??{},o=t.fontSizes??{},s=t.lineHeights??{};t.fontFamily&&e.setProperty(`--mantine-font-family`,String(t.fontFamily)),Object.entries(o).forEach(([t,n])=>{e.setProperty(`--mantine-font-size-${t}`,String(n))}),Object.entries(s).forEach(([t,n])=>{e.setProperty(`--mantine-line-height-${t}`,String(n))}),Object.entries(n).forEach(([t,n])=>{Object.entries(n).forEach(([n,r])=>{e.setProperty(`--mantine-custom-${t}-${n}`,String(r))})}),Object.entries(r).forEach(([t,n])=>{n.forEach((n,r)=>{e.setProperty(`--mantine-color-${t}-${r}`,n)})})},[a,i]),(0,U.jsx)(DM,{i18n:Pe,children:(0,U.jsx)(Rr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,U.jsx)($x,{client:yE,children:(0,U.jsx)(NM,{config:t,children:(0,U.jsx)(jM,{config:n,children:(0,U.jsx)(AM,{runtime:r,children:e})})})})})})}function FM(){let e=(0,H.useRef)(null);return{startInteraction:(0,H.useCallback)(t=>{let{cursor:n,onMove:r,onEnd:i}=t;document.body.style.cursor=n,document.body.style.userSelect=`none`;let a=()=>{document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`pointermove`,r),document.removeEventListener(`pointerup`,a),i?.(),e.current=null};document.addEventListener(`pointermove`,r),document.addEventListener(`pointerup`,a),e.current=a},[]),cleanup:(0,H.useCallback)(()=>{e.current?.()},[])}}var IM=4;function LM(e={}){let{skipSelector:t=`button, [role="button"], a, input, textarea`,onDragChange:n}=e,[r,i]=(0,H.useState)({x:0,y:0}),[a,o]=(0,H.useState)(!1),s=(0,H.useRef)({startX:0,startY:0,startOffset:{x:0,y:0}}),{startInteraction:c}=FM();return{offset:r,isDragging:a,handlePointerDown:(0,H.useCallback)(e=>{let a=e.target;if(t&&a?.closest(t))return;let l=e.clientX,u=e.clientY,d={...r},f=0,p=!1;s.current={startX:l,startY:u,startOffset:d},c({cursor:`grab`,onMove:e=>{let t=e.clientX-l,r=e.clientY-u;if(f=Math.abs(t)+Math.abs(r),!p&&f>=IM&&(p=!0,o(!0),document.body.style.cursor=`grabbing`,document.body.style.userSelect=`none`),p){let e={x:d.x+t,y:d.y+r};i(e),n?.(e)}},onEnd:()=>{p&&o(!1)}})},[r,t,n,c]),style:{transform:`translate(${r.x}px, ${r.y}px)`,cursor:a?`grabbing`:`grab`,touchAction:`none`}}}function RM(e){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,U.jsx)(`path`,{d:`M12 8V4H8`}),(0,U.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,U.jsx)(`path`,{d:`M2 14h2`}),(0,U.jsx)(`path`,{d:`M20 14h2`}),(0,U.jsx)(`path`,{d:`M15 13v2`}),(0,U.jsx)(`path`,{d:`M9 13v2`})]})}var zM={root:`_root_677yy_1`,button:`_button_677yy_5`,buttonInner:`_buttonInner_677yy_30`,iconSection:`_iconSection_677yy_35`,label:`_label_677yy_39`};function BM({onClick:e,zIndex:t,position:n,label:r}){let i=Vj(),{handlePointerDown:a,style:o}=LM({skipSelector:``}),s=Math.min(i.other.iconSize[`icon-sm`],16),{transform:c,cursor:l,touchAction:u}=o,d=(0,H.useMemo)(()=>({transform:c,touchAction:u,zIndex:t,...n}),[n,u,c,t]),f=(0,H.useMemo)(()=>({cursor:l??`pointer`}),[l]);return(0,U.jsx)(`div`,{className:zM.root,style:d,children:(0,U.jsx)(uy,{label:`Open agent widget`,position:`left`,children:(0,U.jsx)(Am,{onClick:e,onPointerDown:a,style:f,classNames:{root:zM.button,inner:zM.buttonInner,section:zM.iconSection,label:zM.label},leftSection:(0,U.jsx)(RM,{width:s,height:s}),radius:20,variant:`filled`,color:`accent`,"aria-label":`Open ${r??`agent widget`}`,title:r??`Assistant`,children:r??`Assistant`})})})}function VM({mode:e=`thinking`,autoCycle:t=!0,cycleMs:n=2e3,exploringAfterMs:r=2e3,writingAfterMs:i=8e3,messages:a}){let[o,s]=(0,H.useState)(0);(0,H.useEffect)(()=>{if(!t)return;s(0);let e=setInterval(()=>{s(e=>e+1)},n);return()=>clearInterval(e)},[t,n]);let c=(0,H.useMemo)(()=>{if(!t)return e;let a=o*n;return a>=i?`writing`:a<r||o%2==0?`thinking`:`exploring`},[t,e,o,n,r,i]);return{label:(0,H.useMemo)(()=>{if(a&&a.length>0)return a[o%a.length];switch(c){case`exploring`:return`Exploring`;case`writing`:return`Writing`;default:return`Thinking`}},[a,o,c])}}function HM({size:e=`large`,mode:t=`thinking`,showLabel:n=!0,autoCycle:r=!0,cycleMs:i=2e3,exploringAfterMs:a=2e3,writingAfterMs:o=8e3,messages:s}){let{label:c}=VM({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,U.jsxs)(Tu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,U.jsx)(Yf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,U.jsx)(su,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,U.jsx)(Yf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var{entries:UM,setPrototypeOf:WM,isFrozen:GM,getPrototypeOf:KM,getOwnPropertyDescriptor:qM}=Object,{freeze:JM,seal:YM,create:XM}=Object,{apply:ZM,construct:QM}=typeof Reflect<`u`&&Reflect;JM||=function(e){return e},YM||=function(e){return e},ZM||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},QM||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var $M=pN(Array.prototype.forEach),eN=pN(Array.prototype.lastIndexOf),tN=pN(Array.prototype.pop),nN=pN(Array.prototype.push),rN=pN(Array.prototype.splice),iN=pN(String.prototype.toLowerCase),aN=pN(String.prototype.toString),oN=pN(String.prototype.match),sN=pN(String.prototype.replace),cN=pN(String.prototype.indexOf),lN=pN(String.prototype.trim),uN=pN(Object.prototype.hasOwnProperty),dN=pN(RegExp.prototype.test),fN=mN(TypeError);function pN(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ZM(e,t,r)}}function mN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return QM(e,n)}}function hN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:iN;WM&&WM(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(GM(t)||(t[r]=e),i=e)}e[i]=!0}return e}function gN(e){for(let t=0;t<e.length;t++)uN(e,t)||(e[t]=null);return e}function _N(e){let t=XM(null);for(let[n,r]of UM(e))uN(e,n)&&(Array.isArray(r)?t[n]=gN(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=_N(r):t[n]=r);return t}function vN(e,t){for(;e!==null;){let n=qM(e,t);if(n){if(n.get)return pN(n.get);if(typeof n.value==`function`)return pN(n.value)}e=KM(e)}function n(){return null}return n}var yN=JM(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),bN=JM(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),xN=JM([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),SN=JM([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),CN=JM(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),wN=JM([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),TN=JM([`#text`]),EN=JM(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),DN=JM(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ON=JM(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),kN=JM([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),AN=YM(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jN=YM(/<%[\w\W]*|[\w\W]*%>/gm),MN=YM(/\$\{[\w\W]*/gm),NN=YM(/^data-[\-\w.\u00B7-\uFFFF]+$/),PN=YM(/^aria-[\-\w]+$/),FN=YM(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IN=YM(/^(?:\w+script|data):/i),LN=YM(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),RN=YM(/^html$/i),zN=YM(/^[a-z][.\w]*(-[.\w]+)+$/i),BN=Object.freeze({__proto__:null,ARIA_ATTR:PN,ATTR_WHITESPACE:LN,CUSTOM_ELEMENT:zN,DATA_ATTR:NN,DOCTYPE_NAME:RN,ERB_EXPR:jN,IS_ALLOWED_URI:FN,IS_SCRIPT_OR_DATA:IN,MUSTACHE_EXPR:AN,TMPLIT_EXPR:MN}),VN={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},HN=function(){return typeof window>`u`?null:window},UN=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},WN=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function GN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:HN(),t=e=>GN(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==VN.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=vN(m,`cloneNode`),g=vN(m,`remove`),_=vN(m,`nextSibling`),v=vN(m,`childNodes`),y=vN(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=WN();t.isSupported=typeof UM==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:k,TMPLIT_EXPR:A,DATA_ATTR:j,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:ee}=BN,{IS_ALLOWED_URI:F}=BN,I=null,te=hN({},[...yN,...bN,...xN,...CN,...TN]),ne=null,re=hN({},[...EN,...DN,...ON,...kN]),ie=Object.seal(XM(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),L=null,ae=null,oe=Object.seal(XM(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),se=!0,ce=!0,le=!1,ue=!0,de=!1,fe=!0,R=!1,pe=!1,me=!1,he=!1,ge=!1,z=!1,_e=!0,ve=!1,B=!0,ye=!1,be={},xe=null,Se=hN({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ce=null,we=hN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Te=null,Ee=hN({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),De=`http://www.w3.org/1998/Math/MathML`,Oe=`http://www.w3.org/2000/svg`,ke=`http://www.w3.org/1999/xhtml`,Ae=ke,je=!1,Me=null,Ne=hN({},[De,Oe,ke],aN),Pe=hN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Fe=hN({},[`annotation-xml`]),Ie=hN({},[`title`,`style`,`font`,`a`,`script`]),Le=null,Re=[`application/xhtml+xml`,`text/html`],ze=null,Be=null,Ve=n.createElement(`form`),He=function(e){return e instanceof RegExp||e instanceof Function},V=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===e)){if((!e||typeof e!=`object`)&&(e={}),e=_N(e),Le=Re.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ze=Le===`application/xhtml+xml`?aN:iN,I=uN(e,`ALLOWED_TAGS`)?hN({},e.ALLOWED_TAGS,ze):te,ne=uN(e,`ALLOWED_ATTR`)?hN({},e.ALLOWED_ATTR,ze):re,Me=uN(e,`ALLOWED_NAMESPACES`)?hN({},e.ALLOWED_NAMESPACES,aN):Ne,Te=uN(e,`ADD_URI_SAFE_ATTR`)?hN(_N(Ee),e.ADD_URI_SAFE_ATTR,ze):Ee,Ce=uN(e,`ADD_DATA_URI_TAGS`)?hN(_N(we),e.ADD_DATA_URI_TAGS,ze):we,xe=uN(e,`FORBID_CONTENTS`)?hN({},e.FORBID_CONTENTS,ze):Se,L=uN(e,`FORBID_TAGS`)?hN({},e.FORBID_TAGS,ze):_N({}),ae=uN(e,`FORBID_ATTR`)?hN({},e.FORBID_ATTR,ze):_N({}),be=uN(e,`USE_PROFILES`)?e.USE_PROFILES:!1,se=e.ALLOW_ARIA_ATTR!==!1,ce=e.ALLOW_DATA_ATTR!==!1,le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=e.SAFE_FOR_TEMPLATES||!1,fe=e.SAFE_FOR_XML!==!1,R=e.WHOLE_DOCUMENT||!1,he=e.RETURN_DOM||!1,ge=e.RETURN_DOM_FRAGMENT||!1,z=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,_e=e.SANITIZE_DOM!==!1,ve=e.SANITIZE_NAMED_PROPS||!1,B=e.KEEP_CONTENT!==!1,ye=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||FN,Ae=e.NAMESPACE||ke,Pe=e.MATHML_TEXT_INTEGRATION_POINTS||Pe,Fe=e.HTML_INTEGRATION_POINTS||Fe,ie=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&He(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&He(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ie.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(ie.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),de&&(ce=!1),ge&&(he=!0),be&&(I=hN({},TN),ne=XM(null),be.html===!0&&(hN(I,yN),hN(ne,EN)),be.svg===!0&&(hN(I,bN),hN(ne,DN),hN(ne,kN)),be.svgFilters===!0&&(hN(I,xN),hN(ne,DN),hN(ne,kN)),be.mathMl===!0&&(hN(I,CN),hN(ne,ON),hN(ne,kN))),uN(e,`ADD_TAGS`)||(oe.tagCheck=null),uN(e,`ADD_ATTR`)||(oe.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?oe.tagCheck=e.ADD_TAGS:(I===te&&(I=_N(I)),hN(I,e.ADD_TAGS,ze))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?oe.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=_N(ne)),hN(ne,e.ADD_ATTR,ze))),e.ADD_URI_SAFE_ATTR&&hN(Te,e.ADD_URI_SAFE_ATTR,ze),e.FORBID_CONTENTS&&(xe===Se&&(xe=_N(xe)),hN(xe,e.FORBID_CONTENTS,ze)),e.ADD_FORBID_CONTENTS&&(xe===Se&&(xe=_N(xe)),hN(xe,e.ADD_FORBID_CONTENTS,ze)),B&&(I[`#text`]=!0),R&&hN(I,[`html`,`head`,`body`]),I.table&&(hN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw fN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw fN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=UN(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));JM&&JM(e),Be=e}},Ue=hN({},[...bN,...xN,...SN]),We=hN({},[...CN,...wN]),Ge=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ae,tagName:`template`});let n=iN(e.tagName),r=iN(t.tagName);return Me[e.namespaceURI]?e.namespaceURI===Oe?t.namespaceURI===ke?n===`svg`:t.namespaceURI===De?n===`svg`&&(r===`annotation-xml`||Pe[r]):!!Ue[n]:e.namespaceURI===De?t.namespaceURI===ke?n===`math`:t.namespaceURI===Oe?n===`math`&&Fe[r]:!!We[n]:e.namespaceURI===ke?t.namespaceURI===Oe&&!Fe[r]||t.namespaceURI===De&&!Pe[r]?!1:!We[n]&&(Ie[n]||!Ue[n]):!!(Le===`application/xhtml+xml`&&Me[e.namespaceURI]):!1},H=function(e){nN(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},Ke=function(e,n){try{nN(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{nN(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(he||ge)try{H(n)}catch{}else try{n.setAttribute(e,``)}catch{}},qe=function(e){let t=null,r=null;if(me)e=`<remove></remove>`+e;else{let t=oN(e,/^[\r\n\t ]+/);r=t&&t[0]}Le===`application/xhtml+xml`&&Ae===ke&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ae===ke)try{t=new f().parseFromString(i,Le)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ae,`template`,null);try{t.documentElement.innerHTML=je?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ae===ke?T.call(t,R?`html`:`body`)[0]:R?t.documentElement:a},Je=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ye=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Xe=function(e){return typeof s==`function`&&e instanceof s};function Ze(e,n,r){$M(e,e=>{e.call(t,n,r,Be)})}let Qe=function(e){let n=null;if(Ze(D.beforeSanitizeElements,e,null),Ye(e))return H(e),!0;let r=ze(e.nodeName);if(Ze(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),fe&&e.hasChildNodes()&&!Xe(e.firstElementChild)&&dN(/<[/\w!]/g,e.innerHTML)&&dN(/<[/\w!]/g,e.textContent)||e.nodeType===VN.progressingInstruction||fe&&e.nodeType===VN.comment&&dN(/<[/\w]/g,e.data))return H(e),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&et(r)&&(ie.tagNameCheck instanceof RegExp&&dN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r)))return!1;if(B&&!xe[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return H(e),!0}return e instanceof c&&!Ge(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&dN(/<\/no(script|embed|frames)/i,e.innerHTML)?(H(e),!0):(de&&e.nodeType===VN.text&&(n=e.textContent,$M([O,k,A],e=>{n=sN(n,e,` `)}),e.textContent!==n&&(nN(t.removed,{element:e.cloneNode()}),e.textContent=n)),Ze(D.afterSanitizeElements,e,null),!1)},$e=function(e,t,r){if(ae[t]||_e&&(t===`id`||t===`name`)&&(r in n||r in Ve))return!1;if(!(ce&&!ae[t]&&dN(j,t))&&!(se&&dN(M,t))&&!(oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e))){if(!ne[t]||ae[t]){if(!(et(e)&&(ie.tagNameCheck instanceof RegExp&&dN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&dN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&dN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!Te[t]&&!dN(F,sN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&cN(r,`data:`)===0&&Ce[e])&&!(le&&!dN(N,sN(r,P,``)))&&r)return!1}return!0},et=function(e){return e!==`annotation-xml`&&oN(e,ee)},tt=function(e){Ze(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Ye(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=ze(a),l=s,u=a===`value`?l:lN(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Ze(D.uponSanitizeAttribute,e,r),u=r.attrValue,ve&&(c===`id`||c===`name`)&&(Ke(a,e),u=`user-content-`+u),fe&&dN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Ke(a,e);continue}if(c===`attributename`&&oN(u,`href`)){Ke(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ke(a,e);continue}if(!ue&&dN(/\/>/i,u)){Ke(a,e);continue}de&&$M([O,k,A],e=>{u=sN(u,e,` `)});let d=ze(e.nodeName);if(!$e(d,c,u)){Ke(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Ye(e)?H(e):tN(t.removed)}catch{Ke(a,e)}}Ze(D.afterSanitizeAttributes,e,null)},nt=function e(t){let n=null,r=Je(t);for(Ze(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Ze(D.uponSanitizeShadowNode,n,null),Qe(n),tt(n),n.content instanceof a&&e(n.content);Ze(D.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(je=!e,je&&(e=`<!-->`),typeof e!=`string`&&!Xe(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw fN(`dirty is not a string, aborting`)}else throw fN(`toString is not a function`);if(!t.isSupported)return e;if(pe||V(n),t.removed=[],typeof e==`string`&&(ye=!1),ye){if(e.nodeName){let t=ze(e.nodeName);if(!I[t]||L[t])throw fN(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=qe(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===VN.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!he&&!de&&!R&&e.indexOf(`<`)===-1)return b&&z?b.createHTML(e):e;if(i=qe(e),!i)return he?null:z?x:``}i&&me&&H(i.firstChild);let u=Je(ye?e:i);for(;c=u.nextNode();)Qe(c),tt(c),c.content instanceof a&&nt(c.content);if(ye)return e;if(he){if(ge)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(ne.shadowroot||ne.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=R?i.outerHTML:i.innerHTML;return R&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&dN(RN,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
319
+ `+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=pw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Vw.assertOptions(n,{silentJSONParsing:Hw.transitional(Hw.boolean),forcedJSONParsing:Hw.transitional(Hw.boolean),clarifyTimeoutError:Hw.transitional(Hw.boolean),legacyInterceptorReqResOrdering:Hw.transitional(Hw.boolean)},!1),r!=null&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:Vw.assertOptions(r,{encode:Hw.function,serialize:Hw.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Vw.assertOptions(t,{baseUrl:Hw.spelling(`baseURL`),withXsrfToken:Hw.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&Z.merge(i.common,i[t.method]);i&&Z.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=XC.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||TC;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Iw.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Iw.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=pw(this.defaults,e),CC(dw(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Z.forEach([`delete`,`get`,`head`,`options`],function(e){Uw.prototype[e]=function(t,n){return this.request(pw(n||{},{method:e,url:t,data:(n||{}).data}))}}),Z.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(pw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Uw.prototype[e]=t(),Uw.prototype[e+`Form`]=t(!0)});var Ww=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new $C(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Gw(e){return function(t){return e.apply(null,t)}}function Kw(e){return Z.isObject(e)&&e.isAxiosError===!0}var qw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(qw).forEach(([e,t])=>{qw[t]=e});function Jw(e){let t=new Uw(e),n=tS(Uw.prototype.request,t);return Z.extend(n,Uw.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Jw(pw(e,t))},n}var Yw=Jw(zC);Yw.Axios=Uw,Yw.CanceledError=$C,Yw.CancelToken=Ww,Yw.isCancel=QC,Yw.VERSION=Lw,Yw.toFormData=vC,Yw.AxiosError=fC,Yw.Cancel=Yw.CanceledError,Yw.all=function(e){return Promise.all(e)},Yw.spread=Gw,Yw.isAxiosError=Kw,Yw.mergeConfig=pw,Yw.AxiosHeaders=XC,Yw.formToJSON=e=>LC(Z.isHTMLForm(e)?new FormData(e):e),Yw.getAdapter=Pw.getAdapter,Yw.HttpStatusCode=qw,Yw.default=Yw;var{Axios:Xw,AxiosError:Zw,CanceledError:Qw,isCancel:$w,CancelToken:eT,VERSION:tT,all:nT,Cancel:rT,isAxiosError:iT,spread:aT,toFormData:oT,AxiosHeaders:sT,HttpStatusCode:cT,formToJSON:lT,getAdapter:uT,mergeConfig:dT}=Yw,fT=`genai_access_token`,pT=`genai_tenant_id`,mT=`genai_switch_ready`;function hT(e){try{let t=JSON.parse(atob(e.split(`.`)[1]));return t.exp?t.exp*1e3<Date.now():!1}catch{return!0}}function gT(){if(typeof sessionStorage<`u`){let e=sessionStorage.getItem(fT);return e&&hT(e)?(sessionStorage.removeItem(fT),null):e}return null}function _T(e){typeof sessionStorage<`u`&&sessionStorage.setItem(fT,e)}function vT(){return typeof sessionStorage<`u`?sessionStorage.getItem(pT):null}function yT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(pT,String(e))}function bT(){return typeof sessionStorage<`u`?sessionStorage.getItem(mT)===`true`:!1}function xT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(mT,String(e))}function ST(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function CT(e,t,n){let r=[],i=[],a={};for(let o of e){let e=o.position||t;a[e]=a[e]||0,a[e]+=1,a[e]<=n?i.push(o):r.push(o)}return{notifications:i,queue:r}}var wT=ST({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5});function TT(e,t){let n=e.getState(),r=CT(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function ET(e,t=wT){let n=e.id||gt();return TT(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function DT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M11.992 15H12.001`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M12 12V8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function OT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function kT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M12.2422 17V12C12.2422 11.5286 12.2422 11.2929 12.0957 11.1464C11.9493 11 11.7136 11 11.2422 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M11.992 8H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function AT({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M5.32171 9.68293C7.73539 5.41199 8.94222 3.27651 10.5983 2.72681C11.5093 2.4244 12.4907 2.4244 13.4017 2.72681C15.0578 3.27651 16.2646 5.41199 18.6783 9.68293C21.092 13.9538 22.2988 16.0893 21.9368 17.8293C21.7376 18.7866 21.2469 19.6548 20.535 20.3097C19.241 21.5 16.8274 21.5 12 21.5C7.17265 21.5 4.75897 21.5 3.46496 20.3097C2.75308 19.6548 2.26239 18.7866 2.06322 17.8293C1.70119 16.0893 2.90803 13.9538 5.32171 9.68293Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M11.992 16H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M12 13V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var jT={danger:(0,U.jsx)(DT,{}),info:(0,U.jsx)(kT,{}),success:(0,U.jsx)(OT,{}),warning:(0,U.jsx)(AT,{})};function MT(e,t){let n=jT[e];ET({...t,variant:e,icon:n})}function NT(e){MT(`danger`,{title:Pe._({id:`SlfejT`}),...e})}function PT(){return Pe._({id:`Qlh+W2`})}function FT(e,t){return{}[e]}function IT(e){return e?{401:Pe._({id:`9cOLBO`}),403:Pe._({id:`qriaXz`}),404:Pe._({id:`373i3G`}),500:Pe._({id:`lkE00/`}),502:Pe._({id:`9dPdtH`}),503:Pe._({id:`Vw36Gt`}),504:Pe._({id:`3R0fAs`})}[e]:``}var LT=`react-starter-kit-`,RT=Object.entries({BUILD_META_DATA_INSPECTOR:`buildMetaDataInspector`,COLOR_SCHEME:`colorScheme`,DEBUG:`debug`,ENVIRONMENT_INSPECTOR:`environmentInspector`,INCLUDE_BEARER:`includeBearer`,KEYCLOAK_ERROR:`keycloakError`,LANGUAGE:`language`,LOCAL_STORAGE_INSPECTOR:`localStorageInspector`,LOGGER_LOG_LEVEL:`loggerLogLevel`,LOGGER:`logger`,SHOW_HTTP_ERROR_DEBUG_TOASTER:`showHttpErrorDebugToaster`,TABLE_VIEW:`tableView`,DRAWER_EXPANDED:`drawerExpanded`,PANEL_OPEN:`panelOpen`,PERMISSION_GOD_MODE:`permissionGodMode`}).reduce((e,[t,n])=>({...e,[t]:`${LT}${n}`}),{});function zT(e,t=null){let n=localStorage.getItem(e);if(n===null)return t;try{let e=JSON.parse(n);return typeof t==`boolean`?typeof e==`boolean`?e:t:typeof t==`number`?typeof e==`number`&&!Number.isNaN(e)?e:t:e}catch{return typeof t==`string`?n:t}}function BT(){return zT(RT.DEBUG,!1),!0}function VT(){return BT()?zT(RT.SHOW_HTTP_ERROR_DEBUG_TOASTER,!1):!1}function HT(e){return e?.operationResultCode!==void 0}function UT(e){return e?.error!==void 0}function WT(e){let t=e.response?.headers;if(!t)return!1;let n=`application/problem+json`,r=`Content-Type`;return typeof t.get==`function`?t.get(r)===n:t[r]===n}function GT(e){return HT(e)?e.description:UT(e)?e.error:e?.message||e?.errorCode||PT()}function KT(e){return e.code?FT(e.code)||PT():``}function qT(e){return{url:e.config?.url,method:e.config?.method?.toUpperCase(),status:e.response?.status,response:e.response?.data}}function JT(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function YT({url:e,method:t,status:n,response:r}){let i=r!=null&&Object.keys(r).length>0;return(0,U.jsxs)(By,{children:[[{label:Pe._({id:`IagCbF`}),value:e},{label:Pe._({id:`fiPesM`}),value:t},{label:Pe._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,U.jsxs)(Tu,{gap:4,children:[(0,U.jsxs)(Yf,{size:`xs`,fw:500,children:[e,`:`]}),(0,U.jsx)(Yf,{size:`xs`,children:t})]},n)),i&&(0,U.jsx)(Fm,{block:!0,lh:1.2,children:JT(r)})]})}function XT(e){let t=e.response?.data;return HT(t)?t.operationResultCode:UT(t)?t.error:t?.errorCode||t?.code||t?.message||``}function ZT(e){return e.response?.data?.status||e.response?.status||e.status}function QT(e){let t=e.response?.data,n=XT(e);if(n){let e=FT(n);if(e)return e}return GT(t)}function $T(e){let t=e.response?.data;return KT(t)||IT(ZT(e))}function eE(e){return e.response?.data?WT(e)?$T(e):QT(e):e.message}function tE(e){return e.response?.data?.errorId}function nE(e){let t=eE(e),n=WT(e)?tE(e):void 0;return n?(0,U.jsxs)(By,{gap:8,children:[(0,U.jsx)(Yf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,U.jsxs)(Yf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Pe._({id:`jf+o1U`}),`: `,n]})]}):t}function rE(e){if(!e)return PT();if(VT()){let t=qT(e);return Object.values(t).some(Boolean)?(0,U.jsx)(By,{children:YT(t)}):nE(e)}return nE(e)}function iE(){return VT()?Pe._({id:`J5ej6L`}):Pe._({id:`SlfejT`})}function aE(e){NT({title:iE(),message:rE(e),autoClose:VT()?!1:5e3})}var oE=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},sE=(e=>e?oE(e):oE),cE=e=>e;function lE(e,t=cE){let n=H.useSyncExternalStore(e.subscribe,H.useCallback(()=>t(e.getState()),[e,t]),H.useCallback(()=>t(e.getInitialState()),[e,t]));return H.useDebugValue(n),n}var uE=e=>{let t=sE(e),n=e=>lE(t,e);return Object.assign(n,t),n},dE=(e=>e?uE(e):uE),fE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function pE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var mE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:pE(),spanId:pE().substring(0,16)};return this.contextMap.set(e,t),t}startSpan(e){let t=this.contextMap.get(e);if(!t)return this.startTrace(e);let n=pE().substring(0,16),r={traceId:t.traceId,spanId:n,parentSpanId:t.spanId};return this.contextMap.set(e,r),r}getCurrentContext(e){return this.contextMap.get(e)}clearContext(e){this.contextMap.delete(e)}}.getInstance(),hE=class e{static{this.globalConfig={enabled:!0,minLogLevel:`INFO`,applicationName:`frontend`}}constructor(t,n={}){this.name=t,this.additionalFields=n.additionalFields??{},this.config={enabled:n.enabled??BT(),minLogLevel:n.minLogLevel??e.globalConfig.minLogLevel}}createLogEntry(t,n,r){let i=mE.getCurrentContext(this.name)??mE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:fE[t],applicationName:e.globalConfig.applicationName,traceId:i.traceId,spanId:i.spanId,...i.parentSpanId&&{parentSpanId:i.parentSpanId},...this.additionalFields,...r}}log(t,n,r){if(!(!this.config.enabled||!e.globalConfig.enabled||fE[t]<fE[this.config.minLogLevel])){let e=Object.fromEntries(Object.entries(r??{}).map(([e,t])=>[e,t?.toString()??t]));Object.keys(e).length>0?console.log(n,e):console.log(n)}}debug(e,t){this.log(`DEBUG`,e,t)}info(e,t){this.log(`INFO`,e,t)}warn(e,t){this.log(`WARN`,e,t)}error(e,t){this.log(`ERROR`,e,t)}startSpan(){mE.startSpan(this.name)}clearTraceContext(){mE.clearContext(this.name)}setEnabled(e){this.config.enabled=e}setMinLogLevel(e){this.config.minLogLevel=e}static setGlobalEnabled(t){e.globalConfig.enabled=t}static getGlobalEnabled(){return e.globalConfig.enabled}static setGlobalMinLogLevel(t){e.globalConfig.minLogLevel=t}static getGlobalMinLogLevel(){return e.globalConfig.minLogLevel}static setGlobalApplicationName(t){e.globalConfig.applicationName=t}};new hE(`KeycloakService`);var gE=null;function _E(){return gE?.token?`Bearer ${gE.token}`:void 0}function vE(){return gE}var yE=new Xx({queryCache:new Yx({onError:(e,t)=>{(t.meta?.handleGlobalError??!0)&&e instanceof Zw&&aE(e)}}),mutationCache:new Kx({onError:(e,t,n,r)=>{(r.meta?.handleGlobalError??!0)&&e instanceof Zw&&aE(e)}}),defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:600*1e3},mutations:{retry:!1}}});function bE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?xE(r):t===`private`||n?SE(r):xE(r):r}function xE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function SE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function CE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function wE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Yw.create({baseURL:CE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=vE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=bE(e.url||``,e.accessScope,t));let i=gT(),a=vT();i&&!e.headers.has(`Authorization`)&&(e.headers.Authorization=`Bearer ${i}`),a&&!e.headers.has(`x-tenant-id`)&&(e.headers[`x-tenant-id`]=a);let o=_E();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Pe.locale),!e.headers.has(`Content-Type`)&&!(e.data instanceof FormData)&&(e.headers[`Content-Type`]=`application/json`),e.method?.toLowerCase()===`get`&&(e.data={}),e},e=>Promise.reject(e)),i}var TE;function EE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;wE({baseUrl:n,prefix:r.crm}),wE({baseUrl:n,prefix:r.uiAuthz}),TE=wE({baseUrl:i,prefix:``,timeoutMs:12e4})}var Q=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,g={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(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))(),1);function DE({type:e,date:t,locale:n,format:r,labelSeparator:i}){let a=e=>(0,Q.default)(e).locale(n).format(r);return e===`default`?t===null?``:a(t):e===`multiple`?t.map(a).join(`, `):e===`range`&&Array.isArray(t)?t[0]&&t[1]?`${a(t[0])} ${i} ${a(t[1])}`:t[0]?`${a(t[0])} ${i} `:``:``}function OE({formatter:e,...t}){return(e||DE)(t)}function kE({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:i}){switch(e){case`up`:return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=i[t-1][i[t-1].length-1]-1?i[t-1].length-1:i[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case`down`:return n===i[t].length-1||n===i[t].length-2&&r>=i[t][i[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case`left`:return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:i[t-1].length-1,cellIndex:i[t-1][i[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:i[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case`right`:return n===i[t].length-1&&r===i[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===i[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function AE({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=kE({direction:t,size:a,rowIndex:r,cellIndex:i,levelIndex:n});if(!o)return;let s=e.current?.[o.levelIndex]?.[o.rowIndex]?.[o.cellIndex];s&&(s.disabled||s.getAttribute(`data-hidden`)||s.getAttribute(`data-outside`)?AE({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function jE(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function ME(e){return e.current?.map(e=>e.map(e=>e.length))}function NE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=jE(i.key);a&&(i.preventDefault(),AE({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:ME(e)}))}function PE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD`)}function FE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function IE({minDate:e,maxDate:t}){let n=(0,Q.default)();return!e&&!t?PE(n):e&&(0,Q.default)(n).isBefore(e)?PE(e):t&&(0,Q.default)(n).isAfter(t)?PE(t):PE(n)}var LE=(0,H.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function RE(){let e=(0,H.use)(LE),t=(0,H.useCallback)(t=>t||e.locale,[e.locale]),n=(0,H.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,H.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,H.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function zE({value:e,type:t,withTime:n}){let r=n?FE:PE;if(t===`range`&&Array.isArray(e)){let t=r(e[0]),n=r(e[1]);return t?n?`${t} – ${n}`:`${t} –`:``}return t===`multiple`&&Array.isArray(e)?e.filter(Boolean).join(`, `):!Array.isArray(e)&&e?r(e):``}function BE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,U.jsx)(`input`,{type:`hidden`,value:zE({value:e,type:t,withTime:i}),name:n,form:r})}BE.displayName=`@mantine/dates/HiddenDatesInput`;var VE={day:`m_396ce5cb`},HE=Sn((e,{size:t})=>({day:{"--day-size":it(t,`day-size`)}})),UE=K(e=>{let t=W(`Day`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,date:c,disabled:l,__staticSelector:u,weekend:d,outside:f,selected:p,renderDay:m,inRange:h,firstInRange:g,lastInRange:_,hidden:v,static:y,highlightToday:b,fullWidth:x,attributes:S,...C}=t;return(0,U.jsx)(ul,{...G({name:u||`Day`,classes:VE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:HE,rootSelector:`day`})(`day`,{style:v?{display:`none`}:void 0}),component:y?`div`:`button`,disabled:l,"data-today":(0,Q.default)(c).isSame(new Date,`day`)||void 0,"data-hidden":v||void 0,"data-highlight-today":b||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!f&&d||void 0,"data-outside":!l&&f||void 0,"data-selected":!l&&p||void 0,"data-in-range":h&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":_&&!l||void 0,"data-static":y||void 0,"data-full-width":x||void 0,unstyled:o,...C,children:m?.(c)||(0,Q.default)(c).date()})});UE.classes=VE,UE.varsResolver=HE,UE.displayName=`@mantine/dates/Day`;function WE({locale:e,format:t=`dd`,firstDayOfWeek:n=1}){let r=(0,Q.default)().day(n),i=[];for(let n=0;n<7;n+=1)typeof t==`string`?i.push((0,Q.default)(r).add(n,`days`).locale(e).format(t)):i.push(t((0,Q.default)(r).add(n,`days`).format(`YYYY-MM-DD`)));return i}var GE={weekday:`m_18a3eca`},KE=Sn((e,{size:t})=>({weekdaysRow:{"--wr-fz":st(t),"--wr-spacing":at(t)}})),qE=K(e=>{let t=W(`WeekdaysRow`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,locale:c,firstDayOfWeek:l,weekdayFormat:u,cellComponent:d=`th`,__staticSelector:f,withWeekNumbers:p,attributes:m,...h}=t,g=G({name:f||`WeekdaysRow`,classes:GE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:KE,rootSelector:`weekdaysRow`}),_=RE(),v=WE({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,U.jsx)(d,{...g(`weekday`),children:e},t));return(0,U.jsxs)(q,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,U.jsx)(d,{...g(`weekday`),children:`#`}),v]})});qE.classes=GE,qE.varsResolver=KE,qE.displayName=`@mantine/dates/WeekdaysRow`;function JE(e,t=1){let n=(0,Q.default)(e);if(!n.isValid())return n;let r=t===0?6:t-1;for(;n.day()!==r;)n=n.add(1,`day`);return n.format(`YYYY-MM-DD`)}function YE(e,t=1){let n=(0,Q.default)(e);for(;n.day()!==t;)n=n.subtract(1,`day`);return n.format(`YYYY-MM-DD`)}function XE({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){let r=(0,Q.default)((0,Q.default)(e).subtract((0,Q.default)(e).date()-1,`day`).format(`YYYY-M-D`)),i=r.format(`YYYY-MM-DD`),a=JE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Q.default)(YE(i,t));for(;(0,Q.default)(s).isBefore(a,`day`);){let e=[];for(let t=0;t<7;t+=1)e.push(s.format(`YYYY-MM-DD`)),s=s.add(1,`day`);o.push(e)}if(n&&o.length<6){let e=o[o.length-1],t=e[e.length-1],n=(0,Q.default)(t).add(1,`day`);for(;o.length<6;){let e=[];for(let t=0;t<7;t+=1)e.push(n.format(`YYYY-MM-DD`)),n=n.add(1,`day`);o.push(e)}}return o}function ZE(e,t){return(0,Q.default)(e).format(`YYYY-MM`)===(0,Q.default)(t).format(`YYYY-MM`)}function QE(e,t){return t?(0,Q.default)(e).isAfter((0,Q.default)(t).subtract(1,`day`),`day`):!0}function $E(e,t){return t?(0,Q.default)(e).isBefore((0,Q.default)(t).add(1,`day`),`day`):!0}function eD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>$E(e,n)&&QE(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||ZE(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Q.default)().isSame(e,`date`))||s[0]}var tD=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){"use strict";var e=`day`;return function(t,n,r){var i=function(t){return t.add(4-t.isoWeekday(),e)},a=n.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var n,a,o,s,c=i(this),l=(n=this.isoWeekYear(),a=this.$u,o=(a?r.utc:r)().year(n).startOf(`year`),s=4-o.isoWeekday(),o.isoWeekday()>4&&(s+=7),o.add(s,e));return c.diff(l,`week`)+1},a.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var o=a.startOf;a.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):o.bind(this)(e,t)}}}))}))(),1);Q.default.extend(tD.default);function nD(e){return(0,Q.default)(e.find(e=>(0,Q.default)(e).day()===1)).isoWeek()}var rD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},iD={withCellSpacing:!0},aD=Sn((e,{size:t})=>({weekNumber:{"--wn-fz":st(t),"--wn-size":it(t,`wn-size`)}})),oD=K(e=>{let t=W(`Month`,iD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,locale:l,firstDayOfWeek:u,weekdayFormat:d,month:f,weekendDays:p,getDayProps:m,excludeDate:h,minDate:g,maxDate:_,renderDay:v,hideOutsideDates:y,hideWeekdays:b,getDayAriaLabel:x,static:S,__getDayRef:C,__onDayKeyDown:w,__onDayClick:T,__onDayMouseEnter:E,__preventFocus:D,__stopPropagation:O,withCellSpacing:k,size:A,highlightToday:j,withWeekNumbers:M,fullWidth:N,attributes:P,...ee}=t,F=G({name:c||`Month`,classes:rD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:aD,rootSelector:`month`}),I=RE(),te=XE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=eD({dates:te,minDate:PE(g),maxDate:PE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Hr({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!ZE(e,f),i=x?.(e)||(0,Q.default)(e).locale(l||I.locale).format(`D MMMM YYYY`),a=m?.(e),s=(0,Q.default)(e).isSame(ne,`date`);return(0,U.jsx)(`td`,{...F(`monthCell`),"data-with-spacing":k||void 0,children:(0,U.jsx)(UE,{__staticSelector:c||`Month`,classNames:re,styles:ie,attributes:P,unstyled:o,"data-mantine-stop-propagation":O||void 0,highlightToday:j,renderDay:v,date:e,size:A,weekend:I.getWeekendDays(p).includes((0,Q.default)(e).get(`day`)),outside:r,hidden:y?r:!1,"aria-label":i,static:S,fullWidth:N,disabled:h?.(e)||!$E(e,PE(_))||!QE(e,PE(g)),ref:e=>{e&&C?.(t,n,e)},...a,onKeyDown:r=>{a?.onKeyDown?.(r),w?.(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{a?.onMouseEnter?.(t),E?.(t,e)},onClick:t=>{a?.onClick?.(t),T?.(t,e)},onMouseDown:e=>{a?.onMouseDown?.(e),D&&e.preventDefault()},tabIndex:D||!s?-1:0})},e.toString())});return(0,U.jsxs)(`tr`,{...F(`monthRow`),children:[M&&(0,U.jsx)(`td`,{...F(`weekNumber`),children:nD(e)}),n]},t)});return(0,U.jsxs)(q,{component:`table`,...F(`month`),size:A,"data-full-width":N||void 0,...ee,children:[!b&&(0,U.jsx)(`thead`,{...F(`monthThead`),children:(0,U.jsx)(qE,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:re,styles:ie,unstyled:o,attributes:P})}),(0,U.jsx)(`tbody`,{...F(`monthTbody`),children:L})]})});oD.classes=rD,oD.varsResolver=aD,oD.displayName=`@mantine/dates/Month`;var sD={pickerControl:`m_dc6a3c71`},cD=Sn((e,{size:t})=>({pickerControl:{"--dpc-fz":st(t),"--dpc-size":it(t,`dpc-size`)}})),lD=K(e=>{let t=W(`PickerControl`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,firstInRange:c,lastInRange:l,inRange:u,__staticSelector:d,selected:f,disabled:p,fullWidth:m,attributes:h,...g}=t;return(0,U.jsx)(ul,{...G({name:d||`PickerControl`,classes:sD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:cD,rootSelector:`pickerControl`})(`pickerControl`),unstyled:o,"data-picker-control":!0,"data-full-width":m||void 0,"data-selected":f&&!p||void 0,"data-disabled":p||void 0,"data-in-range":u&&!p&&!f||void 0,"data-first-in-range":c&&!p||void 0,"data-last-in-range":l&&!p||void 0,disabled:p,...g})});lD.classes=sD,lD.varsResolver=cD,lD.displayName=`@mantine/dates/PickerControl`;function uD({year:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Q.default)(e).isBefore(t,`year`)||n&&(0,Q.default)(e).isAfter(n,`year`))}function dD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!uD({year:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Q.default)().isSame(e,`year`))||i[0]}function fD(e){let t=(0,Q.default)(e).year(),n=t-t%10,r=0,i=[[],[],[],[]];for(let e=0;e<4;e+=1){let t=e===3?1:3;for(let a=0;a<t;a+=1)i[e].push((0,Q.default)(new Date(n+r,0)).format(`YYYY-MM-DD`)),r+=1}return i}var pD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},mD={yearsListFormat:`YYYY`,withCellSpacing:!0},hD=K(e=>{let t=W(`YearsList`,mD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,decade:c,yearsListFormat:l,locale:u,minDate:d,maxDate:f,getYearControlProps:p,__staticSelector:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=G({name:m||`YearsList`,classes:pD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=RE(),O=fD(c),k=dD({years:O,minDate:d,maxDate:f,getYearControlProps:p}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=p?.(e),i=(0,Q.default)(e).isSame(k,`year`);return(0,U.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,U.jsx)(lD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:uD({year:e,minDate:d,maxDate:f}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Q.default)(e).locale(D.getLocale(u)).format(l)})},n)});return(0,U.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,U.jsx)(q,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,U.jsx)(`tbody`,{children:A})})});hD.classes=pD,hD.displayName=`@mantine/dates/YearsList`;function gD({month:e,minDate:t,maxDate:n}){return!t&&!n?!1:!!(t&&(0,Q.default)(e).isBefore(t,`month`)||n&&(0,Q.default)(e).isAfter(n,`month`))}function _D({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!gD({month:e,minDate:t,maxDate:n})&&!r?.(e)?.disabled);return i.find(e=>r?.(e)?.selected)||i.find(e=>(0,Q.default)().isSame(e,`month`))||i[0]}function vD(e){let t=(0,Q.default)(e).startOf(`year`).toDate(),n=[[],[],[],[]],r=0;for(let e=0;e<4;e+=1)for(let i=0;i<3;i+=1)n[e].push((0,Q.default)(t).add(r,`months`).format(`YYYY-MM-DD`)),r+=1;return n}var yD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},bD={monthsListFormat:`MMM`,withCellSpacing:!0},xD=K(e=>{let t=W(`MonthsList`,bD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,year:l,monthsListFormat:u,locale:d,minDate:f,maxDate:p,getMonthControlProps:m,__getControlRef:h,__onControlKeyDown:g,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:y,__stopPropagation:b,withCellSpacing:x,fullWidth:S,size:C,attributes:w,...T}=t,E=G({name:c||`MonthsList`,classes:yD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=RE(),O=vD(l),k=_D({months:O,minDate:PE(f),maxDate:PE(p),getMonthControlProps:m}),A=O.map((e,t)=>{let n=e.map((e,n)=>{let r=m?.(e),i=(0,Q.default)(e).isSame(k,`month`);return(0,U.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,U.jsx)(lD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:gD({month:e,minDate:PE(f),maxDate:PE(p)}),ref:e=>{e&&h?.(t,n,e)},...r,onKeyDown:i=>{r?.onKeyDown?.(i),g?.(i,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{r?.onClick?.(t),_?.(t,e)},onMouseEnter:t=>{r?.onMouseEnter?.(t),v?.(t,e)},onMouseDown:e=>{r?.onMouseDown?.(e),y&&e.preventDefault()},tabIndex:y||!i?-1:0,children:r?.children??(0,Q.default)(e).locale(D.getLocale(d)).format(u)})},n)});return(0,U.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,U.jsx)(q,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,U.jsx)(`tbody`,{children:A})})});xD.classes=yD,xD.displayName=`@mantine/dates/MonthsList`;var SD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},CD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},wD=Sn((e,{size:t})=>({calendarHeader:{"--dch-control-size":it(t,`dch-control-size`),"--dch-fz":st(t)}})),TD=K(e=>{let t=W(`CalendarHeader`,CD,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,nextIcon:c,previousIcon:l,nextLabel:u,previousLabel:d,onNext:f,onPrevious:p,onLevelClick:m,label:h,nextDisabled:g,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:y,withNext:b,withPrevious:x,headerControlsOrder:S,fullWidth:C,__staticSelector:w,__preventFocus:T,__stopPropagation:E,attributes:D,...O}=t,k=G({name:w||`CalendarHeader`,classes:SD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:wD,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,H.createElement)(ul,{...k(`calendarHeaderControl`),key:`previous`,"data-direction":`previous`,"aria-label":d,onClick:p,unstyled:o,onMouseDown:A,disabled:_,"data-disabled":_||void 0,tabIndex:T||_?-1:0,"data-mantine-stop-propagation":E||void 0},l||(0,U.jsx)(Nf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,H.createElement)(ul,{component:v?`button`:`div`,...k(`calendarHeaderLevel`),key:`level`,onClick:v?m:void 0,unstyled:o,onMouseDown:v?A:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":y,tabIndex:T||!v?-1:0,"data-mantine-stop-propagation":E||void 0},h),N=b&&(0,H.createElement)(ul,{...k(`calendarHeaderControl`),key:`next`,"data-direction":`next`,"aria-label":u,onClick:f,unstyled:o,onMouseDown:A,disabled:g,"data-disabled":g||void 0,tabIndex:T||g?-1:0,"data-mantine-stop-propagation":E||void 0},c||(0,U.jsx)(Nf,{...k(`calendarHeaderControlIcon`),"data-direction":`next`,size:`45%`})),P=S.map(e=>e===`previous`?j:e===`level`?M:e===`next`?N:null);return(0,U.jsx)(q,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});TD.classes=SD,TD.varsResolver=wD,TD.displayName=`@mantine/dates/CalendarHeader`;function ED(e){let t=fD(e);return[t[0][0],t[3][0]]}var DD={decadeLabelFormat:`YYYY`},OD=K(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:y,previousDisabled:b,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,decadeLabelFormat:T,classNames:E,styles:D,unstyled:O,__staticSelector:k,__stopPropagation:A,size:j,fullWidth:M,attributes:N,...P}=W(`DecadeLevel`,DD,e),ee=RE(),[F,I]=ED(t),te={__staticSelector:k||`DecadeLevel`,classNames:E,styles:D,unstyled:O,size:j,attributes:N},ne=typeof y==`boolean`?y:i?!(0,Q.default)(I).endOf(`year`).isBefore(i):!1,re=typeof b==`boolean`?b:r?!(0,Q.default)(F).startOf(`year`).isAfter(r):!1,ie=(e,t)=>(0,Q.default)(e).locale(n||ee.locale).format(t);return(0,U.jsxs)(q,{"data-decade-level":!0,size:j,...P,children:[(0,U.jsx)(TD,{label:typeof T==`function`?T(F,I):`${ie(F,T)} – ${ie(I,T)}`,__preventFocus:f,__stopPropagation:A,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,nextDisabled:ne,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:x,withNext:S,withPrevious:C,headerControlsOrder:w,fullWidth:M,...te}),(0,U.jsx)(hD,{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:A,withCellSpacing:d,fullWidth:M,...te})]})});OD.classes={...hD.classes,...TD.classes},OD.displayName=`@mantine/dates/DecadeLevel`;var kD={yearLabelFormat:`YYYY`},AD=K(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:b,previousDisabled:x,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,yearLabelFormat:D,__staticSelector:O,__stopPropagation:k,size:A,classNames:j,styles:M,unstyled:N,fullWidth:P,attributes:ee,...F}=W(`YearLevel`,kD,e),I=RE(),te={__staticSelector:O||`YearLevel`,classNames:j,styles:M,unstyled:N,size:A,attributes:ee},ne=typeof b==`boolean`?b:i?!(0,Q.default)(t).endOf(`year`).isBefore(i):!1,re=typeof x==`boolean`?x:r?!(0,Q.default)(t).startOf(`year`).isAfter(r):!1;return(0,U.jsxs)(q,{"data-year-level":!0,size:A,...F,children:[(0,U.jsx)(TD,{label:typeof D==`function`?D(t):(0,Q.default)(t).locale(n||I.locale).format(D),__preventFocus:f,__stopPropagation:k,nextIcon:p,previousIcon:m,nextLabel:h,previousLabel:g,onNext:_,onPrevious:v,onLevelClick:y,nextDisabled:ne,previousDisabled:re,hasNextLevel:S,levelControlAriaLabel:C,withNext:w,withPrevious:T,headerControlsOrder:E,fullWidth:P,...te}),(0,U.jsx)(xD,{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__getControlRef:s,__onControlKeyDown:c,__onControlClick:l,__onControlMouseEnter:u,__preventFocus:f,__stopPropagation:k,withCellSpacing:d,fullWidth:P,...te})]})});AD.classes={...TD.classes,...xD.classes},AD.displayName=`@mantine/dates/YearLevel`;var jD={monthLabelFormat:`MMMM YYYY`},MD=K(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:A,previousDisabled:j,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,monthLabelFormat:I,classNames:te,styles:ne,unstyled:re,__staticSelector:ie,size:L,static:ae,fullWidth:oe,attributes:se,...ce}=W(`MonthLevel`,jD,e),le=RE(),ue={__staticSelector:ie||`MonthLevel`,classNames:te,styles:ne,unstyled:re,size:L,attributes:se},de=typeof A==`boolean`?A:l?!(0,Q.default)(t).endOf(`month`).isBefore(l):!1,fe=typeof j==`boolean`?j:c?!(0,Q.default)(t).startOf(`month`).isAfter(c):!1;return(0,U.jsxs)(q,{"data-month-level":!0,size:L,...ce,children:[(0,U.jsx)(TD,{label:typeof I==`function`?I(t):(0,Q.default)(t).locale(n||le.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:de,previousDisabled:fe,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,fullWidth:oe,...ue}),(0,U.jsx)(oD,{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__getDayRef:m,__onDayKeyDown:h,__onDayClick:g,__onDayMouseEnter:_,__preventFocus:x,__stopPropagation:S,static:ae,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:oe,...ue})]})});MD.classes={...oD.classes,...TD.classes},MD.displayName=`@mantine/dates/MonthLevel`;var ND={levelsGroup:`m_30b26e33`},PD=K(e=>{let t=W(`LevelsGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,fullWidth:l,attributes:u,...d}=t;return(0,U.jsx)(q,{...G({name:c||`LevelsGroup`,classes:ND,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,rootSelector:`levelsGroup`})(`levelsGroup`),"data-full-width":l||void 0,...d})});PD.classes=ND,PD.displayName=`@mantine/dates/LevelsGroup`;var FD={numberOfColumns:1},ID=K(e=>{let{decade:t,locale:n,minDate:r,maxDate:i,yearsListFormat:a,getYearControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,headerControlsOrder:y,classNames:b,styles:x,unstyled:S,__staticSelector:C,__stopPropagation:w,numberOfColumns:T,levelControlAriaLabel:E,decadeLabelFormat:D,size:O,fullWidth:k,vars:A,attributes:j,...M}=W(`DecadeLevelGroup`,FD,e),N=(0,H.useRef)([]),P=Array(T).fill(0).map((e,A)=>{let M=(0,Q.default)(t).add(A*10,`years`).format(`YYYY-MM-DD`);return(0,U.jsx)(OD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:A,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:N}),__getControlRef:(e,t,n)=>{Array.isArray(N.current[A])||(N.current[A]=[]),Array.isArray(N.current[A][e])||(N.current[A][e]=[]),N.current[A][e][t]=n},levelControlAriaLabel:typeof E==`function`?E(M):E,locale:n,minDate:r,maxDate:i,__preventFocus:u,__stopPropagation:w,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,nextDisabled:_,previousDisabled:v,getYearControlProps:o,__staticSelector:C||`DecadeLevelGroup`,classNames:b,styles:x,unstyled:S,withCellSpacing:l,headerControlsOrder:y,fullWidth:k,attributes:j},A)});return(0,U.jsx)(PD,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});ID.classes={...PD.classes,...OD.classes},ID.displayName=`@mantine/dates/DecadeLevelGroup`;var LD={numberOfColumns:1},RD=K(e=>{let{year:t,locale:n,minDate:r,maxDate:i,monthsListFormat:a,getMonthControlProps:o,__onControlClick:s,__onControlMouseEnter:c,withCellSpacing:l,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,headerControlsOrder:x,classNames:S,styles:C,unstyled:w,__staticSelector:T,__stopPropagation:E,numberOfColumns:D,levelControlAriaLabel:O,yearLabelFormat:k,size:A,fullWidth:j,vars:M,attributes:N,...P}=W(`YearLevelGroup`,LD,e),ee=(0,H.useRef)([]),F=Array(D).fill(0).map((e,M)=>{let P=(0,Q.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,U.jsx)(AD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>NE({levelIndex:M,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:ee}),__getControlRef:(e,t,n)=>{Array.isArray(ee.current[M])||(ee.current[M]=[]),Array.isArray(ee.current[M][e])||(ee.current[M][e]=[]),ee.current[M][e][t]=n},levelControlAriaLabel:typeof O==`function`?O(P):O,locale:n,minDate:r,maxDate:i,__preventFocus:u,nextIcon:d,previousIcon:f,nextLabel:p,previousLabel:m,onNext:h,onPrevious:g,onLevelClick:_,nextDisabled:v,previousDisabled:y,hasNextLevel:b,getMonthControlProps:o,classNames:S,styles:C,unstyled:w,__staticSelector:T||`YearLevelGroup`,withCellSpacing:l,headerControlsOrder:x,fullWidth:j,attributes:N},M)});return(0,U.jsx)(PD,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});RD.classes={...AD.classes,...PD.classes},RD.displayName=`@mantine/dates/YearLevelGroup`;var zD={numberOfColumns:1},BD=K(e=>{let{month:t,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__onDayClick:m,__onDayMouseEnter:h,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,headerControlsOrder:A,classNames:j,styles:M,unstyled:N,numberOfColumns:P,levelControlAriaLabel:ee,monthLabelFormat:F,__staticSelector:I,__stopPropagation:te,size:ne,static:re,fullWidth:ie,vars:L,attributes:ae,...oe}=W(`MonthLevelGroup`,zD,e),se=(0,H.useRef)([]),ce=Array(P).fill(0).map((e,L)=>{let oe=(0,Q.default)(t).add(L,`months`).format(`YYYY-MM-DD`);return(0,U.jsx)(MD,{month:oe,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>NE({levelIndex:L,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:se}),__getDayRef:(e,t,n)=>{Array.isArray(se.current[L])||(se.current[L]=[]),Array.isArray(se.current[L][e])||(se.current[L][e]=[]),se.current[L][e][t]=n},levelControlAriaLabel:typeof ee==`function`?ee(oe):ee,locale:n,firstDayOfWeek:r,weekdayFormat:i,weekendDays:a,getDayProps:o,excludeDate:s,minDate:c,maxDate:l,renderDay:u,hideOutsideDates:d,hideWeekdays:f,getDayAriaLabel:p,__preventFocus:y,nextIcon:b,previousIcon:x,nextLabel:S,previousLabel:C,onNext:w,onPrevious:T,onLevelClick:E,nextDisabled:D,previousDisabled:O,hasNextLevel:k,classNames:j,styles:M,unstyled:N,__staticSelector:I||`MonthLevelGroup`,size:ne,static:re,withCellSpacing:g,highlightToday:_,withWeekNumbers:v,headerControlsOrder:A,fullWidth:ie,attributes:ae},L)});return(0,U.jsx)(PD,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:ae,...oe,children:ce})});BD.classes={...PD.classes,...MD.classes},BD.displayName=`@mantine/dates/MonthLevelGroup`;var VD={input:`m_6fa5e2aa`},HD=K(e=>{let{inputProps:t,wrapperProps:n,placeholder:r,classNames:i,styles:a,unstyled:o,popoverProps:s,modalProps:c,dropdownType:l,children:u,formattedValue:d,dropdownHandlers:f,dropdownOpened:p,onClick:m,clearable:h,clearSectionMode:g,onClear:_,clearButtonProps:v,rightSection:y,shouldClear:b,readOnly:x,disabled:S,value:C,name:w,form:T,type:E,onDropdownClose:D,withTime:O,...k}=bf(`PickerInputBase`,{size:`sm`},e),A=(0,U.jsx)(yf.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,U.jsxs)(U.Fragment,{children:[l===`modal`&&!x&&(0,U.jsx)(hg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,U.jsx)(yf.Wrapper,{...n,children:(0,U.jsxs)($l,{position:`bottom-start`,opened:p,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:D,...s,disabled:s?.disabled||l===`modal`||x,onChange:e=>{e||(s?.onClose?.(),j())},children:[(0,U.jsx)($l.Target,{children:(0,U.jsx)(yf,{"data-dates-input":!0,"data-read-only":x||void 0,disabled:S,component:`button`,type:`button`,multiline:!0,onClick:e=>{m?.(e),f.toggle()},__clearSection:A,__clearable:h&&b&&!x&&!S,__clearSectionMode:g,rightSection:y,...t,classNames:{...i,input:wn(VD.input,i?.input)},...k,children:d||(0,U.jsx)(yf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,U.jsx)($l.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,U.jsx)(BE,{value:C,name:w,form:T,type:E,withTime:O})]})});HD.classes=VD,HD.displayName=`@mantine/dates/PickerInputBase`;var UD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,WD=(e,t)=>{let n=t?FE:PE;return Array.isArray(e)?e.map(n):n(e)};function GD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,H.useRef)(e),[o,s,c]=Jt({value:WD(t,i),defaultValue:WD(n,i),finalValue:UD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?UD(e):n,s(l))),[l,s,c]}function KD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function qD(e){return e===0?`month`:e===1?`year`:`decade`}function JD(e,t,n){return qD(ht(KD(e,0),KD(t,0),KD(n,2)))}var YD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},XD=K(e=>{let t=W(`Calendar`,YD,e),{vars:n,maxLevel:r,minLevel:i,defaultLevel:a,level:o,onLevelChange:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,headerControlsOrder:b,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:S,__setDateRef:C,__setLevelRef:w,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,monthLabelFormat:P,nextIcon:ee,previousIcon:F,__onDayClick:I,__onDayMouseEnter:te,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,monthsListFormat:L,getMonthControlProps:ae,yearLabelFormat:oe,yearsListFormat:se,getYearControlProps:ce,decadeLabelFormat:le,classNames:ue,styles:de,unstyled:fe,minDate:R,maxDate:pe,locale:me,__staticSelector:he,size:ge,__preventFocus:z,__stopPropagation:_e,onNextDecade:ve,onPreviousDecade:B,onNextYear:ye,onPreviousYear:be,onNextMonth:xe,onPreviousMonth:Se,static:Ce,enableKeyboardNavigation:we,fullWidth:Te,attributes:Ee,ref:De,...Oe}=t,{resolvedClassNames:ke,resolvedStyles:Ae}=Hr({classNames:ue,styles:de,props:t}),[je,Me]=Jt({value:o?JD(o,i,r):void 0,defaultValue:a?JD(a,i,r):void 0,finalValue:JD(void 0,i,r),onChange:s}),[Ne,Pe]=GD({type:`default`,value:PE(c),defaultValue:PE(l),onChange:u});(0,H.useImperativeHandle)(C,()=>e=>{Pe(e)}),(0,H.useImperativeHandle)(w,()=>e=>{Me(e)});let Fe={__staticSelector:he||`Calendar`,styles:Ae,classNames:ke,unstyled:fe,size:ge,attributes:Ee},Ie=f||d||1,Le=(0,H.useRef)(null);if(Le.current===null){let e=new Date;Le.current=R&&(0,Q.default)(e).isAfter(R)?R:(0,Q.default)(e).format(`YYYY-MM-DD`)}let Re=Ne||Le.current,ze=()=>{let e=(0,Q.default)(Re).add(Ie,`month`).format(`YYYY-MM-DD`);xe?.(e),Pe(e)},Be=()=>{let e=(0,Q.default)(Re).subtract(Ie,`month`).format(`YYYY-MM-DD`);Se?.(e),Pe(e)},Ve=()=>{let e=(0,Q.default)(Re).add(Ie,`year`).format(`YYYY-MM-DD`);ye?.(e),Pe(e)},He=()=>{let e=(0,Q.default)(Re).subtract(Ie,`year`).format(`YYYY-MM-DD`);be?.(e),Pe(e)},V=()=>{let e=(0,Q.default)(Re).add(10*Ie,`year`).format(`YYYY-MM-DD`);ve?.(e),Pe(e)},Ue=()=>{let e=(0,Q.default)(Re).subtract(10*Ie,`year`).format(`YYYY-MM-DD`);B?.(e),Pe(e)},We=(0,H.useRef)(null);return(0,H.useEffect)(()=>{if(!we||Ce)return;let e=e=>{if(!We.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),Ue()):t&&(e.preventDefault(),He());break;case`ArrowDown`:t&&n?(e.preventDefault(),V()):t&&(e.preventDefault(),Ve());break;case`y`:case`Y`:je===`month`&&(e.preventDefault(),Me(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[we,Ce,je,Ve,He,V,Ue]),(0,U.jsxs)(q,{ref:qt(We,De),size:ge,"data-calendar":!0,"data-full-width":Te||void 0,...Oe,children:[je===`month`&&(0,U.jsx)(BD,{month:Re,minDate:R,maxDate:pe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:ze,onPrevious:Be,hasNextLevel:r!==`month`,onLevelClick:()=>Me(`year`),numberOfColumns:d,locale:me,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:ee,previousLabel:p?.previousMonth??h,previousIcon:F,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:z,__stopPropagation:_e,static:Ce,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:b,fullWidth:Te,...Fe}),je===`year`&&(0,U.jsx)(RD,{year:Re,numberOfColumns:d,minDate:R,maxDate:pe,monthsListFormat:L,getMonthControlProps:ae,locale:me,onNext:Ve,onPrevious:He,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>Me(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:ee,previousLabel:p?.previousYear??h,previousIcon:F,yearLabelFormat:oe,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Pe(t),Me(JD(`month`,i,r)),_?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe}),je===`decade`&&(0,U.jsx)(ID,{decade:Re,minDate:R,maxDate:pe,yearsListFormat:se,getYearControlProps:ce,locale:me,onNext:V,onPrevious:Ue,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:ee,previousLabel:p?.previousDecade??h,previousIcon:F,decadeLabelFormat:le,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Pe(t),Me(JD(`year`,i,r)),g?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe})]})});XD.classes={...ID.classes,...RD.classes,...BD.classes},XD.displayName=`@mantine/dates/Calendar`;function ZD(e){let{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,__setLevelRef:j,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:de,allowSingleDateInRange:fe,allowDeselect:R,minDate:pe,maxDate:me,locale:he,...ge}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:i,onLevelChange:a,nextIcon:o,previousIcon:s,date:c,defaultDate:l,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:p,nextLabel:m,previousLabel:h,onYearSelect:g,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:y,onNextMonth:b,onPreviousMonth:x,onNextYear:S,onPreviousYear:C,onNextDecade:w,onPreviousDecade:T,withCellSpacing:E,highlightToday:D,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:k,__setDateRef:A,withWeekNumbers:M,headerControlsOrder:N,firstDayOfWeek:P,weekdayFormat:ee,weekendDays:F,getDayProps:I,excludeDate:te,renderDay:ne,hideOutsideDates:re,hideWeekdays:ie,getDayAriaLabel:L,monthLabelFormat:ae,monthsListFormat:oe,getMonthControlProps:se,yearLabelFormat:ce,yearsListFormat:le,getYearControlProps:ue,decadeLabelFormat:de,allowSingleDateInRange:fe,allowDeselect:R,minDate:pe,maxDate:me,locale:he},others:ge}}function QD(e,t){let n=[...t].sort((e,t)=>(0,Q.default)(e).isAfter((0,Q.default)(t))?1:-1);return(0,Q.default)(n[0]).startOf(`day`).subtract(1,`ms`).isBefore(e)&&(0,Q.default)(n[1]).endOf(`day`).add(1,`ms`).isAfter(e)}function $D({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=GD({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,H.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,H.useState)(null),m=n=>{if(e===`range`){if(u&&!c[1]){if((0,Q.default)(n).isSame(u,t)&&!a){d(null),p(null),l([null,null]);return}let e=[n,u];e.sort((e,t)=>(0,Q.default)(e).isAfter((0,Q.default)(t))?1:-1),l(e),p(null),d(null);return}if(c[0]&&!c[1]&&(0,Q.default)(n).isSame(c[0],t)&&!a){d(null),p(null),l([null,null]);return}l([n,null]),p(null),d(n);return}if(e===`multiple`){c.some(e=>(0,Q.default)(e).isSame(n,t))?l(c.filter(e=>!(0,Q.default)(e).isSame(n,t))):l([...c,n]);return}c&&o&&(0,Q.default)(n).isSame(c,t)?l(null):l(n)},h=e=>u&&f?QD(e,[f,u]):c[0]&&c[1]?QD(e,c):!1,g=e===`range`?e=>{s?.(e),p(null)}:s,_=e=>c[0]&&(0,Q.default)(e).isSame(c[0],t)?!(f&&(0,Q.default)(f).isBefore(c[0])):!1,v=e=>c[1]?(0,Q.default)(e).isSame(c[1],t):!c[0]||!f?!1:(0,Q.default)(f).isBefore(c[0])&&(0,Q.default)(e).isSame(c[0],t),y=n=>{if(e===`range`)return{selected:c.some(e=>e&&(0,Q.default)(e).isSame(n,t)),inRange:h(n),firstInRange:_(n),lastInRange:v(n),"data-autofocus":!!c[0]&&(0,Q.default)(c[0]).isSame(n,t)||void 0};if(e===`multiple`)return{selected:c.some(e=>e&&(0,Q.default)(e).isSame(n,t)),"data-autofocus":!!c[0]&&(0,Q.default)(c[0]).isSame(n,t)||void 0};let r=(0,Q.default)(c).isSame(n,t);return{selected:r,"data-autofocus":r||void 0}},b=e===`range`&&u?p:()=>{};return(0,H.useEffect)(()=>{if(e===`range`)if(c[0]&&!c[1])d(c[0]);else{let e=c[0]==null&&c[1]==null,t=c[0]!=null&&c[1]!=null;(e||t)&&(d(null),p(null))}},[c]),{onDateChange:m,onRootMouseLeave:g,onHoveredDateChange:b,getControlProps:y,_value:c,setValue:l}}var eO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},tO=Sn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":st(t)}})),nO={type:`default`},rO=K(e=>{let t=W(`YearPicker`,nO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getYearControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onYearSelect:m,__updateDateOnYearSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,...w}=t,{calendarProps:T,others:E}=ZD(w),D=(0,H.useRef)(null),O=(0,H.useRef)(null),k=G({name:l||`YearPicker`,classes:eO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:tO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=$D({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Hr({classNames:n,styles:r,props:t}),I=(0,U.jsx)(XD,{classNames:ee,styles:F,size:S,...T,...v?{}:E,minLevel:`decade`,__updateDateOnYearSelect:h??!1,__staticSelector:l||`YearPicker`,onMouseLeave:j,onYearMouseEnter:(e,t)=>M(t),onYearSelect:e=>{A(e),m?.(e)},getYearControlProps:e=>({...N(e),...u?.(e)}),__setDateRef:D,__setLevelRef:O,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return I;let te=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(D.current?.(t),O.current?.(`decade`),g?g(t):P(e))},ne=v.map((e,t)=>(0,U.jsx)(ul,{...k(`presetButton`),onClick:()=>te(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,U.jsxs)(q,{...k(`yearPickerRoot`),size:S,...E,children:[(0,U.jsx)(`div`,{...k(`presetsList`),children:ne}),I]})});rO.classes={...XD.classes,...eO},rO.varsResolver=tO,rO.displayName=`@mantine/dates/YearPicker`;var iO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},aO=Sn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":st(t)}})),oO={type:`default`},sO=K(e=>{let t=W(`MonthPicker`,oO,e),{classNames:n,styles:r,vars:i,type:a,defaultValue:o,value:s,onChange:c,__staticSelector:l,getMonthControlProps:u,allowSingleDateInRange:d,allowDeselect:f,onMouseLeave:p,onMonthSelect:m,__updateDateOnMonthSelect:h,__onPresetSelect:g,__stopPropagation:_,presets:v,className:y,style:b,unstyled:x,size:S,attributes:C,onLevelChange:w,...T}=t,{calendarProps:E,others:D}=ZD(T),O=(0,H.useRef)(null),k=(0,H.useRef)(null),A=G({name:l||`MonthPicker`,classes:iO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:aO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=$D({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Hr({classNames:n,styles:r,props:t}),te=(0,U.jsx)(XD,{classNames:F,styles:I,size:S,...E,...v?{}:D,minLevel:`year`,__updateDateOnMonthSelect:h??!1,__staticSelector:l||`MonthPicker`,onMouseLeave:M,onMonthMouseEnter:(e,t)=>N(t),onMonthSelect:e=>{j(e),m?.(e)},getMonthControlProps:e=>({...P(e),...u?.(e)}),onLevelChange:w,__setDateRef:O,__setLevelRef:k,__stopPropagation:_,attributes:C,...v?{}:{className:y,style:b}});if(!v)return te;let ne=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(O.current?.(t),k.current?.(`year`),g?g(t):ee(e))},re=v.map((e,t)=>(0,U.jsx)(ul,{...A(`presetButton`),onClick:()=>ne(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,U.jsxs)(q,{...A(`monthPickerRoot`),size:S,...D,children:[(0,U.jsx)(`div`,{...A(`presetsList`),children:re}),te]})});sO.classes={...XD.classes,...iO},sO.varsResolver=aO,sO.displayName=`@mantine/dates/MonthPicker`;var cO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},lO=Sn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":st(t)}})),uO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},dO=K(e=>{let t=W(`DatePicker`,uO,e),{allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s,classNames:c,styles:l,__staticSelector:u,__onDayClick:d,__onDayMouseEnter:f,__onPresetSelect:p,__stopPropagation:m,presets:h,className:g,style:_,unstyled:v,size:y,vars:b,attributes:x,...S}=t,{calendarProps:C,others:w}=ZD(S),T=(0,H.useRef)(null),E=(0,H.useRef)(null),D=G({name:u||`DatePicker`,classes:cO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:lO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=$D({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Hr({classNames:c,styles:l,props:t}),F=(0,U.jsx)(XD,{classNames:P,styles:ee,__staticSelector:u||`DatePicker`,onMouseLeave:k,size:y,...C,...h?{}:w,__stopPropagation:m,__setDateRef:T,__setLevelRef:E,minLevel:C.minLevel||`month`,__onDayMouseEnter:(e,t)=>{A(t),f?.(e,t)},__onDayClick:(e,t)=>{O(t),d?.(e,t)},getDayProps:e=>({...j(e),...C.getDayProps?.(e)}),getMonthControlProps:e=>({selected:typeof M==`string`?ZE(e,M):!1,...C.getMonthControlProps?.(e)}),getYearControlProps:e=>({selected:typeof M==`string`?(0,Q.default)(e).isSame(M,`year`):!1,...C.getYearControlProps?.(e)}),hideOutsideDates:C.hideOutsideDates??C.numberOfColumns!==1,attributes:x,...h?{}:{className:g,style:_}});if(!h)return F;let I=e=>{let t=Array.isArray(e)?e[0]:e;t!==void 0&&(T.current?.(t),E.current?.(`month`),p?p(t):N(e))},te=h.map((e,t)=>(0,U.jsx)(ul,{...D(`presetButton`),onClick:()=>I(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":m||void 0,children:e.label},t));return(0,U.jsxs)(q,{...D(`datePickerRoot`),size:y,...w,children:[(0,U.jsx)(`div`,{...D(`presetsList`),children:te}),F]})});dO.classes=XD.classes,dO.varsResolver=lO,dO.displayName=`@mantine/dates/DatePicker`;function fO(e){if(e===null)return null;let t=new Date(e);return Number.isNaN(t.getTime())||!e?null:(0,Q.default)(t).format(`YYYY-MM-DD`)}function pO({date:e,maxDate:t,minDate:n}){return!(e==null||Number.isNaN(new Date(e).getTime())||t&&(0,Q.default)(e).isAfter(t,`date`)||n&&(0,Q.default)(e).isBefore(n,`date`))}var mO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},hO=K(e=>{let{inputProps:t,wrapperProps:n,value:r,defaultValue:i,onChange:a,clearable:o,clearSectionMode:s,clearButtonProps:c,popoverProps:l,getDayProps:u,locale:d,valueFormat:f,withTime:p,dateParser:m,minDate:h,maxDate:g,fixOnBlur:_,onFocus:v,onBlur:y,onClick:b,onKeyDown:x,readOnly:S,name:C,form:w,rightSection:T,unstyled:E,classNames:D,styles:O,allowDeselect:k,date:A,defaultDate:j,onDateChange:M,getMonthControlProps:N,getYearControlProps:P,disabled:ee,...F}=bf(`DateInput`,mO,e),I=(0,H.useRef)(null),te=(0,H.useRef)(null),[ne,re]=(0,H.useState)(!1),{calendarProps:ie,others:L}=ZD(F),ae=RE(),oe=m||(e=>{let t=(0,Q.default)(e,f,ae.getLocale(d)).toDate();return Number.isNaN(t.getTime())?fO(e):(0,Q.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),se=k===void 0?o:k,ce=e=>e?(0,Q.default)(e).locale(ae.getLocale(d)).format(f):``,[le,ue,de]=GD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[fe,R]=GD({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,H.useEffect)(()=>{de&&r!==null&&R(r)},[de,r]);let[pe,me]=(0,H.useState)(ce(le));(0,H.useEffect)(()=>{me(ce(le))},[ae.getLocale(d)]);let he=e=>{let t=e.currentTarget.value;if(me(t),re(!0),t.trim()===``&&(k||o))ue(null);else{let e=oe(t);e&&pO({date:e,minDate:h,maxDate:g})&&(ue(e),R(e))}},ge=e=>{y?.(e),re(!1),_&&me(ce(le))},z=e=>{v?.(e),re(!0)},_e=e=>{b?.(e),re(!0)},ve=e=>{e.key===`Escape`&&re(!1),x?.(e)},B=e=>({...u?.(e),selected:(0,Q.default)(le).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=se&&(0,Q.default)(le).isSame(e,`day`)?null:e;ue(n),!de&&n&&me(ce(n)),re(!1)}}),ye=(0,U.jsx)(yf.ClearButton,{onClick:()=>{ue(null),!de&&me(``),re(!1)},unstyled:E,...c}),be=o&&!!le&&!S&&!ee;return Tt(()=>{le!==void 0&&!ne&&me(ce(le))},[le]),xt(()=>re(!1),void 0,[I.current,te.current]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(yf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,U.jsxs)($l,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,U.jsx)($l.Target,{children:(0,U.jsx)(yf,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:pe,onChange:he,onBlur:ge,onFocus:z,onClick:_e,onKeyDown:ve,readOnly:S,rightSection:T,__clearSection:ye,__clearable:be,__clearSectionMode:s,...t,...L,disabled:ee,__staticSelector:`DateInput`})}),(0,U.jsx)($l.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,U.jsx)(XD,{__staticSelector:`DateInput`,...ie,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:B,size:t.size,date:fe,onDateChange:R,getMonthControlProps:e=>({selected:typeof le==`string`?ZE(e,le):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof le==`string`?(0,Q.default)(e).isSame(le,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,U.jsx)(BE,{name:C,form:w,value:le,type:`default`,withTime:p})]})});hO.classes={...yf.classes,...XD.classes},hO.displayName=`@mantine/dates/DateInput`;function gO({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=RE(),[d,f]=nn(!1),[p,m]=GD({type:e,value:t,defaultValue:n,onChange:r}),h=OE({type:e,date:p,locale:u.getLocale(i),format:a,labelSeparator:u.getLabelSeparator(c),formatter:l}),g=t=>{o&&(e===`default`&&f.close(),e===`range`&&t[0]&&t[1]&&f.close()),m(s&&e===`multiple`?[...t].sort((e,t)=>(0,Q.default)(e).isAfter((0,Q.default)(t))?1:-1):t)};return{_value:p,setValue:g,onClear:()=>g(e===`range`?[null,null]:e===`multiple`?[]:null),shouldClear:e===`range`?!!p[0]:e===`multiple`?p.length>0:p!==null,formattedValue:h,dropdownOpened:d,dropdownHandlers:f}}var _O={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},vO=K(e=>{let t=W(`YearPickerInput`,_O,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,type:n,__staticSelector:`YearPickerInput`,attributes:S,children:(0,U.jsx)(rO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`YearPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});vO.classes={...HD.classes,...rO.classes},vO.displayName=`@mantine/dates/YearPickerInput`;var yO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},bO=K(e=>{let t=W(`MonthPickerInput`,yO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=ZD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(HD,{formattedValue:A,dropdownOpened:M,dropdownHandlers:j,classNames:w,styles:T,unstyled:d,onClear:N,shouldClear:P,value:O,size:p,variant:m,dropdownType:h,...D,attributes:S,type:n,__staticSelector:`MonthPickerInput`,children:(0,U.jsx)(sO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||IE({maxDate:v,minDate:_}):O||IE({maxDate:v,minDate:_})),onChange:k,locale:c,classNames:w,styles:T,unstyled:d,__staticSelector:`MonthPickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:x,attributes:S})})});bO.classes={...HD.classes,...sO.classes},bO.displayName=`@mantine/dates/MonthPickerInput`;var xO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},SO=K(e=>{let t=W(`DatePickerInput`,xO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,defaultDate:b,valueFormatter:x,presets:S,attributes:C,...w}=t,{resolvedClassNames:T,resolvedStyles:E}=Hr({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=ZD(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=gO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:x}),F=Array.isArray(k)?k[0]||b:k||b;return(0,U.jsx)(HD,{formattedValue:j,dropdownOpened:N,dropdownHandlers:M,classNames:T,styles:E,unstyled:d,onClear:P,shouldClear:ee,value:k,size:p,variant:m,dropdownType:h,...O,type:n,__staticSelector:`DatePickerInput`,attributes:C,children:(0,U.jsx)(dO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||IE({maxDate:v,minDate:_}),onChange:A,locale:c,classNames:T,styles:E,unstyled:d,__staticSelector:`DatePickerInput`,__stopPropagation:h===`popover`,minDate:_,maxDate:v,presets:S,attributes:C})})});SO.classes={...HD.classes,...dO.classes},SO.displayName=`@mantine/dates/DatePickerInput`;var CO=`DD/MM/YYYY`,wO=hO.extend({defaultProps:{placeholder:CO,valueFormat:CO}});function TO({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M18 9.00005L12 15L6 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var EO=Vf.extend({classNames:{item:`_item_wy8vo_1`,control:`_control_wy8vo_10`,chevron:`_chevron_wy8vo_20`,label:`_label_wy8vo_21`,content:`_content_wy8vo_43`},defaultProps:{chevron:(0,U.jsx)(TO,{}),variant:`separated`}}),DO=hu.extend({classNames:{root:`_root_8921i_1`},defaultProps:{size:`md`,variant:`primary`}}),OO=Wf.extend({classNames:{root:`_root_nrydo_1`,icon:`_icon_nrydo_10`,title:`_title_nrydo_38`,message:`_message_nrydo_42`},styles:{root:{overflow:`initial`},message:{overflow:`initial`}}}),kO=Qf.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),AO=vm.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),jO=xm.extend({classNames:{root:`_root_c4e34_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),MO=Am.extend({classNames:{root:`_root_d2yo7_1`,section:`_section_d2yo7_204`},defaultProps:{size:`md`,variant:`primary`}}),[NO,PO]=qe(`Carousel component was not found in tree`),FO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},IO=K(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=W(`CarouselSlide`,null,e),c=PO();return(0,U.jsx)(q,{mod:[{orientation:c.orientation},o],role:`group`,"aria-roledescription":`slide`,"aria-label":`Carousel slide`,...c.getStyles(`slide`,{className:n,style:r,classNames:t,styles:i}),...s})});IO.classes=FO,IO.displayName=`@mantine/carousel/CarouselSlide`;function LO({slideGap:e,slideSize:t,selector:n}){let r=Cr(),i=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":V(pt(t))}),a=Fe(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,U.jsx)(ai,{styles:i,media:ft(Fe(a),r.breakpoints).filter(e=>Fe(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function RO(e){return typeof e==`object`&&e?Fe(e):[]}function zO(e){return e.sort((e,t)=>Be(e)-Be(t))}function BO({slideGap:e,slideSize:t}){return zO(Array.from(new Set([...RO(e),...RO(t)])))}function VO({slideGap:e,slideSize:t,selector:n}){let r=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":V(pt(t))}),i=BO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,U.jsx)(ai,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function HO({dir:e,orientation:t,direction:n}){return n===`previous`?t===`horizontal`?90*(e===`ltr`?1:-1):-180:t===`horizontal`?90*(e===`ltr`?-1:1):0}function UO(e){return Object.prototype.toString.call(e)===`[object Object]`}function WO(e){return UO(e)||Array.isArray(e)}function GO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function KO(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||JSON.stringify(Object.keys(e.breakpoints||{}))!==JSON.stringify(Object.keys(t.breakpoints||{}))?!1:n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:!WO(r)||!WO(i)?r===i:KO(r,i)})}function qO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function JO(e,t){if(e.length!==t.length)return!1;let n=qO(e),r=qO(t);return n.every((e,t)=>{let n=r[t];return KO(e,n)})}function YO(e){return typeof e==`number`}function XO(e){return typeof e==`string`}function ZO(e){return typeof e==`boolean`}function QO(e){return Object.prototype.toString.call(e)===`[object Object]`}function $O(e){return Math.abs(e)}function ek(e){return Math.sign(e)}function tk(e,t){return $O(e-t)}function nk(e,t){return e===0||t===0||$O(e)<=$O(t)?0:$O(tk($O(e),$O(t))/e)}function rk(e){return Math.round(e*100)/100}function ik(e){return lk(e).map(Number)}function ak(e){return e[ok(e)]}function ok(e){return Math.max(0,e.length-1)}function sk(e,t){return t===ok(e)}function ck(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function lk(e){return Object.keys(e)}function uk(e,t){return[e,t].reduce((e,t)=>(lk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=QO(r)&&QO(i)?uk(r,i):i}),e),{})}function dk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function fk(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return XO(e)?n[e](r):e(t,r,i)}return{measure:o}}function pk(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function mk(e,t,n,r){let i=pk(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function hk(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function gk(e=0,t=0){let n=$O(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function _k(e,t,n){let{constrain:r}=gk(0,e),i=e+1,a=o(t);function o(e){return n?$O((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return _k(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function vk(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let{cross:y,direction:b}=e,x=[`INPUT`,`SELECT`,`TEXTAREA`],S={passive:!1},C=pk(),w=pk(),T=gk(50,225).constrain(p.measure(20)),E={mouse:300,touch:400},D={mouse:500,touch:600},O=m?43:25,k=!1,A=0,j=0,M=!1,N=!1,P=!1,ee=!1;function F(e){if(!v)return;function n(t){(ZO(v)||v(e,t))&&L(t)}let r=t;C.add(r,`dragstart`,e=>e.preventDefault(),S).add(r,`touchmove`,()=>void 0,S).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,oe).add(r,`contextmenu`,oe).add(r,`click`,se,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,ae,S).add(e,`touchend`,oe).add(e,`mousemove`,ae,S).add(e,`mouseup`,oe)}function ne(e){let t=e.nodeName||``;return x.includes(t)}function re(){return(m?D:E)[ee?`mouse`:`touch`]}function ie(e,t){let n=d.add(ek(e)*-1),r=u.byDistance(e,!m).distance;return m||$O(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=dk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=tk(i.get(),o.get())>=2,!(t&&e.button!==0)&&(ne(e.target)||(M=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),te(),A=a.readPoint(e),j=a.readPoint(e,y),f.emit(`pointerDown`)))}function ae(e){if(!dk(e,r)&&e.touches.length>=2)return oe(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=tk(t,A),c=tk(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return oe(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function oe(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=ie(b(n),t),i=nk(n,r),o=O-10*i,s=_+i/50;N=!1,M=!1,w.clear(),l.useDuration(o).useFriction(s),c.distance(r,!m),ee=!1,f.emit(`pointerUp`)}function se(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function ce(){return M}return{init:F,destroy:I,pointerDown:ce}}function yk(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(dk(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&$O(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function bk(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function xk(e){function t(t){return t/100*e}return{measure:t}}function Sk(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function p(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if($O(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(ZO(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function m(){d=!0,c&&c.disconnect()}return{init:p,destroy:m}}function Ck(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=ek(a),d=u,x}function p(){return $O(r.get()-t.get())<.001}function m(){return c}function h(){return s}function g(){return o}function _(){return y(i)}function v(){return b(a)}function y(e){return c=e,x}function b(e){return l=e,x}let x={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:v,useBaseDuration:_,useFriction:b,useDuration:y};return x}function wk(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=gk(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=$O(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&$O(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function Tk(e,t,n,r,i){let a=gk(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return tk(e,t)<=1}function u(){let e=o[0],t=ak(o);return gk(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=sk(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function Ek(e,t,n){let r=t[0];return{limit:gk(n?r-e:ak(t),r)}}function Dk(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=gk(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1?a(n.get()):!1}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function Ok(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function kk(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>ak(e)[o]-e[0][a]).map($O)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-$O(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Ak(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=sk(n,t);return r?ck(ak(n[0])+1):i?ck(ok(a)-ak(n)[0]+1,ak(n)[0]):e})}return{slideRegistry:l}}function jk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>$O(e)-$O(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>$O(e.diff)-$O(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>ek(e)===r);return a.length?c(a):ak(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function Mk(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function Nk(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function f(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));YO(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,d,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(ZO(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Pk(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return YO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Fk(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=rk(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function Ik(e,t,n,r,i,a,o,s,c){let l=.5,u=ik(i),d=ik(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:Pk(-1),translate:Fk(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){return g(m(u,t-o[0]-1),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function b(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function x(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:x,loop:b,loopPoints:f}}function Lk(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(ZO(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Rk(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return lk(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function zk(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=h(),f=n.map(o),p=g();function m(){if(!l)return 0;let e=n[0];return $O(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ak(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=sk(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map($O)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Bk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=YO(n);function p(e,t){return ik(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ik(e).reduce((n,f,p)=>{let m=ak(n)||0,h=m===0,g=f===ok(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=$O(v-(!r&&g?d(s):0)-(_+y));return p&&b>t+c&&n.push(f),g&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function h(e){return f?p(e,n):m(e)}return{groupSlides:h}}function Vk(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:b,watchDrag:x,watchFocus:S}=a,C=bk(),w=C.measure(t),T=n.map(C.measure),E=hk(c,l),D=E.measureSize(w),O=xk(D),k=fk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=zk(E,w,T,n,d||!!v,i),ee=Bk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=kk(E,k,w,T,ee),te=-ak(F)+ak(M),{snapsContained:ne,scrollContainLimit:re}=Tk(D,te,I,v,2),ie=A?ne:I,{limit:L}=Ek(te,ie,d),ae=_k(ok(ie),u,d),oe=ae.clone(),se=ik(n),ce=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},le=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ue=mk(r,i,()=>ce(Se),e=>le(Se,e)),de=.68,fe=ie[ae.get()],R=Pk(fe),pe=Pk(fe),me=Pk(fe),he=Pk(fe),ge=Ck(R,me,pe,he,f,de),z=jk(d,ie,te,L,he),_e=Mk(ue,ae,oe,ge,z,he,o),ve=Ok(L),B=pk(),ye=Rk(t,n,o,h),{slideRegistry:be}=Ak(A,v,ie,re,ee,se),xe=Nk(e,n,be,_e,ge,B,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:ue,axis:E,dragHandler:vk(E,e,r,i,he,yk(E,i),R,ue,_e,ge,z,ae,o,O,p,m,_,de,x),eventStore:B,percentOfView:O,index:ae,indexPrevious:oe,limit:L,location:R,offsetLocation:me,previousLocation:pe,options:a,resizeHandler:Sk(t,o,i,n,E,y,C),scrollBody:ge,scrollBounds:wk(L,me,he,ge,O),scrollLooper:Dk(te,L,me,[R,me,pe,he]),scrollProgress:ve,scrollSnapList:ie.map(ve.get),scrollSnaps:ie,scrollTarget:z,scrollTo:_e,slideLooper:Ik(E,D,te,j,M,F,ie,me,n),slideFocus:xe,slidesHandler:Lk(t,o,b),slidesInView:ye,slideIndexes:se,slideRegistry:be,slidesToScroll:ee,target:he,translate:Fk(E,t)};return Se}function Hk(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var Uk={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Wk(e){function t(e,t){return uk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,lk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>lk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Gk(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function Kk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Wk(i),o=Gk(a),s=pk(),c=Hk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Uk,Kk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(XO(t)?e.querySelector(t):t)||e.children[0];let r=XO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Vk(e,S,C,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?T(Object.assign({},t,{loop:!1})):n}function E(e,t){g||(v=l(v,e),y=u(v),b=t||b,w(),_=T(y),d([v,...b.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,D)),y.active&&(_.translate.to(_.location.get()),_.animation.init(),_.slidesInView.init(),_.slideFocus.init(ce),_.eventHandler.init(ce),_.resizeHandler.init(ce),_.slidesHandler.init(ce),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(ce),x=o.init(ce,b)))}function D(e,t){let n=I();O(),E(l({startIndex:n},e),t),c.emit(`reInit`)}function O(){_.dragHandler.destroy(),_.eventStore.clear(),_.translate.clear(),_.slideLooper.clear(),_.resizeHandler.destroy(),_.slidesHandler.destroy(),_.slidesInView.destroy(),_.animation.destroy(),o.destroy(),s.clear()}function k(){g||(g=!0,s.clear(),O(),c.emit(`destroy`),c.clear())}function A(e,t,n){!y.active||g||(_.scrollBody.useBaseFriction().useDuration(t===!0?0:y.duration),_.scrollTo.index(e,n||0))}function j(e){A(_.index.add(1).get(),e,-1)}function M(e){A(_.index.add(-1).get(),e,1)}function N(){return _.index.add(1).get()!==I()}function P(){return _.index.add(-1).get()!==I()}function ee(){return _.scrollSnapList}function F(){return _.scrollProgress.get(_.offsetLocation.get())}function I(){return _.index.get()}function te(){return _.indexPrevious.get()}function ne(){return _.slidesInView.get()}function re(){return _.slidesInView.get(!1)}function ie(){return x}function L(){return _}function ae(){return e}function oe(){return S}function se(){return C}let ce={canScrollNext:N,canScrollPrev:P,containerNode:oe,internalEngine:L,destroy:k,off:p,on:f,emit:m,plugins:ie,previousScrollSnap:te,reInit:h,rootNode:ae,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:se,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),ce}Kk.globalOptions=void 0;function qk(e={},t=[]){let n=(0,H.useRef)(e),r=(0,H.useRef)(t),[i,a]=(0,H.useState)(),[o,s]=(0,H.useState)(),c=(0,H.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,H.useEffect)(()=>{KO(n.current,e)||(n.current=e,c())},[e,c]),(0,H.useEffect)(()=>{JO(r.current,t)||(r.current=t,c())},[t,c]),(0,H.useEffect)(()=>{if(GO()&&o){Kk.globalOptions=qk.globalOptions;let e=Kk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}qk.globalOptions=void 0;var Jk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Yk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Xk=Sn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":V(t),"--carousel-control-size":V(n),"--carousel-controls-offset":at(r)}})),Zk=K(e=>{let t=W(`Carousel`,Jk,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,getEmblaApi:l,onNextSlide:u,onPreviousSlide:d,onSlideChange:f,nextControlProps:p,previousControlProps:m,controlSize:h,controlsOffset:g,slideSize:_,slideGap:v,orientation:y,height:b,includeGapInSize:x,draggable:S,initialSlide:C,withControls:w,withIndicators:T,plugins:E,nextControlIcon:D,previousControlIcon:O,withKeyboardEvents:k,mod:A,type:j,emblaOptions:M,attributes:N,getIndicatorProps:P,id:ee,...F}=t,I=G({name:`Carousel`,classes:FO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Xk}),te=Lt(ee),ne=ji(),{dir:re}=Gi(),[ie,L]=qk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Yk,...M},E),[ae,oe]=(0,H.useState)(0),[se,ce]=(0,H.useState)(0),le=(0,H.useCallback)(e=>L&&L.scrollTo(e),[L]),ue=(0,H.useCallback)(()=>{if(!L)return;let e=L.selectedScrollSnap();oe(e),e!==ae&&f?.(e)},[L,oe,f,ae]),de=(0,H.useCallback)(()=>{L?.scrollPrev(),d?.()},[L]),fe=(0,H.useCallback)(()=>{L?.scrollNext(),u?.()},[L]),R=(0,H.useCallback)(e=>{k&&(e.key===`ArrowRight`&&(e.preventDefault(),fe()),e.key===`ArrowLeft`&&(e.preventDefault(),de()),e.key===`Home`&&(e.preventDefault(),L?.scrollTo(0)),e.key===`End`&&(e.preventDefault(),L?.scrollTo(L.scrollSnapList().length-1)))},[L,fe,de]);(0,H.useEffect)(()=>{if(L)return l?.(L),ue(),ce(L.scrollSnapList().length),L.on(`select`,ue),()=>{L.off(`select`,ue)}},[L,M?.slidesToScroll,ue]),(0,H.useEffect)(()=>{L&&(L.reInit(),ce(L.scrollSnapList().length),oe(e=>ht(e,0,H.Children.toArray(c).length-1)))},[H.Children.toArray(c).length,M?.slidesToScroll]);let pe=L?.canScrollPrev()||!1,me=L?.canScrollNext()||!1,he=(0,H.useCallback)((e,t)=>{let n=y===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,i=n?`ArrowLeft`:`ArrowUp`;if(e.key===r){e.preventDefault();let n=t<se-1?t+1:0;le(n),(e.currentTarget.parentElement?.children[n])?.focus()}if(e.key===i){e.preventDefault();let n=t>0?t-1:se-1;le(n),(e.currentTarget.parentElement?.children[n])?.focus()}e.key===`Home`&&(e.preventDefault(),le(0),(e.currentTarget.parentElement?.children[0])?.focus()),e.key===`End`&&(e.preventDefault(),le(se-1),(e.currentTarget.parentElement?.children[se-1])?.focus())},[y,se,le]),ge=Array(se).fill(0).map((e,t)=>(0,H.createElement)(ul,{...I(`indicator`),key:t,role:`tab`,"aria-label":`Go to slide ${t+1}`,"aria-selected":t===ae,tabIndex:t===ae?0:-1,"data-active":t===ae||void 0,onClick:()=>le(t),onKeyDown:e=>he(e,t),"data-orientation":y,onMouseDown:e=>e.preventDefault(),...P?.(t)}));return(0,U.jsxs)(NO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,U.jsx)(VO,{...t,selector:`.${ne}`}):(0,U.jsx)(LO,{...t,selector:`.${ne}`}),(0,U.jsxs)(q,{role:`region`,"aria-roledescription":`carousel`,...I(`root`,{className:ne}),...F,id:te,mod:[{orientation:y,"include-gap-in-size":x},A],onKeyDownCapture:R,children:[(0,U.jsx)(fl,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:se>0&&`Slide ${ae+1} of ${se}`}),w&&(0,U.jsxs)(`div`,{...I(`controls`),"data-orientation":y,children:[(0,U.jsx)(ul,{"aria-controls":te,"aria-label":`Previous slide`,"aria-disabled":!pe,"data-inactive":!pe||void 0,"data-type":`previous`,tabIndex:pe?0:-1,...m,...I(`control`,{className:m?.className,style:m?.style}),onClick:e=>{de(),m?.onClick?.(e)},children:O===void 0?(0,U.jsx)(Nf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,U.jsx)(ul,{"aria-controls":te,"aria-label":`Next slide`,"aria-disabled":!me,"data-inactive":!me||void 0,"data-type":`next`,tabIndex:me?0:-1,...I(`control`,{className:p?.className,style:p?.style}),...p,onClick:e=>{fe(),p?.onClick?.(e)},children:D===void 0?(0,U.jsx)(Nf,{style:{transform:`rotate(${HO({dir:re,orientation:y,direction:`next`})}deg)`}}):D})]}),(0,U.jsx)(`div`,{...I(`viewport`),ref:ie,"data-type":j,children:(0,U.jsx)(`div`,{...I(`container`,{className:ne}),"data-orientation":y,children:c})}),T&&(0,U.jsx)(`div`,{...I(`indicators`),role:`tablist`,"aria-label":`Slides`,"data-orientation":y,children:ge})]})]})});Zk.classes=FO,Zk.varsResolver=Xk,Zk.displayName=`@mantine/carousel/Carousel`,Zk.Slide=IO;function Qk({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function $k({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M9.00005 6L15 12L9 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var eA={"space-0":`0`,"space-025":`1px`,"space-050":`2px`,"space-100":`4px`,"space-150":`6px`,"space-200":`8px`,"space-300":`12px`,"space-400":`16px`,"space-500":`20px`,"space-600":`24px`,"space-700":`32px`,"space-800":`40px`,"space-900":`48px`},tA=Zk.extend({classNames:{root:`_root_nuq5f_1`,control:`_control_nuq5f_1`,indicators:`_indicators_nuq5f_10`,indicator:`_indicator_nuq5f_10`,slide:`_slide_nuq5f_26`,controls:`_controls_nuq5f_34`},defaultProps:{controlSize:32,nextControlIcon:(0,U.jsx)($k,{height:16,width:16}),previousControlIcon:(0,U.jsx)(Qk,{height:16,width:16}),slideGap:V(eA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),nA={root:`_root_1edmf_1`,input:`_input_1edmf_8`,label:`_label_1edmf_26`,icon:`_icon_1edmf_47`,inner:`_inner_1edmf_54`,error:`_error_1edmf_58`};function rA({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function iA({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M2.5 4L7.5 4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var aA=em.extend({classNames:nA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,U.jsx)(iA,{...t}):(0,U.jsx)(rA,{...t})}}),oA=zm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),sA={XS:352,SM:584,MD:800,LG:1160,XL:1160},cA=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:V(n)}),{}),lA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},uA=Um.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:wn({[lA.fluidContainer]:n,[lA.miniContainer]:t===`mini`,[lA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in cA?cA[t]:V(t)}})}),dA={placeholder:CO,getYearControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`month`)&&{"current-month":!0}}})},fA={day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},pA=dO.extend({classNames:fA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,Q.default)(e),n=(0,Q.default)().isSame(t,`day`);return(0,U.jsx)(Yf,{span:!0,className:wn({[fA.dayToday]:n}),children:t.format(`D`)})},...dA}}),mA=SO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA,valueFormat:CO}}),hA=qm.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),gA={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},_A=ph.extend({classNames:{root:`_root_dlog2_1`,title:`_title_dlog2_9`,content:`_content_dlog2_17`,header:`_header_dlog2_30`,body:`_body_dlog2_38`,close:`_close_dlog2_48`},defaultProps:{size:`md`,position:`right`,overlayProps:{backgroundOpacity:gA.xl,blur:6}}}),vA=Dh.extend({defaultProps:{columnGap:24,rowGap:16}}),yA=Tu.extend({defaultProps:{gap:0,align:`flex-start`}}),bA={wrapper:`_wrapper_4biwb_1`,input:`_input_4biwb_9`,section:`_section_4biwb_42`},xA={placeholder:`_placeholder_1o876_1`},SA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},CA=yf.extend({classNames:bA}),wA=yf.Wrapper.extend({classNames:SA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),TA=yf.Placeholder.extend({classNames:xA}),EA=su.extend({defaultProps:{size:`xs`}}),DA=$h.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),OA=hg.extend({classNames:{root:`_root_ax69a_1`,header:`_header_ax69a_8`,title:`_title_ax69a_12`,content:`_content_ax69a_19`,body:`_body_ax69a_29`,close:`_close_ax69a_35`},defaultProps:{size:`md`,yOffset:`5vh`,transitionProps:{duration:300,transition:`fade-down`},closeButtonProps:{size:24},overlayProps:{backgroundOpacity:gA.xl,blur:6},scrollAreaComponent:ol.Autosize}}),kA=sO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),AA=bO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...dA}}),jA=Ng.extend({classNames:{input:`_input_z7ary_1`,section:`_section_z7ary_6`,inputField:`_inputField_z7ary_28`,dropdown:`_dropdown_z7ary_41`,option:`_option_z7ary_47`,pillsList:`_pillsList_z7ary_60`,pill:`_pill_z7ary_60`},defaultProps:{renderOption:({checked:e,option:t})=>(0,U.jsxs)(Tu,{gap:8,children:[(0,U.jsx)(em,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,U.jsx)(Yf,{span:!0,children:t.label})]}),searchable:!0}}),MA=Ig.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),NA=Bg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),PA=Z_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),FA=bv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:$k,previousIcon:Qk,size:`lg`}}),IA=hl.extend({defaultProps:{shadow:`none`}});function LA({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M22 8C22 8 18 14 12 14C6 14 2 8 2 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,U.jsx)(`path`,{d:`M15 13.5L16.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M20 11L22 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M2 13L4 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,U.jsx)(`path`,{d:`M9 13.5L7.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function RA({...e}){return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,U.jsx)(`path`,{d:`M21.544 11.045C21.848 11.4713 22 11.6845 22 12C22 12.3155 21.848 12.5287 21.544 12.955C20.1779 14.8706 16.6892 19 12 19C7.31078 19 3.8221 14.8706 2.45604 12.955C2.15201 12.5287 2 12.3155 2 12C2 11.6845 2.15201 11.4713 2.45604 11.045C3.8221 9.12944 7.31078 5 12 5C16.6892 5 20.1779 9.12944 21.544 11.045Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,U.jsx)(`path`,{d:`M15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15C13.6569 15 15 13.6569 15 12Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}var zA=Tv.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,U.jsx)(LA,{}):(0,U.jsx)(RA,{})}}),BA=Cg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),VA=$l.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),HA=Pv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),UA=Xv.extend({classNames:{root:`_root_1njtj_1`,radio:`_radio_1njtj_9`,label:`_label_1njtj_22`,icon:`_icon_1njtj_40`,error:`_error_1njtj_58`,inner:`_inner_1njtj_62`}}),WA=Xv.Card.extend({classNames:{card:`_card_11cie_1`}}),GA=Xv.Indicator.extend({classNames:{indicator:`_indicator_yh8fo_1`,icon:`_icon_yh8fo_17`}}),KA=Sy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function qA({...e}){return(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var JA=({checked:e,option:t})=>(0,U.jsxs)(Tu,{gap:8,children:[e&&(0,U.jsx)(qA,{width:16,height:16}),(0,U.jsx)(Yf,{span:!0,children:t.label})]}),YA=wy.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:JA}}),XA=By.extend({defaultProps:{gap:0}}),ZA=Xy.extend({classNames:{root:`_root_bk7hc_1`,stepIcon:`_stepIcon_bk7hc_6`,separator:`_separator_bk7hc_22`,step:`_step_bk7hc_6`,stepLabel:`_stepLabel_bk7hc_29`},defaultProps:{allowNextStepsSelect:!1,iconSize:30}}),QA=rb.extend({classNames:{root:`_root_1xr8m_1`,track:`_track_1xr8m_6`,input:`_input_1xr8m_10`,thumb:`_thumb_1xr8m_22`,label:`_label_1xr8m_29`},defaultProps:{withThumbIndicator:!1}}),$A=Sb.extend({classNames:{table:`_table_1nke6_1`,thead:`_thead_1nke6_8`,th:`_th_1nke6_8`,tbody:`_tbody_1nke6_41`,td:`_td_1nke6_44`},defaultProps:{withTableBorder:!0}}),ej=Mb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),tj=Lb.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),nj=Yf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),rj=Ih.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),ij=Jb.extend({classNames:{root:`_root_6pd11_1`}}),aj=uy.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),oj=rO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),sj=vO.extend({classNames:{day:`_day_u2w4x_1`,dayToday:`_dayToday_u2w4x_30`,month:`_month_u2w4x_35`,calendarHeaderLevel:`_calendarHeaderLevel_u2w4x_40`,calendarHeaderControl:`_calendarHeaderControl_u2w4x_45`,weekday:`_weekday_u2w4x_49`,yearsListControl:`_yearsListControl_u2w4x_54`},defaultProps:{...dA}}),cj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],lj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],uj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],dj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],fj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],pj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],mj={xs:V(10),sm:V(12),md:V(14),lg:V(16),xl:V(20)},hj={xs:V(12),sm:V(16),md:V(20),lg:V(24),xl:V(28)},gj={fontWeight:`500`,sizes:{h1:{fontSize:V(32),lineHeight:V(36)},h2:{fontSize:V(24),lineHeight:V(28)},h3:{fontSize:V(20),lineHeight:V(24)},h4:{fontSize:V(18),lineHeight:V(20)},h5:{fontSize:V(12),lineHeight:V(16)},h6:{fontSize:V(12),lineHeight:V(16)}}},_j=Object.entries(sA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:Ue(n)}),{});function vj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(vj(a)&&vj(i)?n[r]=yj(a,i):n[r]=i)}return n}var bj={"brand-dark-blue":cj,"brand-orange":lj,accent:lj,blue:uj,orange:dj,red:fj,green:pj},xj={Accordion:EO,ActionIcon:DO,Alert:OO,Anchor:kO,Avatar:AO,Badge:jO,Button:MO,Carousel:tA,Checkbox:aA,ColorSwatch:oA,Container:uA,DateInput:wO,DatePicker:pA,DatePickerInput:mA,Divider:hA,Drawer:_A,Grid:vA,Group:yA,Input:CA,InputPlaceholder:TA,InputWrapper:wA,Loader:EA,Menu:DA,Modal:OA,MonthPicker:kA,MonthPickerInput:AA,MultiSelect:jA,NavLink:MA,Notification:NA,NumberInput:PA,Paper:IA,Pagination:FA,PasswordInput:zA,Pill:BA,Popover:VA,Progress:HA,Radio:UA,RadioCard:WA,RadioIndicator:GA,SegmentedControl:KA,Select:YA,Stack:XA,Stepper:ZA,Switch:QA,Table:$A,Tabs:ej,TagsInput:tj,Text:nj,Textarea:rj,Title:ij,Tooltip:aj,YearPicker:oj,YearPickerInput:sj};function Sj(e={}){let t={...mj,...e.fontSizes},n={...hj,...e.lineHeights},r=yj(gj,e.headings??{}),i={..._j,...e.breakpoints},a={...bj,...e.colors};return Br({components:xj,cursorType:e.cursorType??`pointer`,defaultRadius:`sm`,primaryColor:e.primaryColor??`brand-dark-blue`,primaryShade:e.primaryShade??6,breakpoints:i,fontFamily:e.fontFamily??`Geist`,fontSizes:t,fontWeights:{medium:`500`},lineHeights:n,headings:r,black:e.black??`#000000`,white:e.white??`#FFFFFF`,colors:a})}Sj();var Cj={"border-025":`1px`,"border-050":`2px`},wj={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Tj={"primary-lighter":`#F8F8FB`,"primary-light":`#EFEFF6`,"primary-default":`#414275`,"primary-dark":`#35355F`,"primary-darker":`#18182B`},Ej={"secondary-lighter":`#FFF7F0`,"secondary-light":`#FFA34D`,"secondary-default":`#FF7A00`,"secondary-dark":`#A85100`,"secondary-darker":`#7A3B00`},Dj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},Oj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},kj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},Aj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},jj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Mj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Nj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Pj={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Fj={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Ij={"radius-0":`0`,"radius-050":`2px`,"radius-100":`4px`,"radius-150":`6px`,"radius-200":`8px`,"radius-300":`12px`,"radius-400":`16px`,"radius-500":`20px`,"radius-600":`24px`,"radius-full":`50%`},Lj={"shadow-xs":`0 1px 2px 0 rgba(0, 0, 0, 0.16)`,"shadow-above-sm":`0 3px 0 0 rgba(0, 0, 0, 0.04)`,"shadow-below-sm":`0 -2px 2px 0 rgba(65, 66, 117, 0.12)`},Rj={...wj,...Tj,...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj},zj=gA;function Bj(e={}){let{tokens:t={},theme:n={}}=e;return Vr(Sj(n),Br({other:{border:{...Cj,...t.border},color:{...Rj,...t.color},iconSize:{...Fj,...t.iconSize},opacity:{...zj,...t.opacity},radius:{...Ij,...t.radius},space:{...eA,...t.space},shadow:{...Lj,...t.shadow}}}))}Bj();function Vj(){return Cr()}var Hj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Uj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Wj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},Gj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},Kj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},qj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Jj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Yj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Xj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},Zj={...Wj,...Gj,...Kj,...qj,...Jj,...Yj,...Xj},Qj={"icon-xs":Fj[`icon-xs`],"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},$j={"radius-150":Ij[`radius-150`],"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},eM={"space-150":eA[`space-150`],"space-200":eA[`space-200`],"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`]},tM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(12),md:V(14),lg:V(16)}},brand:{darkBlue:Hj,orange:Uj},tokens:{color:Zj,radius:$j,space:eM,iconSize:Qj}},nM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],rM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],iM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},aM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},oM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},sM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},cM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},lM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},uM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},dM={...iM,...aM,...oM,...sM,...cM,...lM,...uM},fM={"icon-sm":Fj[`icon-sm`],"icon-md":Fj[`icon-md`],"icon-lg":Fj[`icon-lg`],"icon-xl":Fj[`icon-xl`]},pM={"radius-300":Ij[`radius-300`],"radius-400":Ij[`radius-400`],"radius-500":Ij[`radius-500`]},mM={"space-300":eA[`space-300`],"space-400":eA[`space-400`],"space-500":eA[`space-500`],"space-600":eA[`space-600`],"space-700":eA[`space-700`],"space-800":eA[`space-800`],"space-900":eA[`space-900`]},hM={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(13),md:V(15),lg:V(17)}},brand:{darkBlue:nM,orange:rM},tokens:{color:dM,radius:pM,space:mM,iconSize:fM}},gM={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`accent`},brand:{darkBlue:cj,orange:lj},tokens:{color:{...wj,...Tj,...Ej,...jj,...Mj,...Nj,...Pj},radius:Ij,space:eA,iconSize:Fj,border:Cj,shadow:Lj,opacity:gA}},ocean:hM,forest:tM},_M=[`foundations`,`ocean`,`forest`],vM=`foundations`;function yM(e){let{theme:t,brand:n,tokens:r}=e;return{label:e.label,options:{theme:{...t,colors:{...t.colors??{},accent:n.orange,"brand-dark-blue":n.darkBlue,"brand-orange":n.orange}},tokens:{radius:r.radius,space:r.space,iconSize:r.iconSize,border:r.border,shadow:r.shadow,opacity:r.opacity,color:r.color}}}}var bM={foundations:yM(gM.foundations),ocean:yM(gM.ocean),forest:yM(gM.forest)};function xM(e){return typeof e==`string`&&_M.includes(e)}function SM(e){return bM[xM(e)?e:vM]}function CM({themeName:e}={}){return Bj(SM(e).options)}var wM=(0,H.createContext)(null),TM=e=>{let t=(0,H.useContext)(wM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function EM(){return TM()}var DM=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,H.useRef)(e.locale),i=(0,H.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,H.useState)(i());return(0,H.useEffect)(()=>{let t=()=>{r.current=e.locale,o(i())},n=e.on(`change`,t);return r.current!==e.locale&&t(),n},[e,i]),r.current?(0,U.jsx)(wM.Provider,{value:a,children:n}):(process.env.NODE_ENV===`development`&&console.log("I18nProvider rendered `null`. A call to `i18n.activate` needs to happen in order for translations to be activated and for the I18nProvider to render.This is not an error but an informational message logged only in development."),null)},OM=(0,H.createContext)(null),kM=(0,H.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function AM({runtime:e,children:t}){return(0,U.jsx)(kM.Provider,{value:e,children:t})}function jM({config:e,children:t}){return(0,U.jsx)(OM.Provider,{value:e,children:t})}var MM=(0,H.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),NM=({children:e,config:t})=>(0,U.jsx)(MM.Provider,{value:t,children:e});function PM({children:e,appConfig:t,config:n,runtime:r,theme:i,rootElement:a}){let o=typeof document>`u`?void 0:document.documentElement,s=!!a?.shadowRoot,c=s?`:host`:`:root`,l=s?a??void 0:o;return(0,H.useEffect)(()=>{if(!a)return;let e=a.style,t=i,n=t.other??{},r=t.colors??{},o=t.fontSizes??{},s=t.lineHeights??{};t.fontFamily&&e.setProperty(`--mantine-font-family`,String(t.fontFamily)),Object.entries(o).forEach(([t,n])=>{e.setProperty(`--mantine-font-size-${t}`,String(n))}),Object.entries(s).forEach(([t,n])=>{e.setProperty(`--mantine-line-height-${t}`,String(n))}),Object.entries(n).forEach(([t,n])=>{Object.entries(n).forEach(([n,r])=>{e.setProperty(`--mantine-custom-${t}-${n}`,String(r))})}),Object.entries(r).forEach(([t,n])=>{n.forEach((n,r)=>{e.setProperty(`--mantine-color-${t}-${r}`,n)})})},[a,i]),(0,U.jsx)(DM,{i18n:Pe,children:(0,U.jsx)(Rr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,U.jsx)($x,{client:yE,children:(0,U.jsx)(NM,{config:t,children:(0,U.jsx)(jM,{config:n,children:(0,U.jsx)(AM,{runtime:r,children:e})})})})})})}function FM(){let e=(0,H.useRef)(null);return{startInteraction:(0,H.useCallback)(t=>{let{cursor:n,onMove:r,onEnd:i}=t;document.body.style.cursor=n,document.body.style.userSelect=`none`;let a=()=>{document.body.style.cursor=``,document.body.style.userSelect=``,document.removeEventListener(`pointermove`,r),document.removeEventListener(`pointerup`,a),i?.(),e.current=null};document.addEventListener(`pointermove`,r),document.addEventListener(`pointerup`,a),e.current=a},[]),cleanup:(0,H.useCallback)(()=>{e.current?.()},[])}}var IM=4;function LM(e={}){let{skipSelector:t=`button, [role="button"], a, input, textarea`,onDragChange:n}=e,[r,i]=(0,H.useState)({x:0,y:0}),[a,o]=(0,H.useState)(!1),s=(0,H.useRef)({startX:0,startY:0,startOffset:{x:0,y:0}}),{startInteraction:c}=FM();return{offset:r,isDragging:a,handlePointerDown:(0,H.useCallback)(e=>{let a=e.target;if(t&&a?.closest(t))return;let l=e.clientX,u=e.clientY,d={...r},f=0,p=!1;s.current={startX:l,startY:u,startOffset:d},c({cursor:`grab`,onMove:e=>{let t=e.clientX-l,r=e.clientY-u;if(f=Math.abs(t)+Math.abs(r),!p&&f>=IM&&(p=!0,o(!0),document.body.style.cursor=`grabbing`,document.body.style.userSelect=`none`),p){let e={x:d.x+t,y:d.y+r};i(e),n?.(e)}},onEnd:()=>{p&&o(!1)}})},[r,t,n,c]),style:{transform:`translate(${r.x}px, ${r.y}px)`,cursor:a?`grabbing`:`grab`,touchAction:`none`}}}function RM(e){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,U.jsx)(`path`,{d:`M12 8V4H8`}),(0,U.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,U.jsx)(`path`,{d:`M2 14h2`}),(0,U.jsx)(`path`,{d:`M20 14h2`}),(0,U.jsx)(`path`,{d:`M15 13v2`}),(0,U.jsx)(`path`,{d:`M9 13v2`})]})}var zM={root:`_root_677yy_1`,button:`_button_677yy_5`,buttonInner:`_buttonInner_677yy_30`,iconSection:`_iconSection_677yy_35`,label:`_label_677yy_39`};function BM({onClick:e,zIndex:t,position:n,label:r}){let i=Vj(),{handlePointerDown:a,style:o}=LM({skipSelector:``}),s=Math.min(i.other.iconSize[`icon-sm`],16),{transform:c,cursor:l,touchAction:u}=o,d=(0,H.useMemo)(()=>({transform:c,touchAction:u,zIndex:t,...n}),[n,u,c,t]),f=(0,H.useMemo)(()=>({cursor:l??`pointer`}),[l]);return(0,U.jsx)(`div`,{className:zM.root,style:d,children:(0,U.jsx)(Am,{onClick:e,onPointerDown:a,style:f,classNames:{root:zM.button,inner:zM.buttonInner,section:zM.iconSection,label:zM.label},leftSection:(0,U.jsx)(RM,{width:s,height:s}),radius:20,variant:`filled`,color:`accent`,"aria-label":`Open ${r??`agent widget`}`,title:`Open ${r??`agent widget`}`,children:r??`Assistant`})})}function VM({mode:e=`thinking`,autoCycle:t=!0,cycleMs:n=2e3,exploringAfterMs:r=2e3,writingAfterMs:i=8e3,messages:a}){let[o,s]=(0,H.useState)(0);(0,H.useEffect)(()=>{if(!t)return;s(0);let e=setInterval(()=>{s(e=>e+1)},n);return()=>clearInterval(e)},[t,n]);let c=(0,H.useMemo)(()=>{if(!t)return e;let a=o*n;return a>=i?`writing`:a<r||o%2==0?`thinking`:`exploring`},[t,e,o,n,r,i]);return{label:(0,H.useMemo)(()=>{if(a&&a.length>0)return a[o%a.length];switch(c){case`exploring`:return`Exploring`;case`writing`:return`Writing`;default:return`Thinking`}},[a,o,c])}}function HM({size:e=`large`,mode:t=`thinking`,showLabel:n=!0,autoCycle:r=!0,cycleMs:i=2e3,exploringAfterMs:a=2e3,writingAfterMs:o=8e3,messages:s}){let{label:c}=VM({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,U.jsxs)(Tu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,U.jsx)(Yf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,U.jsx)(su,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,U.jsx)(Yf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var{entries:UM,setPrototypeOf:WM,isFrozen:GM,getPrototypeOf:KM,getOwnPropertyDescriptor:qM}=Object,{freeze:JM,seal:YM,create:XM}=Object,{apply:ZM,construct:QM}=typeof Reflect<`u`&&Reflect;JM||=function(e){return e},YM||=function(e){return e},ZM||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},QM||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var $M=pN(Array.prototype.forEach),eN=pN(Array.prototype.lastIndexOf),tN=pN(Array.prototype.pop),nN=pN(Array.prototype.push),rN=pN(Array.prototype.splice),iN=pN(String.prototype.toLowerCase),aN=pN(String.prototype.toString),oN=pN(String.prototype.match),sN=pN(String.prototype.replace),cN=pN(String.prototype.indexOf),lN=pN(String.prototype.trim),uN=pN(Object.prototype.hasOwnProperty),dN=pN(RegExp.prototype.test),fN=mN(TypeError);function pN(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ZM(e,t,r)}}function mN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return QM(e,n)}}function hN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:iN;WM&&WM(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(GM(t)||(t[r]=e),i=e)}e[i]=!0}return e}function gN(e){for(let t=0;t<e.length;t++)uN(e,t)||(e[t]=null);return e}function _N(e){let t=XM(null);for(let[n,r]of UM(e))uN(e,n)&&(Array.isArray(r)?t[n]=gN(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=_N(r):t[n]=r);return t}function vN(e,t){for(;e!==null;){let n=qM(e,t);if(n){if(n.get)return pN(n.get);if(typeof n.value==`function`)return pN(n.value)}e=KM(e)}function n(){return null}return n}var yN=JM(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),bN=JM(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),xN=JM([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),SN=JM([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),CN=JM(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),wN=JM([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),TN=JM([`#text`]),EN=JM(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),DN=JM(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),ON=JM(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),kN=JM([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),AN=YM(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jN=YM(/<%[\w\W]*|[\w\W]*%>/gm),MN=YM(/\$\{[\w\W]*/gm),NN=YM(/^data-[\-\w.\u00B7-\uFFFF]+$/),PN=YM(/^aria-[\-\w]+$/),FN=YM(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IN=YM(/^(?:\w+script|data):/i),LN=YM(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),RN=YM(/^html$/i),zN=YM(/^[a-z][.\w]*(-[.\w]+)+$/i),BN=Object.freeze({__proto__:null,ARIA_ATTR:PN,ATTR_WHITESPACE:LN,CUSTOM_ELEMENT:zN,DATA_ATTR:NN,DOCTYPE_NAME:RN,ERB_EXPR:jN,IS_ALLOWED_URI:FN,IS_SCRIPT_OR_DATA:IN,MUSTACHE_EXPR:AN,TMPLIT_EXPR:MN}),VN={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},HN=function(){return typeof window>`u`?null:window},UN=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},WN=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function GN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:HN(),t=e=>GN(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==VN.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=vN(m,`cloneNode`),g=vN(m,`remove`),_=vN(m,`nextSibling`),v=vN(m,`childNodes`),y=vN(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,{implementation:S,createNodeIterator:C,createDocumentFragment:w,getElementsByTagName:T}=n,{importNode:E}=r,D=WN();t.isSupported=typeof UM==`function`&&typeof y==`function`&&S&&S.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:k,TMPLIT_EXPR:A,DATA_ATTR:j,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:N,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:ee}=BN,{IS_ALLOWED_URI:F}=BN,I=null,te=hN({},[...yN,...bN,...xN,...CN,...TN]),ne=null,re=hN({},[...EN,...DN,...ON,...kN]),ie=Object.seal(XM(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),L=null,ae=null,oe=Object.seal(XM(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),se=!0,ce=!0,le=!1,ue=!0,de=!1,fe=!0,R=!1,pe=!1,me=!1,he=!1,ge=!1,z=!1,_e=!0,ve=!1,B=!0,ye=!1,be={},xe=null,Se=hN({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),Ce=null,we=hN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Te=null,Ee=hN({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),De=`http://www.w3.org/1998/Math/MathML`,Oe=`http://www.w3.org/2000/svg`,ke=`http://www.w3.org/1999/xhtml`,Ae=ke,je=!1,Me=null,Ne=hN({},[De,Oe,ke],aN),Pe=hN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Fe=hN({},[`annotation-xml`]),Ie=hN({},[`title`,`style`,`font`,`a`,`script`]),Le=null,Re=[`application/xhtml+xml`,`text/html`],ze=null,Be=null,Ve=n.createElement(`form`),He=function(e){return e instanceof RegExp||e instanceof Function},V=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===e)){if((!e||typeof e!=`object`)&&(e={}),e=_N(e),Le=Re.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ze=Le===`application/xhtml+xml`?aN:iN,I=uN(e,`ALLOWED_TAGS`)?hN({},e.ALLOWED_TAGS,ze):te,ne=uN(e,`ALLOWED_ATTR`)?hN({},e.ALLOWED_ATTR,ze):re,Me=uN(e,`ALLOWED_NAMESPACES`)?hN({},e.ALLOWED_NAMESPACES,aN):Ne,Te=uN(e,`ADD_URI_SAFE_ATTR`)?hN(_N(Ee),e.ADD_URI_SAFE_ATTR,ze):Ee,Ce=uN(e,`ADD_DATA_URI_TAGS`)?hN(_N(we),e.ADD_DATA_URI_TAGS,ze):we,xe=uN(e,`FORBID_CONTENTS`)?hN({},e.FORBID_CONTENTS,ze):Se,L=uN(e,`FORBID_TAGS`)?hN({},e.FORBID_TAGS,ze):_N({}),ae=uN(e,`FORBID_ATTR`)?hN({},e.FORBID_ATTR,ze):_N({}),be=uN(e,`USE_PROFILES`)?e.USE_PROFILES:!1,se=e.ALLOW_ARIA_ATTR!==!1,ce=e.ALLOW_DATA_ATTR!==!1,le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=e.SAFE_FOR_TEMPLATES||!1,fe=e.SAFE_FOR_XML!==!1,R=e.WHOLE_DOCUMENT||!1,he=e.RETURN_DOM||!1,ge=e.RETURN_DOM_FRAGMENT||!1,z=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,_e=e.SANITIZE_DOM!==!1,ve=e.SANITIZE_NAMED_PROPS||!1,B=e.KEEP_CONTENT!==!1,ye=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||FN,Ae=e.NAMESPACE||ke,Pe=e.MATHML_TEXT_INTEGRATION_POINTS||Pe,Fe=e.HTML_INTEGRATION_POINTS||Fe,ie=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&He(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&He(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ie.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(ie.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),de&&(ce=!1),ge&&(he=!0),be&&(I=hN({},TN),ne=XM(null),be.html===!0&&(hN(I,yN),hN(ne,EN)),be.svg===!0&&(hN(I,bN),hN(ne,DN),hN(ne,kN)),be.svgFilters===!0&&(hN(I,xN),hN(ne,DN),hN(ne,kN)),be.mathMl===!0&&(hN(I,CN),hN(ne,ON),hN(ne,kN))),uN(e,`ADD_TAGS`)||(oe.tagCheck=null),uN(e,`ADD_ATTR`)||(oe.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?oe.tagCheck=e.ADD_TAGS:(I===te&&(I=_N(I)),hN(I,e.ADD_TAGS,ze))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?oe.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=_N(ne)),hN(ne,e.ADD_ATTR,ze))),e.ADD_URI_SAFE_ATTR&&hN(Te,e.ADD_URI_SAFE_ATTR,ze),e.FORBID_CONTENTS&&(xe===Se&&(xe=_N(xe)),hN(xe,e.FORBID_CONTENTS,ze)),e.ADD_FORBID_CONTENTS&&(xe===Se&&(xe=_N(xe)),hN(xe,e.ADD_FORBID_CONTENTS,ze)),B&&(I[`#text`]=!0),R&&hN(I,[`html`,`head`,`body`]),I.table&&(hN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw fN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw fN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=UN(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));JM&&JM(e),Be=e}},Ue=hN({},[...bN,...xN,...SN]),We=hN({},[...CN,...wN]),Ge=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ae,tagName:`template`});let n=iN(e.tagName),r=iN(t.tagName);return Me[e.namespaceURI]?e.namespaceURI===Oe?t.namespaceURI===ke?n===`svg`:t.namespaceURI===De?n===`svg`&&(r===`annotation-xml`||Pe[r]):!!Ue[n]:e.namespaceURI===De?t.namespaceURI===ke?n===`math`:t.namespaceURI===Oe?n===`math`&&Fe[r]:!!We[n]:e.namespaceURI===ke?t.namespaceURI===Oe&&!Fe[r]||t.namespaceURI===De&&!Pe[r]?!1:!We[n]&&(Ie[n]||!Ue[n]):!!(Le===`application/xhtml+xml`&&Me[e.namespaceURI]):!1},H=function(e){nN(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},Ke=function(e,n){try{nN(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{nN(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(he||ge)try{H(n)}catch{}else try{n.setAttribute(e,``)}catch{}},qe=function(e){let t=null,r=null;if(me)e=`<remove></remove>`+e;else{let t=oN(e,/^[\r\n\t ]+/);r=t&&t[0]}Le===`application/xhtml+xml`&&Ae===ke&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(Ae===ke)try{t=new f().parseFromString(i,Le)}catch{}if(!t||!t.documentElement){t=S.createDocument(Ae,`template`,null);try{t.documentElement.innerHTML=je?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ae===ke?T.call(t,R?`html`:`body`)[0]:R?t.documentElement:a},Je=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ye=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Xe=function(e){return typeof s==`function`&&e instanceof s};function Ze(e,n,r){$M(e,e=>{e.call(t,n,r,Be)})}let Qe=function(e){let n=null;if(Ze(D.beforeSanitizeElements,e,null),Ye(e))return H(e),!0;let r=ze(e.nodeName);if(Ze(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),fe&&e.hasChildNodes()&&!Xe(e.firstElementChild)&&dN(/<[/\w!]/g,e.innerHTML)&&dN(/<[/\w!]/g,e.textContent)||e.nodeType===VN.progressingInstruction||fe&&e.nodeType===VN.comment&&dN(/<[/\w]/g,e.data))return H(e),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&et(r)&&(ie.tagNameCheck instanceof RegExp&&dN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r)))return!1;if(B&&!xe[r]){let t=y(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return H(e),!0}return e instanceof c&&!Ge(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&dN(/<\/no(script|embed|frames)/i,e.innerHTML)?(H(e),!0):(de&&e.nodeType===VN.text&&(n=e.textContent,$M([O,k,A],e=>{n=sN(n,e,` `)}),e.textContent!==n&&(nN(t.removed,{element:e.cloneNode()}),e.textContent=n)),Ze(D.afterSanitizeElements,e,null),!1)},$e=function(e,t,r){if(ae[t]||_e&&(t===`id`||t===`name`)&&(r in n||r in Ve))return!1;if(!(ce&&!ae[t]&&dN(j,t))&&!(se&&dN(M,t))&&!(oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e))){if(!ne[t]||ae[t]){if(!(et(e)&&(ie.tagNameCheck instanceof RegExp&&dN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&dN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&dN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!Te[t]&&!dN(F,sN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&cN(r,`data:`)===0&&Ce[e])&&!(le&&!dN(N,sN(r,P,``)))&&r)return!1}return!0},et=function(e){return e!==`annotation-xml`&&oN(e,ee)},tt=function(e){Ze(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Ye(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=ze(a),l=s,u=a===`value`?l:lN(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Ze(D.uponSanitizeAttribute,e,r),u=r.attrValue,ve&&(c===`id`||c===`name`)&&(Ke(a,e),u=`user-content-`+u),fe&&dN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){Ke(a,e);continue}if(c===`attributename`&&oN(u,`href`)){Ke(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Ke(a,e);continue}if(!ue&&dN(/\/>/i,u)){Ke(a,e);continue}de&&$M([O,k,A],e=>{u=sN(u,e,` `)});let d=ze(e.nodeName);if(!$e(d,c,u)){Ke(a,e);continue}if(b&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=b.createHTML(u);break;case`TrustedScriptURL`:u=b.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),Ye(e)?H(e):tN(t.removed)}catch{Ke(a,e)}}Ze(D.afterSanitizeAttributes,e,null)},nt=function e(t){let n=null,r=Je(t);for(Ze(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Ze(D.uponSanitizeShadowNode,n,null),Qe(n),tt(n),n.content instanceof a&&e(n.content);Ze(D.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(je=!e,je&&(e=`<!-->`),typeof e!=`string`&&!Xe(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw fN(`dirty is not a string, aborting`)}else throw fN(`toString is not a function`);if(!t.isSupported)return e;if(pe||V(n),t.removed=[],typeof e==`string`&&(ye=!1),ye){if(e.nodeName){let t=ze(e.nodeName);if(!I[t]||L[t])throw fN(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=qe(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===VN.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!he&&!de&&!R&&e.indexOf(`<`)===-1)return b&&z?b.createHTML(e):e;if(i=qe(e),!i)return he?null:z?x:``}i&&me&&H(i.firstChild);let u=Je(ye?e:i);for(;c=u.nextNode();)Qe(c),tt(c),c.content instanceof a&&nt(c.content);if(ye)return e;if(he){if(ge)for(l=w.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(ne.shadowroot||ne.shadowrootmode)&&(l=E.call(r,l,!0)),l}let d=R?i.outerHTML:i.innerHTML;return R&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&dN(RN,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
320
320
  `+d),de&&$M([O,k,A],e=>{d=sN(d,e,` `)}),b&&z?b.createHTML(d):d},t.setConfig=function(){V(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),pe=!0},t.clearConfig=function(){Be=null,pe=!1},t.isValidAttribute=function(e,t,n){return Be||V({}),$e(ze(e),ze(t),n)},t.addHook=function(e,t){typeof t==`function`&&nN(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=eN(D[e],t);return n===-1?void 0:rN(D[e],n,1)[0]}return tN(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=WN()},t}var KN=GN(),qN=[`script`,`style`,`iframe`,`object`,`embed`,`link`,`meta`,`base`,`form`,`input`,`button`,`textarea`,`select`],JN=[`style`,`srcdoc`];function YN(e){return e?KN.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:qN,FORBID_ATTR:JN,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1}):``}function XN({html:e,fallback:t=null,...n}){let r=(0,H.useMemo)(()=>YN(e??``),[e]);return r?(0,U.jsx)(q,{...n,dangerouslySetInnerHTML:{__html:r}}):(0,U.jsx)(U.Fragment,{children:t})}function ZN(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var QN=ZN();function $N(e){QN=e}var eP={exec:()=>null};function tP(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(rP.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var nP=(()=>{try{return!0}catch{return!1}})(),rP={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},iP=/^(?:[ \t]*(?:\n|$))+/,aP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,oP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,sP=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,lP=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,uP=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dP=tP(uP).replace(/bull/g,lP).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),fP=tP(uP).replace(/bull/g,lP).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),pP=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,mP=/^[^\n]+/,hP=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,gP=tP(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,hP).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_P=tP(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,lP).getRegex(),vP=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,yP=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,bP=tP(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,yP).replace(`tag`,vP).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xP=tP(pP).replace(`hr`,sP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,vP).getRegex(),SP={blockquote:tP(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,xP).getRegex(),code:aP,def:gP,fences:oP,heading:cP,hr:sP,html:bP,lheading:dP,list:_P,newline:iP,paragraph:xP,table:eP,text:mP},CP=tP(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,sP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,vP).getRegex(),wP={...SP,lheading:fP,table:CP,paragraph:tP(pP).replace(`hr`,sP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,CP).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,vP).getRegex()},TP={...SP,html:tP(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,yP).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:eP,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tP(pP).replace(`hr`,sP).replace(`heading`,` *#{1,6} *[^
321
321
  ]`).replace(`lheading`,dP).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},EP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,DP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,OP=/^( {2,}|\\)\n(?!\s*$)/,kP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,AP=/[\p{P}\p{S}]/u,jP=/[\s\p{P}\p{S}]/u,MP=/[^\s\p{P}\p{S}]/u,NP=tP(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,jP).getRegex(),PP=/(?!~)[\p{P}\p{S}]/u,FP=/(?!~)[\s\p{P}\p{S}]/u,IP=/(?:[^\s\p{P}\p{S}]|~)/u,LP=/(?![*_])[\p{P}\p{S}]/u,RP=/(?![*_])[\s\p{P}\p{S}]/u,zP=/(?:[^\s\p{P}\p{S}]|[*_])/u,BP=tP(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,nP?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),VP=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,HP=tP(VP,`u`).replace(/punct/g,AP).getRegex(),UP=tP(VP,`u`).replace(/punct/g,PP).getRegex(),WP=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,GP=tP(WP,`gu`).replace(/notPunctSpace/g,MP).replace(/punctSpace/g,jP).replace(/punct/g,AP).getRegex(),KP=tP(WP,`gu`).replace(/notPunctSpace/g,IP).replace(/punctSpace/g,FP).replace(/punct/g,PP).getRegex(),qP=tP(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,MP).replace(/punctSpace/g,jP).replace(/punct/g,AP).getRegex(),JP=tP(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,LP).getRegex(),YP=tP(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,zP).replace(/punctSpace/g,RP).replace(/punct/g,LP).getRegex(),XP=tP(/\\(punct)/,`gu`).replace(/punct/g,AP).getRegex(),ZP=tP(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),QP=tP(yP).replace(`(?:-->|$)`,`-->`).getRegex(),$P=tP(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,QP).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),eF=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,tF=tP(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,eF).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nF=tP(/^!?\[(label)\]\[(ref)\]/).replace(`label`,eF).replace(`ref`,hP).getRegex(),rF=tP(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,hP).getRegex(),iF=tP(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,nF).replace(`nolink`,rF).getRegex(),aF=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,oF={_backpedal:eP,anyPunctuation:XP,autolink:ZP,blockSkip:BP,br:OP,code:DP,del:eP,delLDelim:eP,delRDelim:eP,emStrongLDelim:HP,emStrongRDelimAst:GP,emStrongRDelimUnd:qP,escape:EP,link:tF,nolink:rF,punctuation:NP,reflink:nF,reflinkSearch:iF,tag:$P,text:kP,url:eP},sF={...oF,link:tP(/^!?\[(label)\]\((.*?)\)/).replace(`label`,eF).getRegex(),reflink:tP(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,eF).getRegex()},cF={...oF,emStrongRDelimAst:KP,emStrongLDelim:UP,delLDelim:JP,delRDelim:YP,url:tP(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,aF).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:tP(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,aF).getRegex()},lF={...cF,br:tP(OP).replace(`{2,}`,`*`).getRegex(),text:tP(cF.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},uF={normal:SP,gfm:wP,pedantic:TP},dF={normal:oF,gfm:cF,breaks:lF,pedantic:sF},fF={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},pF=e=>fF[e];function mF(e,t){if(t){if(rP.escapeTest.test(e))return e.replace(rP.escapeReplace,pF)}else if(rP.escapeTestNoEncode.test(e))return e.replace(rP.escapeReplaceNoEncode,pF);return e}function hF(e){try{e=encodeURI(e).replace(rP.percentDecode,`%`)}catch{return null}return e}function gF(e,t){let n=e.replace(rP.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(rP.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(rP.slashPipe,`|`);return n}function _F(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function vF(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function yF(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function bF(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function xF(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
322
322
  `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
@@ -399,7 +399,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
399
399
  `+t+`]`}return r.pop(),i=t,c}}}}))}));function tH(e){let t=e.indexOf(`{`),n=e.indexOf(`[`);return t===-1?n:n===-1?t:Math.min(t,n)}function nH(e){return e===`{`||e===`[`}function rH(e){return e===`}`||e===`]`}function iH(e){return e===`}`?`{`:`[`}function aH(e,t){let n=[],r=!1,i=!1;for(let a=t;a<e.length;a++){let t=e[a]??``;if(r){if(i){i=!1;continue}if(t===`\\`){i=!0;continue}if(t===`"`){r=!1;continue}continue}if(!(t===`"`&&e[a-1]===`\\`)){if(t===`"`){r=!0;continue}if(nH(t)){n.push(t);continue}if(rH(t)&&(n[n.length-1]===iH(t)&&n.pop(),n.length===0))return{end:a+1,openStack:[],inString:!1}}}return{end:null,openStack:n,inString:r}}function oH(e){let t=tH(e);if(t<0)return e;let{end:n,openStack:r,inString:i}=aH(e,t);if(n!==null)return e;let a=``;return i&&(a+=`"`),r.length>0&&(a+=r.reverse().map(e=>e===`{`?`}`:`]`).join(``)),a?`${e}${a}`:e}function sH(e,t){return aH(e,t).end}var cH=l(eH());function lH(e){try{return JSON.parse(e)}catch{return null}}function uH(e){return lH(e)??(()=>{try{return cH.default.parse(e)}catch{return null}})()}function dH(e){return e.replace(/\\r\\n/g,`
400
400
  `).replace(/\\n/g,`
401
401
  `).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\//g,`/`).replace(/\\\\/g,`\\`)}function fH(e){return e&&e.replace(/([{\s,])([A-Za-z0-9_@$-]+)\s*:/g,(e,t,n)=>`${t}"${n}":`)}function pH(e){let t=e.trim();t=t.replace(/[""]/g,`"`).replace(/['']/g,`'`),t=t.replace(/,\s*([}\]])/g,`$1`);try{t=fH(t)}catch{}return t=oH(t),uH(t)}function mH(e){if(!e||typeof e!=`string`)return null;let t=lH(e);if(t!=null)return t;try{let t=cH.default.parse(e);if(t!=null)return t}catch{}if(e.includes(`\\"`)||e.includes(`\\n`)||e.includes(`\\r`)||e.includes(`\\\\`)){let t=uH(dH(e));if(t!=null)return t}try{return pH(e)}catch{return null}}function hH(e){let t=tH(e);if(t<0)return null;let n=sH(e,t);if(n!==null)return{start:t,json:e.slice(t,n).trim(),consumed:n-t};let r=e.slice(t),i=r.search(/\r?\n\r?\n/);return i>20&&(r=r.slice(0,i).trimEnd()),{start:t,json:oH(r).trim(),consumed:r.length}}var gH=`"structuredData":`,_H=`\\"structuredData\\":`;function vH(e){let t=e.indexOf(gH);if(t<0&&(t=e.indexOf(_H)),t<0)return null;let n=t+17,r=e.indexOf(`{`,n);if(r<0||r>n+10)return null;let i=sH(e,r),a,o;i===null?(a=e.slice(t,r).trim()+oH(e.slice(r)).trim(),o=e.length-t):(a=e.slice(t,i).trim(),o=i-t),t===e.indexOf(_H)&&(a=a.replace(/\\"/g,`"`));let s=`{`+a+`}`;return{start:t,fullJson:s,consumed:o}}function yH(e){let t=e.trim();if(!t||t.length<10)return!1;let n=tH(t);return n>=0&&sH(t,n)===null&&t.length-n>10}function bH(e){let t=/^\s*(?:\r?\n)?\s*(?:'{3}|"{3}|`{3})(?:\s*json\s*)?(?:'{3}|"{3}|`{3})?\s*(?:\r?\n)?/i.exec(e);return!t||!/'{3}|"{3}|`{3}/i.test(t[0])?0:t[0].length}function xH(e){return/^\s*(?:[\]}]+\s*)+/.exec(e)?.[0].length??0}function SH(e){return e&&typeof e==`object`?e:null}function CH(e){return Array.isArray(e)?e:[]}function wH(e){if(typeof e==`number`)return Number.isFinite(e)?e:null;if(typeof e==`string`){let t=Number(e);return Number.isFinite(t)?t:null}return null}function TH(e,t,n){let r=wH(e.used)??wH(e.currentValueRaw)??0,i=wH(e.allowance),a=wH(e.remaining),o=i??wH(e.total)??(r!=null&&a!=null?r+a:null)??wH(e.valueRaw)??(r>0?r:0),s=typeof e.unit==`string`?e.unit:``,c=typeof e.name==`string`?e.name:t.toUpperCase();if(o<=0)return null;let l=n?wH(e.percentUsed)??void 0:void 0,u={key:t,label:c,used:r,total:o,unit:s};return l!=null&&(u.percentUsed=l),u}function EH(e){let t=[],n=CH(e?.responseList);for(let e of n){let n=TH(e,typeof e.type==`string`?e.type:`usage`,!0);n&&t.push(n)}return t.length>0?t:null}function DH(e){let t=e.items;if(Array.isArray(t)&&t.length>0){let e=SH(t[0]);if(e)return e}return e}function OH(e){let t=SH(e),n=SH(SH(t?.structuredData)?.data??t?.data);if(!n)return null;let r=EH(n);if(r)return r;let i=CH(n?.usageTypes);if(i.length===0)return null;let a=[];for(let e of i){let t=typeof e.type==`string`?e.type:`usage`,n=DH(e);if(!n)continue;let r=TH(n,t);r&&a.push(r)}return a.length>0?a:null}function kH(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function AH(e){if(!e||typeof e!=`object`)return null;let t=e,n=kH(t.buttonText);if(!n)return null;let r=kH(t.targetAgent)??void 0;return{buttonText:n,agentMessage:kH(t.agentMessage)??r??n,...r?{targetAgent:r}:{}}}function jH(e){if(!e||typeof e!=`object`)return null;let t=e;if(!Array.isArray(t.actions))return null;let n=t.actions.map(AH).filter(e=>e!==null);return n.length===0?null:{actions:n}}function MH(e){return e&&typeof e==`object`?e:null}function NH(e){if(typeof e!=`string`)return null;switch(e){case`card`:case`link`:case`chart`:case`highlightBox`:return e;default:return null}}function PH(e){let t=MH(e);if(!t)return null;let n=MH(t.structuredData),r=[MH(n?.visualization)?.type,MH(n?.visualizationConfig)?.visualizationType,n?.visualizationType,MH(t.visualization)?.type,MH(t.visualizationConfig)?.visualizationType,t.visualizationType];for(let e of r)if(typeof e==`string`)return NH(e)??e;return null}function FH(e){if(typeof e!=`string`)return null;let t=e.trim();switch(t){case`accountOverview`:case`customerProfile`:case`offerRecommendation`:case`basket`:case`usageAnalysis`:case`twinInsight`:return t;default:return`unknown`}}function IH(e){let t=MH(e);if(!t)return null;let n=MH(t.structuredData),r=n?.data??t.data,i=MH(n?.visualization),a=MH(t.visualization);return{data:r,visualizationConfig:i?.config??a?.config??t.visualizationConfig,responseType:FH(n?.responseType??t.responseType)}}function LH(e){let t=MH(e);return!t||MH(t.structuredData)?e:typeof t.responseType==`string`||MH(t.visualization)||MH(t.visualizationConfig)||typeof t.visualizationType==`string`||t.data!==void 0?{structuredData:t}:e}function RH(e){let t=MH(e);return t?MH(t.structuredData)||MH(t.visualization)||MH(t.visualizationConfig)||Array.isArray(t.actions)?!0:typeof t.visualizationType==`string`||typeof t.responseType==`string`:!1}var zH=new hE(`widget-config-builder`);function BH(e){let t=jH(e);if(t)return{type:`widget`,config:{type:`actions`,actions:t.actions}};let n=PH(e),r=IH(e),i={visualizationConfig:r?.visualizationConfig,responseType:r?.responseType??void 0};if(!n){let t=r?.data??e;return NV(t)?{type:`widget`,config:{type:`card`,data:t,...i}}:null}if(n===`chart`){let t=e?OH(e):null;return!t||t.length===0?null:{type:`widget`,config:{type:n,items:t,...i}}}if(n===`card`||n===`link`||n===`highlightBox`){let e=r?.data;if(!NV(e))return null;let t=n;if(n===`card`){let e=r?.responseType;e===`accountOverview`?t=`account-overview`:e===`offerRecommendation`&&(t=`offer-card`)}let a={type:t,data:e,...i};return zH.debug(`Creating widget`,{visualizationType:n,responseType:r?.responseType,widgetType:t,config:a}),{type:`widget`,config:a}}return{type:`widget`,config:{type:n}}}var VH=new hE(`useAgentMarkdownRendererElements`),HH={async:!1,breaks:!0,gfm:!0};function UH(e){return kF.parse(e,HH)}function WH(e,t,n){let r=UH(t);return r.trim()?(e.push({type:`markdown`,key:`md-${n}`,content:r}),n+1):n}function GH(e){return["```json",JSON.stringify(e,null,2),"```"].join(`
402
- `)}function KH(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:mH(t)}function qH(e,t){return(0,H.useMemo)(()=>{let n=$V(e),r=KH(n);if(r)return[{type:`markdown`,key:`json-0`,content:UH(GH(r))}];let i=WV(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=WH(a,e.content,o);continue}try{let n=GV(e.dsl);if(!n){let t=KH(e.dsl);o=WH(a,t?GH(t):e.raw,o);continue}let r=jV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=WH(a,GH(r.payload),o)}catch(t){VH.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=WH(a,e.raw,o)}}return a},[e,t])}var JH={agentChatMdRenderer:`_agentChatMdRenderer_5jigp_1`},YH=(0,H.memo)(({content:e,onWidgetEvent:t})=>{let n=qH(e,t);return(0,U.jsx)(q,{className:JH.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,U.jsx)(XN,{html:e.content},e.key):(0,U.jsx)(q,{children:e.widget},e.key))})});YH.displayName=`AgentMarkdownRenderer`;var XH={body:`_body_1vtnd_1`,messageBubble:`_messageBubble_1vtnd_21`,messageBubbleUser:`_messageBubbleUser_1vtnd_33`,userText:`_userText_1vtnd_54`,messageBubbleAssistant:`_messageBubbleAssistant_1vtnd_62`,messageList:`_messageList_1vtnd_84`};function ZH({messages:e,isLoading:t,error:n,scrollViewportRef:r,onWidgetEvent:i}){return(0,U.jsx)(By,{className:XH.body,gap:0,children:(0,U.jsx)(ol,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:r,children:(0,U.jsxs)(By,{className:XH.messageList,gap:0,children:[n&&(0,U.jsx)(Wf,{color:`red`,variant:`light`,radius:`md`,children:n}),e.map(e=>(0,U.jsx)(q,{className:`${XH.messageBubble} ${e.sentBy===`user`?XH.messageBubbleUser:XH.messageBubbleAssistant}`,children:e.sentBy===`assistant`?(0,U.jsx)(YH,{content:e.text,onWidgetEvent:i}):(0,U.jsx)(Yf,{className:XH.userText,children:e.text})},e.id)),t&&(0,U.jsx)(q,{className:`${XH.messageBubble} ${XH.messageBubbleAssistant}`,children:(0,U.jsx)(HM,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})})]})})})}var QH={root:`_root_h7hgt_1`,input:`_input_h7hgt_6`,section:`_section_h7hgt_34`};function $H({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,U.jsx)(Rb,{placeholder:r?`Listening...`:`Ask me anything...`,value:e,onChange:e=>t(e.currentTarget.value),disabled:n,radius:`md`,size:`md`,rightSection:a,rightSectionWidth:o,rightSectionPointerEvents:`all`,classNames:{root:QH.root,input:QH.input,section:QH.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function eU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...GF(e),...t,children:[(0,U.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`}),(0,U.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,U.jsx)(`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`})]})}function tU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...GF(e),...t,children:(0,U.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function nU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Vj();return(0,U.jsx)(uy,{label:e?`Stop recording`:`Voice input`,children:(0,U.jsx)(hu,{onClick:n,disabled:t,size:r??`lg`,radius:`md`,variant:e?`filled`:`subtle`,color:e?`red`:`accent`,"aria-label":e?`Stop voice recording`:`Start voice recording`,styles:{root:e?void 0:{color:i.other.color[`secondary-default`],backgroundColor:`transparent`,boxShadow:`inset 0 0 0 1px ${i.other.color[`secondary-light`]}33`}},children:e?(0,U.jsx)(tU,{size:`sm`}):(0,U.jsx)(eU,{size:`sm`})})})}function rU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...GF(e),...t,children:[(0,U.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,U.jsx)(`path`,{d:`M22 2 11 13`})]})}var iU={footer:`_footer_zlzuq_1`,actionGroup:`_actionGroup_zlzuq_8`,poweredBy:`_poweredBy_zlzuq_12`,sendButton:`_sendButton_zlzuq_18`};function aU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,isVoiceSupported:i,canSend:a,onSubmit:o,onToggleVoice:s}){let c=i?74:40;return(0,U.jsxs)(By,{className:iU.footer,gap:`sm`,children:[(0,U.jsx)($H,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:c,rightSection:(0,U.jsxs)(Tu,{className:iU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,U.jsx)(nU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),(0,U.jsx)(hu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`filled`,color:`accent`,className:iU.sendButton,"aria-label":`Send message`,children:(0,U.jsx)(rU,{size:`sm`})})]})}),(0,U.jsx)(Yf,{ta:`center`,size:`xs`,c:`dimmed`,className:iU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function oU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...GF(e),...t,children:[(0,U.jsx)(`rect`,{x:`4`,y:`4`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`}),(0,U.jsx)(`rect`,{x:`4`,y:`9.75`,width:`10`,height:`2.5`,rx:`1.2`,fill:`currentColor`,opacity:`0.88`}),(0,U.jsx)(`rect`,{x:`4`,y:`15.5`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`})]})}function sU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...GF(e),...t,children:(0,U.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var cU={header:`_header_5x292_19`,headerLeft:`_headerLeft_5x292_31`,headerInfo:`_headerInfo_5x292_36`,orbContainer:`_orbContainer_5x292_40`,orbOuter:`_orbOuter_5x292_54`,orbPulse:`_orbPulse_5x292_1`,orbMiddle:`_orbMiddle_5x292_63`,orbInner:`_orbInner_5x292_72`,orbFloat:`_orbFloat_5x292_1`,headerMeta:`_headerMeta_5x292_85`,statusDot:`_statusDot_5x292_89`,statusText:`_statusText_5x292_103`,closeButton:`_closeButton_5x292_112`,title:`_title_5x292_123`,topSubHeader:`_topSubHeader_5x292_135`,subHeaderLeft:`_subHeaderLeft_5x292_145`,subHeaderIcon:`_subHeaderIcon_5x292_151`,subHeaderTitle:`_subHeaderTitle_5x292_162`,subHeaderStatus:`_subHeaderStatus_5x292_168`};function lU({panelTitle:e,isLoading:t,isOnline:n,onClose:r}){let i=Vj();return(0,U.jsxs)(Tf,{className:cU.header,align:`center`,justify:`space-between`,children:[(0,U.jsxs)(Tu,{className:cU.headerLeft,wrap:`nowrap`,gap:`sm`,align:`center`,children:[(0,U.jsxs)(q,{className:cU.orbContainer,"data-loading":t||void 0,children:[(0,U.jsx)(q,{className:cU.orbOuter}),(0,U.jsx)(q,{className:cU.orbMiddle}),(0,U.jsx)(q,{className:cU.orbInner,children:(0,U.jsx)(oU,{size:`sm`,color:i.other.color[`text-white`]})})]}),(0,U.jsxs)(By,{className:cU.headerInfo,gap:2,justify:`center`,children:[(0,U.jsx)(Yf,{className:cU.title,fw:800,children:e}),(0,U.jsxs)(Tu,{className:cU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,U.jsx)(q,{className:cU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,U.jsx)(Yf,{className:cU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,U.jsx)(hu,{variant:`subtle`,size:`lg`,radius:`md`,onClick:r,className:cU.closeButton,"aria-label":`Close agent chat`,children:(0,U.jsx)(sU,{size:`sm`})})]})}var uU={root:`_root_98si9_1`,surface:`_surface_98si9_9`,resizeHandle:`_resizeHandle_98si9_22`};function dU({visible:e,onClose:t,messages:n,composerText:r,onComposerTextChange:i,isLoading:a,error:o,canSend:s,onSubmit:c,isListening:l,isVoiceSupported:u,onToggleVoice:d,actions:f,onActionClick:p,panelTitle:m,runtimeInfo:h,scrollViewportRef:g,actualWidth:_=420,floatingTop:v=`var(--mantine-custom-space-150)`,floatingHeight:y=`100%`,floatingMaxHeight:b=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,shellGap:x=`var(--mantine-custom-space-150)`,panelHeaderHeight:S=56,panelResizableWidth:C,zIndex:w}){let T=h.hasCustomerToken&&h.hasGenaiToken;return e?(0,U.jsxs)(q,{className:uU.root,style:{width:_,maxWidth:`calc(100vw - var(--mantine-custom-space-400) - var(--mantine-custom-space-400))`,height:y,maxHeight:b,top:v,right:x,zIndex:w,"--agent-widget-panel-header-height":`${S}px`,"--agent-widget-shell-gap":x},children:[C&&(0,U.jsx)(q,{onPointerDown:C.handlePointerDown,className:uU.resizeHandle,style:C.style}),(0,U.jsxs)(q,{className:uU.surface,children:[(0,U.jsx)(lU,{panelTitle:m,isLoading:a,isOnline:T,onClose:t}),(0,U.jsx)(ZH,{messages:n,isLoading:a,error:o,scrollViewportRef:g,onWidgetEvent:e=>{if(e.type===`action-click`&&e.data){let t=f.find(t=>t.buttonText===e.data?.buttonText);t&&p(t)}}}),(0,U.jsx)(aU,{composerText:r,onComposerTextChange:i,isLoading:a,isListening:l,isVoiceSupported:u,canSend:s,onSubmit:c,onToggleVoice:d})]})]}):null}function fU(e){return typeof e==`object`&&!!e}function pU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function mU(e){if(Array.isArray(e))return e.filter(fU);if(!fU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(fU);if(fU(n)){let e=mU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(fU);if(e.length>0)return e}return[]}function hU(e){let t=pU(e.assistantId??e.assistant_id??e.id??e.agentId??e.agent_id??e.appId??e.app_id);if(!t)return null;let n=e.description??e.appDescription??e.app_description??e.label??e.name??e.assistantName??e.assistant_name??e.agentName??e.agent_name??e.title,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.agentKey??e.agent_key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function gU(e){let t=pU(e.appId??e.app_id??e.id??e.assistantId??e.assistant_id);if(!t)return null;let n=e.description??e.name??e.label??e.title??e.appName??e.app_name,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function _U(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>gU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=hU(e);return t?[t]:[]}function vU(e){return mU(e).flatMap(e=>_U(e))}var yU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},bU=dE(e=>({...yU,setRuntimeInfo:t=>e({runtimeInfo:t}),updateCustomerId:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,customerId:t}})),updateCustomerToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasCustomerToken:t}})),updateGenaiToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasGenaiToken:t}})),resetRuntimeInfo:()=>e({runtimeInfo:yU.runtimeInfo})}));async function xU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await TE.post(`/login`,n,{anonymous:!0,headers:{"Content-Type":`application/x-www-form-urlencoded`}});return r.data?.access_token&&(_T(r.data.access_token),xT(!1)),r.data}catch(e){throw e}}async function SU(e,t){try{let n=await TE.post(`/tenants/switch`,{tenant_id:e},{anonymous:!0,headers:{Authorization:`Bearer ${t}`}});return n.data?.data?.access_token&&_T(n.data.data.access_token),yT(n.data?.data?.tenant_id??e),xT(!0),n.data}catch(e){throw e}}async function CU(e){try{return(await TE.post(`/agent-message`,e,{anonymous:!0})).data}catch(e){throw e}}async function wU(e){try{return(await TE.post(`/agentic-app-chat`,e,{anonymous:!0})).data}catch(e){throw e}}async function TU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function EU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var DU={loginToGenai:xU,switchTenant:SU,sendAgentMessage:CU,sendAgenticAppChat:wU,fetchAssistants:TU,fetchAgenticApps:EU};function OU({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return eS({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var kU=OU({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>DU.fetchAgenticApps(e)}),AU=OU({mutationKey:[`genai`,`assistants`],mutationFn:async e=>DU.fetchAssistants(e)});function jU(e){return e===`MULTI`?`MULTI`:`SINGLE`}function MU(e,t){if(e){let n=t.find(t=>t.assistantId===e);if(n)return n.assistantId}return t[0]?.assistantId}function NU(){let e=(0,H.useContext)(OM),{mutateAsync:t}=AU(),{mutateAsync:n}=kU(),[r,i]=(0,H.useState)(null),a=(0,H.useRef)(null),o=(0,H.useRef)(null),s=gT(),c=vT(),l=c?Number(c):null,u=bT();(0,H.useEffect)(()=>{if(!e){i(null);return}if(!s||!l||Number.isNaN(l)||l<=0||!u){i(null),a.current=null,o.current=null;return}let r=jU(e.agentType)===`MULTI`,c=`${r?`multi`:`single`}:${l}:${s}`;if(a.current===c||o.current===c)return;o.current=c;let d=!0;return(async()=>{try{let e=r?await n({page:1,limit:10,customerToken:s,tenantId:l}):await t({page:1,limit:20,agent_type:`SINGLE`,customerToken:s,tenantId:l});if(!d)return;i(vU(e)),a.current=c}catch{d&&(i([]),a.current=null)}finally{o.current===c&&(o.current=null)}})(),()=>{d=!1}},[e?.agentType,n,t,s,l,u]);let d=(0,H.useMemo)(()=>{if(!e)return null;let t=r??[],n=jU(e.agentType),i=MU(e.assistantId,t),a=t.find(e=>e.assistantId===i);return{...e,assistantId:i,agentType:n,assistantLabel:a?.label,assistantInitialMessage:a?.initialMessage}},[e,r]);if(!d)throw Error(`AgentConfigContext is missing.`);return d}function PU(){let e=(0,H.useContext)(kM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function FU(){let e=PU();return(0,H.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}function IU(e){return(0,H.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}var LU=OU({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e})=>DU.sendAgentMessage(e)}),RU=OU({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e})=>DU.sendAgenticAppChat(e)});function zU(){let e=LU(),t=RU();return{sendChatMessage:(0,H.useCallback)(async n=>{let{agentType:r,message:i,selectedAgentId:a,customerId:o,customerToken:s,chatId:c}=n;return r===`MULTI`?t.mutateAsync({payload:{message:i,app_id:a,...o?{unique_user_id:o}:{}}}):e.mutateAsync({payload:{message:i,chat_id:c,assistant_id:a,is_sync:!0,...o?{unique_user_id:o}:{},tool_headers:{_default:{Authorization:`Bearer ${s}`}}}})},[e,t])}}function BU(e){return e.assistantId??null}function VU(e){return BU(e)?e.assistantInitialMessage??null:null}function HU(e){return e.customerId}function UU(e){return e.customerToken}function WU(e){return e.language??null}function GU(e){if(!e||typeof e!=`object`)return null;let t=e,n=t.message??(Array.isArray(t.messages)?t.messages[0]:null);if(!n||typeof n!=`object`)return null;let r=n.chat_id,i=typeof r==`number`&&Number.isFinite(r)?r:null,a=typeof n.message==`string`?n.message:``,o=typeof n.created_at==`string`?n.created_at:new Date().toISOString();return a?{chatId:i,text:a,createdAt:o}:null}function KU(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function qU(){let e=PU(),t=FU(),n=NU(),{agentType:r,isMultiAgent:i}=IU(n.agentType),{sendChatMessage:a}=zU(),[o,s]=(0,H.useState)([]),[c,l]=(0,H.useState)(``),[u,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(null),g=(0,H.useRef)(!1),_=BU(n),v=i?n.assistantLabel??`Assistant`:`Assistant`,y=(0,H.useCallback)(e=>{let t={id:KU(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),b=(0,H.useCallback)((e,t)=>{let n={id:KU(),sentBy:`assistant`,text:e,createdAt:t};s(e=>[...e,n])},[]),x=(0,H.useCallback)(async(o,s)=>{if(!o.trim())return;if(l(``),s?.showUserBubble!==!1&&y(o),!e||!n){h(`Chat is not configured.`);return}if(!_){h(`Chat configuration is missing.`);return}let c=HU(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}p(!0),h(null);try{let e=GU(await a({agentType:r,message:o,selectedAgentId:_,customerId:c||void 0,customerToken:f??``,chatId:u}));if(!e)return;e.chatId!==null&&d(e.chatId),b(e.text,e.createdAt)}catch{h(`Something went wrong. Please try again.`)}finally{p(!1)}},[e,n,u,y,b,a,t,r,i]);return{messages:o,composerText:c,setComposerText:l,isLoading:f,error:m,sendMessage:x,sendInitialMessage:(0,H.useCallback)(async()=>{if(g.current||f||o.length>0||!e||!n||!BU(n))return!1;let t=HU(e),r=VU(n)?.trim(),i=null;return i=r?t?`${r} ${t}`.trim():r:t?`Hello, my customer id is ${t}`:`Hello`,i.trim()?(g.current=!0,await x(i,{showUserBubble:!1}),!0):!1},[e,n,f,o.length,x]),resetChat:(0,H.useCallback)(()=>{s([]),l(``),d(null),h(null),g.current=!1},[]),agentDisplayName:v,canSend:c.trim().length>0}}function JU(e,t){let n=(0,H.useRef)([]);return{actions:(0,H.useMemo)(()=>{let t=[...e].reverse().find(e=>e.sentBy===`assistant`);if(!t)return n.current;let r=ZV(t.text).find(e=>e.type===`widget`&&e.config.type===`actions`),i=r?.type===`widget`?r.config.actions??[]:[];return i.length>0&&(n.current=i),n.current},[e]),handleActionClick:(0,H.useCallback)(e=>{t(e.buttonText)},[t])}}function YU(e={}){let{axis:t=`y`,direction:n=1,onResizeChange:r}=e,[i,a]=(0,H.useState)(0),o=(0,H.useRef)({startPos:0,startOffset:0}),{startInteraction:s}=FM(),c=t===`y`?`ns-resize`:t===`x`?`ew-resize`:`nwse-resize`;return{offset:i,handlePointerDown:(0,H.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let l=t===`y`?e.clientY:e.clientX,u=i;o.current={startPos:l,startOffset:u},s({cursor:c,onMove:e=>{let i;i=t===`y`?-(e.clientY-l):(e.clientX-l)*n;let o=u+i;a(o),r?.(o)}})},[i,t,n,c,r,s]),style:{cursor:c,touchAction:`none`}}}var XU=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function ZU(e,t,n,r,i){let a=(0,H.useRef)(Math.max(280,t??420)),o=(0,H.useRef)(n??!1),s=(0,H.useRef)(null),c=(0,H.useCallback)(()=>{let t=e?.hostContainerSelector,n=[...t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[],...XU];for(let e of n){let t=document.querySelector(e);if(t)return t}return document.body},[e?.hostContainerSelector]),l=(0,H.useCallback)(e=>{let t=document.documentElement;if(e===null?t.style.removeProperty(`--agent-widget-panel-width`):t.style.setProperty(`--agent-widget-panel-width`,`${e}px`),e===null){if(s.current){let{element:e,inlinePaddingBefore:t}=s.current;e.style.paddingRight=t,s.current=null}return}if(!s.current||!document.contains(s.current.element)){let e=c();if(!e)return;s.current={element:e,inlinePaddingBefore:e.style.paddingRight,widthApplied:0}}let{element:n,inlinePaddingBefore:r,widthApplied:i}=s.current;e!==i&&(n.style.paddingRight=r,n.style.paddingRight=`calc(${r||`0px`} + ${e}px)`,s.current.widthApplied=e)},[c]),u=YU({axis:`x`,direction:-1,onResizeChange:(0,H.useCallback)(e=>{let n=Math.max(280,(t??420)+e);a.current=n,l(n)},[t,l])});(0,H.useEffect)(()=>{o.current=n??!1},[n]),(0,H.useEffect)(()=>{let e=Math.max(280,t??420);a.current=e,o.current&&l(e)},[t,l]),(0,H.useEffect)(()=>{if(!n){l(null),document.documentElement.removeAttribute(`data-agent-widget-open`);return}return l(a.current),document.documentElement.setAttribute(`data-agent-widget-open`,`true`),()=>{l(null),document.documentElement.removeAttribute(`data-agent-widget-open`)}},[n,l]);let d=u?Math.max(280,(t??420)+u.offset):t??420,f=r===`100%`||r===`100vh`,p=`var(--mantine-custom-space-150)`,m=i??0;return{panelResizableWidth:u,actualWidth:d,shellGap:p,floatingTop:m?`calc(${m}px + ${p})`:p,floatingHeight:f?`calc(100vh - ${m}px - ${p} - ${p})`:typeof r==`number`?`${r}px`:r??`100%`,floatingMaxHeight:`calc(100vh - ${m}px - ${p} - ${p})`}}function QU(){let e=PU(),{runtimeInfo:t,setRuntimeInfo:n}=bU(),r=(0,H.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=HU(e),r=await UU(e),i=gT();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,H.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function $U(){let e=PU();return(0,H.useMemo)(()=>e&&WU(e)||`en-US`,[e])}function eW(e={}){let{lang:t=`en-EN`,continuous:n=!0,interimResults:r=!0,onResult:i,onError:a,onTextChange:o,pauseOnSubmit:s=!1}=e,[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(``),[f,p]=(0,H.useState)(!1),m=(0,H.useRef)(null),h=(0,H.useRef)(``),g=(0,H.useRef)(!1),_=(0,H.useRef)(!1),v=(0,H.useRef)(``),y=(0,H.useRef)(``),b=(0,H.useRef)(null),x=(0,H.useRef)(!1),S=(0,H.useRef)(o),C=(0,H.useRef)(c);(0,H.useEffect)(()=>{S.current=o,C.current=c}),(0,H.useEffect)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(typeof e!=`function`){p(!1);return}let o;try{o=new e,p(!0)}catch(e){console.log(`useAgentSpeechToText: Speech recognition is present but not constructable`,e),p(!1);return}return o.lang=t,o.continuous=n,o.interimResults=r,o.onresult=e=>{if(x.current)return;_.current=!0;let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r],a=i[0].transcript;i.isFinal?t+=a+` `:n+=a}t&&(h.current=(h.current+` `+t).trim());let r=(h.current+` `+n).trim();if(d(r),i?.(r,!!t),S.current)if(t){b.current!=null&&(cancelAnimationFrame(b.current),b.current=null);let e=v.current.trim(),t=[e,r.replace(e,``).trim()].filter(Boolean).join(` `).trim();v.current=t,S.current(t)}else y.current=r,b.current??=requestAnimationFrame(()=>{b.current=null;let e=y.current;S.current?.(e)})},o.onerror=e=>{console.log(`useAgentSpeechToText: Speech recognition error`,e.error),l(!1),a?.(e.error)},o.onend=()=>{if(g.current||!C.current){l(!1);return}queueMicrotask(()=>{if(!g.current)try{m.current?.start()}catch{l(!1)}})},m.current=o,()=>{m.current&&m.current.stop()}},[t,n,r,i,a]);let w=(0,H.useCallback)(()=>{if(!(!m.current||!f))try{d(``),h.current=``,g.current=!1,_.current=!1,x.current=!1,v.current=``,y.current=``,b.current!=null&&(cancelAnimationFrame(b.current),b.current=null),m.current.start(),l(!0)}catch(e){console.log(`useAgentSpeechToText: Failed to start speech recognition`,e),a?.(`Failed to start speech recognition`)}},[f,a]),T=(0,H.useCallback)(()=>{if(m.current)try{g.current=!0,m.current.stop(),l(!1)}catch(e){console.log(`useAgentSpeechToText: Failed to stop speech recognition`,e)}},[]);return{isListening:c,transcript:u,isSupported:f,startListening:w,stopListening:T,toggleListening:(0,H.useCallback)(()=>{c?T():w()},[c,w,T]),reset:(0,H.useCallback)(()=>{x.current=!0,v.current=``,y.current=``,b.current!=null&&(cancelAnimationFrame(b.current),b.current=null),s&&setTimeout(()=>{x.current=!1},500)},[s])}}var tW={bottom:24,right:24},nW=1e4;function rW(e){return{panelWidth:e?.panelWidth??420,panelHeight:e?.panelHeight??`100%`,panelHeaderHeight:e?.panelHeaderHeight??56,panelTopOffset:e?.panelTopOffset,zIndex:e?.zIndex??nW,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??tW.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??tW.right}}}}function iW({isListening:e,stopListening:t,reset:n,sendMessage:r,composerText:i,setComposerText:a,startListening:o,close:s}){return{handleSubmit:()=>{e&&t(),n(),r(i)},handleToggleVoice:()=>{e?t():(a(``),o())},handleClose:()=>{e&&t(),s()}}}var aW=64;function oW(e,t={}){let{enabled:n=!0,behavior:r=`smooth`}=t,i=(0,H.useRef)(null),a=(0,H.useRef)(!0);return(0,H.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{a.current=e.scrollHeight-e.scrollTop-e.clientHeight<=aW},n=()=>{t()};return e.addEventListener(`scroll`,n),()=>e.removeEventListener(`scroll`,n)},[]),(0,H.useEffect)(()=>{if(!n||!a.current)return;let e=i.current;if(!e)return;let t=()=>{let t=globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?`auto`:r;requestAnimationFrame(()=>{let n=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTo({top:n,behavior:t})})};requestAnimationFrame(()=>requestAnimationFrame(t))},e),i}var sW=OU({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>DU.loginToGenai(e,t)}),cW=new hE(`useGenaiLogin`),lW=null,uW=null;function dW(e=!1){let t=(0,H.useContext)(OM),{mutateAsync:n}=sW(),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(null);return(0,H.useEffect)(()=>{(async()=>{let r=gT();if(r&&!e){c(r);return}let a=t?.serviceAccount&&t?.serviceKey&&t?.tenantId?{serviceAccount:t.serviceAccount,serviceKey:t.serviceKey,tenantId:t.tenantId}:null;if(!a)return;u(a);let s=`${a.serviceAccount}::${a.serviceKey}`;if(lW===s&&!e){uW&&c(await uW);return}e&&(lW=null,uW=null),lW=s,i(!0),o(null),uW=(async()=>(await n({serviceAccount:a.serviceAccount,serviceKey:a.serviceKey})).access_token??null)();try{c(await uW)}catch(e){cW.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),o(`Failed to authenticate with GenAI service`)}finally{uW=null,i(!1)}})()},[t,n,e]),{isLoggingIn:r,loginError:a,loginToken:s,genaiInit:l}}var fW=OU({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>DU.switchTenant(e,t)}),pW=new hE(`useGenaiTenantSwitch`),mW=null,hW=null;function gW(e,t,n=!1){let{mutateAsync:r}=fW(),[i,a]=(0,H.useState)(!1),[o,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{(async()=>{if(!e||!t)return;let i=gT();if(i&&i!==e&&!n){l(!0);return}if(hW===e&&!n){mW&&(await mW,l(!!gT()));return}n&&(hW=null,mW=null),hW=e,a(!0),s(null),mW=(async()=>{await r({tenant_id:t,token:e})})();try{await mW,l(!0)}catch(e){pW.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),s(`Failed to switch tenant`)}finally{mW=null,a(!1)}})()},[e,t,r,n]),{isSwitching:i,switchError:o,hasToken:c}}function _W(e=!1){let{isLoggingIn:t,loginError:n,loginToken:r,genaiInit:i}=dW(e),{isSwitching:a,switchError:o,hasToken:s}=gW(r,i?.tenantId,e);return{isAuthenticating:t||a,authError:n??o,hasToken:s}}function vW(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Wt({key:n?RT.PANEL_OPEN:`panel-state-${Date.now()}`,defaultValue:t,getInitialValueInEffect:!1}),a=(0,H.useRef)(!1);return(0,H.useEffect)(()=>{r&&!a.current&&e.onOpen&&(a.current=!0,e.onOpen())},[r,e.onOpen]),(0,H.useEffect)(()=>{let e=document.querySelector(`main`)||document.querySelector(`.main-content`)||document.body;return r?e?.classList.add(`panel-open`):(e?.classList.remove(`panel-open`),e?.style.removeProperty(`margin-right`)),()=>{e?.classList.remove(`panel-open`),e?.style.removeProperty(`margin-right`)}},[r]),{isOpen:r,open:(0,H.useCallback)(async()=>{i(!0),e.onOpen&&!a.current&&(a.current=!0,await e.onOpen())},[i,e.onOpen]),close:(0,H.useCallback)(()=>{i(!1)},[i]),toggle:(0,H.useCallback)(()=>{i(e=>!e)},[i]),setOpen:(0,H.useCallback)(e=>{i(e)},[i])}}function yW({runtime:e,uiOptions:t}){let n=e.forceReAuth,{isAuthenticating:r,hasToken:i}=_W(n),{panelWidth:a,panelHeight:o,panelHeaderHeight:s,panelTopOffset:c,zIndex:l,fabPosition:u}=rW(t),d=(0,H.useRef)(!1),{messages:f,composerText:p,setComposerText:m,isLoading:h,error:g,sendMessage:_,sendInitialMessage:v,agentDisplayName:y,canSend:b}=qU(),{actions:x,handleActionClick:S}=JU(f,m),{runtimeInfo:C,refreshRuntimeInfo:w}=QU(),{isOpen:T,open:E,close:D}=vW({defaultOpen:!1,persist:!0,onOpen:async()=>{d.current||(d.current=!0,await w())}});(0,H.useEffect)(()=>{(async()=>{d.current&&T&&!r&&i&&await v()&&(d.current=!1)})()},[T,r,i,v]);let O=oW([f.length,h]),{isListening:k,isSupported:A,startListening:j,stopListening:M,reset:N}=eW({lang:$U(),continuous:!0,pauseOnSubmit:!0,onTextChange:m}),{panelResizableWidth:P,actualWidth:ee,shellGap:F,floatingTop:I,floatingHeight:te,floatingMaxHeight:ne}=ZU(t,a,T,o,c),{handleSubmit:re,handleToggleVoice:ie,handleClose:L}=iW({isListening:k,stopListening:M,reset:N,sendMessage:_,composerText:p,setComposerText:m,startListening:j,close:D});return(0,U.jsxs)(U.Fragment,{children:[!T&&(0,U.jsx)(BM,{onClick:()=>void E(),zIndex:l,position:u,label:y}),T&&(0,U.jsx)(dU,{visible:!0,onClose:L,messages:f,composerText:p,onComposerTextChange:m,isLoading:h,error:g,canSend:b,onSubmit:re,actions:x,onActionClick:S,isListening:k,isVoiceSupported:A,onToggleVoice:ie,panelTitle:y,runtimeInfo:C,scrollViewportRef:O,actualWidth:ee,floatingTop:I,floatingHeight:te,floatingMaxHeight:ne,shellGap:F,panelHeaderHeight:s,panelResizableWidth:P,zIndex:l})]})}function bW(e){return(0,U.jsx)(yW,{...e})}function xW(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function SW(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var CW=(0,H.forwardRef)((e,t)=>{let{config:n,runtime:r,uiOptions:i,className:a,style:o,rootElement:s}=e,c=(0,H.useRef)(null),l=SW(n);Pe.locale||Pe.activate(`en`),EE(l,n);let u=(0,H.useMemo)(()=>CM({themeName:i?.themeName}),[i?.themeName]);return(0,U.jsx)(PM,{appConfig:l,config:n,runtime:r,theme:(0,H.useMemo)(()=>i?.theme?Vr(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,U.jsx)(`div`,{className:a,ref:e=>{c.current=e,xW(t,e)},style:o,children:(0,U.jsx)(bW,{config:n,runtime:r,uiOptions:i})})})});CW.displayName=`Widget`;var wW=`:root,
402
+ `)}function KH(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:mH(t)}function qH(e,t){return(0,H.useMemo)(()=>{let n=$V(e),r=KH(n);if(r)return[{type:`markdown`,key:`json-0`,content:UH(GH(r))}];let i=WV(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=WH(a,e.content,o);continue}try{let n=GV(e.dsl);if(!n){let t=KH(e.dsl);o=WH(a,t?GH(t):e.raw,o);continue}let r=jV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=WH(a,GH(r.payload),o)}catch(t){VH.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=WH(a,e.raw,o)}}return a},[e,t])}var JH={agentChatMdRenderer:`_agentChatMdRenderer_5jigp_1`},YH=(0,H.memo)(({content:e,onWidgetEvent:t})=>{let n=qH(e,t);return(0,U.jsx)(q,{className:JH.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,U.jsx)(XN,{html:e.content},e.key):(0,U.jsx)(q,{children:e.widget},e.key))})});YH.displayName=`AgentMarkdownRenderer`;var XH={body:`_body_1vtnd_1`,messageBubble:`_messageBubble_1vtnd_21`,messageBubbleUser:`_messageBubbleUser_1vtnd_33`,userText:`_userText_1vtnd_54`,messageBubbleAssistant:`_messageBubbleAssistant_1vtnd_62`,messageList:`_messageList_1vtnd_84`};function ZH({messages:e,isLoading:t,error:n,scrollViewportRef:r,onWidgetEvent:i}){return(0,U.jsx)(By,{className:XH.body,gap:0,children:(0,U.jsx)(ol,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:r,children:(0,U.jsxs)(By,{className:XH.messageList,gap:0,children:[n&&(0,U.jsx)(Wf,{color:`red`,variant:`light`,radius:`md`,children:n}),e.map(e=>(0,U.jsx)(q,{className:`${XH.messageBubble} ${e.sentBy===`user`?XH.messageBubbleUser:XH.messageBubbleAssistant}`,children:e.sentBy===`assistant`?(0,U.jsx)(YH,{content:e.text,onWidgetEvent:i}):(0,U.jsx)(Yf,{className:XH.userText,children:e.text})},e.id)),t&&(0,U.jsx)(q,{className:`${XH.messageBubble} ${XH.messageBubbleAssistant}`,children:(0,U.jsx)(HM,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})})]})})})}var QH={root:`_root_h7hgt_1`,input:`_input_h7hgt_6`,section:`_section_h7hgt_34`};function $H({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,U.jsx)(Rb,{placeholder:r?`Listening...`:`Ask me anything...`,value:e,onChange:e=>t(e.currentTarget.value),disabled:n,radius:`md`,size:`md`,rightSection:a,rightSectionWidth:o,rightSectionPointerEvents:`all`,classNames:{root:QH.root,input:QH.input,section:QH.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function eU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...GF(e),...t,children:[(0,U.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`}),(0,U.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,U.jsx)(`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`})]})}function tU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...GF(e),...t,children:(0,U.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function nU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Vj();return(0,U.jsx)(uy,{label:e?`Stop recording`:`Voice input`,children:(0,U.jsx)(hu,{onClick:n,disabled:t,size:r??`lg`,radius:`md`,variant:e?`filled`:`subtle`,color:e?`red`:`accent`,"aria-label":e?`Stop voice recording`:`Start voice recording`,styles:{root:e?void 0:{color:i.other.color[`secondary-default`],backgroundColor:`transparent`,boxShadow:`inset 0 0 0 1px ${i.other.color[`secondary-light`]}33`}},children:e?(0,U.jsx)(tU,{size:`sm`}):(0,U.jsx)(eU,{size:`sm`})})})}function rU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...GF(e),...t,children:[(0,U.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,U.jsx)(`path`,{d:`M22 2 11 13`})]})}var iU={footer:`_footer_zlzuq_1`,actionGroup:`_actionGroup_zlzuq_8`,poweredBy:`_poweredBy_zlzuq_12`,sendButton:`_sendButton_zlzuq_18`};function aU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,isVoiceSupported:i,canSend:a,onSubmit:o,onToggleVoice:s}){let c=i?74:40;return(0,U.jsxs)(By,{className:iU.footer,gap:`sm`,children:[(0,U.jsx)($H,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:c,rightSection:(0,U.jsxs)(Tu,{className:iU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,U.jsx)(nU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),(0,U.jsx)(hu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`filled`,color:`accent`,className:iU.sendButton,"aria-label":`Send message`,children:(0,U.jsx)(rU,{size:`sm`})})]})}),(0,U.jsx)(Yf,{ta:`center`,size:`xs`,c:`dimmed`,className:iU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function oU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...GF(e),...t,children:[(0,U.jsx)(`rect`,{x:`4`,y:`4`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`}),(0,U.jsx)(`rect`,{x:`4`,y:`9.75`,width:`10`,height:`2.5`,rx:`1.2`,fill:`currentColor`,opacity:`0.88`}),(0,U.jsx)(`rect`,{x:`4`,y:`15.5`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`})]})}function sU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...GF(e),...t,children:(0,U.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var cU={header:`_header_5x292_19`,headerLeft:`_headerLeft_5x292_31`,headerInfo:`_headerInfo_5x292_36`,orbContainer:`_orbContainer_5x292_40`,orbOuter:`_orbOuter_5x292_54`,orbPulse:`_orbPulse_5x292_1`,orbMiddle:`_orbMiddle_5x292_63`,orbInner:`_orbInner_5x292_72`,orbFloat:`_orbFloat_5x292_1`,headerMeta:`_headerMeta_5x292_85`,statusDot:`_statusDot_5x292_89`,statusText:`_statusText_5x292_103`,closeButton:`_closeButton_5x292_112`,title:`_title_5x292_123`,topSubHeader:`_topSubHeader_5x292_135`,subHeaderLeft:`_subHeaderLeft_5x292_145`,subHeaderIcon:`_subHeaderIcon_5x292_151`,subHeaderTitle:`_subHeaderTitle_5x292_162`,subHeaderStatus:`_subHeaderStatus_5x292_168`};function lU({panelTitle:e,isLoading:t,isOnline:n,onClose:r}){let i=Vj();return(0,U.jsxs)(Tf,{className:cU.header,align:`center`,justify:`space-between`,children:[(0,U.jsxs)(Tu,{className:cU.headerLeft,wrap:`nowrap`,gap:`sm`,align:`center`,children:[(0,U.jsxs)(q,{className:cU.orbContainer,"data-loading":t||void 0,children:[(0,U.jsx)(q,{className:cU.orbOuter}),(0,U.jsx)(q,{className:cU.orbMiddle}),(0,U.jsx)(q,{className:cU.orbInner,children:(0,U.jsx)(oU,{size:`sm`,color:i.other.color[`text-white`]})})]}),(0,U.jsxs)(By,{className:cU.headerInfo,gap:2,justify:`center`,children:[(0,U.jsx)(Yf,{className:cU.title,fw:800,children:e}),(0,U.jsxs)(Tu,{className:cU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,U.jsx)(q,{className:cU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,U.jsx)(Yf,{className:cU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,U.jsx)(hu,{variant:`subtle`,size:`lg`,radius:`md`,onClick:r,className:cU.closeButton,"aria-label":`Close agent chat`,children:(0,U.jsx)(sU,{size:`sm`})})]})}var uU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function dU({visible:e,onClose:t,messages:n,composerText:r,onComposerTextChange:i,isLoading:a,error:o,canSend:s,onSubmit:c,isListening:l,isVoiceSupported:u,onToggleVoice:d,actions:f,onActionClick:p,panelTitle:m,runtimeInfo:h,scrollViewportRef:g,actualWidth:_=420,floatingTop:v=`var(--mantine-custom-space-150)`,floatingHeight:y=`100%`,floatingMaxHeight:b=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,shellGap:x=`var(--mantine-custom-space-150)`,panelHeaderHeight:S=56,panelResizableWidth:C,panelBorder:w,panelBorderRadius:T,zIndex:E}){let D=h.hasCustomerToken&&h.hasGenaiToken,O=e=>{if(e.type===`action-click`&&e.data){let t=f.find(t=>t.buttonText===e.data?.buttonText);t&&p(t)}};if(!e)return null;let k=typeof T==`number`?`${T}px`:T;return(0,U.jsxs)(q,{className:uU.root,style:{width:_,maxWidth:`calc(100vw - var(--mantine-custom-space-400) - var(--mantine-custom-space-400))`,height:y,maxHeight:b,top:v,right:x,zIndex:E,"--agent-widget-panel-header-height":`${S}px`,"--agent-widget-shell-gap":x,"--agent-widget-panel-border":w,"--agent-widget-panel-radius":k},children:[C&&(0,U.jsx)(q,{onPointerDown:C.handlePointerDown,className:uU.resizeHandle,style:C.style}),(0,U.jsxs)(q,{className:uU.surface,children:[(0,U.jsx)(lU,{panelTitle:m,isLoading:a,isOnline:D,onClose:t}),(0,U.jsx)(ZH,{messages:n,isLoading:a,error:o,scrollViewportRef:g,onWidgetEvent:O}),(0,U.jsx)(aU,{composerText:r,onComposerTextChange:i,isLoading:a,isListening:l,isVoiceSupported:u,canSend:s,onSubmit:c,onToggleVoice:d})]})]})}function fU(e){return(0,H.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function pU(e){return typeof e==`object`&&!!e}function mU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function hU(e){if(Array.isArray(e))return e.filter(pU);if(!pU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(pU);if(pU(n)){let e=hU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(pU);if(e.length>0)return e}return[]}function gU(e){let t=mU(e.assistantId??e.assistant_id??e.id??e.agentId??e.agent_id??e.appId??e.app_id);if(!t)return null;let n=e.description??e.appDescription??e.app_description??e.label??e.name??e.assistantName??e.assistant_name??e.agentName??e.agent_name??e.title,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.agentKey??e.agent_key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function _U(e){let t=mU(e.appId??e.app_id??e.id??e.assistantId??e.assistant_id);if(!t)return null;let n=e.description??e.name??e.label??e.title??e.appName??e.app_name,r=typeof n==`string`&&n.trim().length>0?n.trim():`Agent ${t}`,i=e.assistantKey??e.assistant_key??e.key??e.code,a=typeof i==`string`&&i.trim().length>0?i.trim():r.toLowerCase().replace(/\s+/g,`-`),o=e.initialMessage??e.initial_message??e.welcomeMessage??e.welcome_message,s=typeof o==`string`&&o.trim().length>0?o.trim():void 0;return{assistantId:t,label:r,assistantKey:a,...s?{initialMessage:s}:{}}}function vU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>_U(e)).filter(e=>e!==null);if(t.length>0)return t}let t=gU(e);return t?[t]:[]}function yU(e){return hU(e).flatMap(e=>vU(e))}var bU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},xU=dE(e=>({...bU,setRuntimeInfo:t=>e({runtimeInfo:t}),updateCustomerId:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,customerId:t}})),updateCustomerToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasCustomerToken:t}})),updateGenaiToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasGenaiToken:t}})),resetRuntimeInfo:()=>e({runtimeInfo:bU.runtimeInfo})}));async function SU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await TE.post(`/login`,n,{anonymous:!0,headers:{"Content-Type":`application/x-www-form-urlencoded`}});return r.data?.access_token&&(_T(r.data.access_token),xT(!1)),r.data}catch(e){throw e}}async function CU(e,t){try{let n=await TE.post(`/tenants/switch`,{tenant_id:e},{anonymous:!0,headers:{Authorization:`Bearer ${t}`}});return n.data?.data?.access_token&&_T(n.data.data.access_token),yT(n.data?.data?.tenant_id??e),xT(!0),n.data}catch(e){throw e}}async function wU(e){try{return(await TE.post(`/agent-message`,e,{anonymous:!0})).data}catch(e){throw e}}async function TU(e){try{return(await TE.post(`/agentic-app-chat`,e,{anonymous:!0})).data}catch(e){throw e}}async function EU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function DU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await TE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var OU={loginToGenai:SU,switchTenant:CU,sendAgentMessage:wU,sendAgenticAppChat:TU,fetchAssistants:EU,fetchAgenticApps:DU};function kU({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return eS({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var AU=kU({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>OU.fetchAgenticApps(e)}),jU=kU({mutationKey:[`genai`,`assistants`],mutationFn:async e=>OU.fetchAssistants(e)});function MU(e,t){return e&&t.includes(e)?e:t[0]}function NU(e,t,n){let{mutateAsync:r}=jU(),{mutateAsync:i}=AU(),{isMultiAgent:a}=fU(e),[o,s]=(0,H.useState)(null),c=(0,H.useRef)(null),l=(0,H.useRef)(null),u=gT(),d=vT(),f=d?Number(d):null,p=bT();(0,H.useEffect)(()=>{if(!n){s(null);return}if(!u||!f||Number.isNaN(f)||f<=0||!p){s(null),c.current=null,l.current=null;return}let e=`${a?`multi`:`single`}:${f}:${u}`;if(c.current===e||l.current===e)return;l.current=e;let t=!0;return(async()=>{try{let n=a?await i({page:1,limit:10,customerToken:u,tenantId:f}):await r({page:1,limit:20,agent_type:`SINGLE`,customerToken:u,tenantId:f});if(!t)return;s(yU(n)),c.current=e}catch{t&&(s([]),c.current=null)}finally{l.current===e&&(l.current=null)}})(),()=>{t=!1}},[n,i,r,u,f,a,p]);let m=o??[],h=MU(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function PU(){let e=(0,H.useContext)(OM),{agentType:t}=fU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=NU(e?.agentType,e?.assistantId,!!e),i=(0,H.useMemo)(()=>e?{...e,assistantId:n,agentType:t,assistantLabel:r?.label,assistantInitialMessage:r?.initialMessage}:null,[e,t,r,n]);if(!i)throw Error(`AgentConfigContext is missing.`);return i}function FU(){let e=(0,H.useContext)(kM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function IU(){let e=FU();return(0,H.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var LU=kU({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e})=>OU.sendAgentMessage(e)}),RU=kU({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e})=>OU.sendAgenticAppChat(e)});function zU(){let e=LU(),t=RU();return{sendChatMessage:(0,H.useCallback)(async n=>{let{agentType:r,message:i,selectedAgentId:a,customerId:o,customerToken:s,chatId:c}=n;return r===`MULTI`?t.mutateAsync({payload:{message:i,app_id:a,...o?{unique_user_id:o}:{}}}):e.mutateAsync({payload:{message:i,chat_id:c,assistant_id:a,is_sync:!0,...o?{unique_user_id:o}:{},tool_headers:{_default:{Authorization:`Bearer ${s}`}}}})},[e,t])}}function BU(e){return e.assistantId??null}function VU(e){return BU(e)?e.assistantInitialMessage??null:null}function HU(e){return e.customerId}function UU(e){return e.customerToken}function WU(e){return e.language??null}function GU(e){if(!e||typeof e!=`object`)return null;let t=e,n=t.message??(Array.isArray(t.messages)?t.messages[0]:null);if(!n||typeof n!=`object`)return null;let r=n.chat_id,i=typeof r==`number`&&Number.isFinite(r)?r:null,a=typeof n.message==`string`?n.message:``,o=typeof n.created_at==`string`?n.created_at:new Date().toISOString();return a?{chatId:i,text:a,createdAt:o}:null}function KU(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function qU(){let e=FU(),t=IU(),n=PU(),{agentType:r,isMultiAgent:i}=fU(n.agentType),{sendChatMessage:a}=zU(),[o,s]=(0,H.useState)([]),[c,l]=(0,H.useState)(``),[u,d]=(0,H.useState)(null),[f,p]=(0,H.useState)(!1),[m,h]=(0,H.useState)(null),g=(0,H.useRef)(!1),_=BU(n),v=i?n.assistantLabel??`Assistant`:`Assistant`,y=(0,H.useCallback)(e=>{let t={id:KU(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),b=(0,H.useCallback)((e,t)=>{let n={id:KU(),sentBy:`assistant`,text:e,createdAt:t};s(e=>[...e,n])},[]),x=(0,H.useCallback)(async(o,s)=>{if(!o.trim())return;if(l(``),s?.showUserBubble!==!1&&y(o),!e||!n){h(`Chat is not configured.`);return}if(!_){h(`Chat configuration is missing.`);return}let c=HU(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}p(!0),h(null);try{let e=GU(await a({agentType:r,message:o,selectedAgentId:_,customerId:c||void 0,customerToken:f??``,chatId:u}));if(!e)return;e.chatId!==null&&d(e.chatId),b(e.text,e.createdAt)}catch{h(`Something went wrong. Please try again.`)}finally{p(!1)}},[e,n,u,y,b,a,t,r,i]);return{messages:o,composerText:c,setComposerText:l,isLoading:f,error:m,sendMessage:x,sendInitialMessage:(0,H.useCallback)(async()=>{if(g.current||f||o.length>0||!e||!n||!BU(n))return!1;let t=HU(e),r=VU(n)?.trim(),i=null;return i=r?t?`${r} ${t}`.trim():r:t?`Hello, my customer id is ${t}`:`Hello`,i.trim()?(g.current=!0,await x(i,{showUserBubble:!1}),!0):!1},[e,n,f,o.length,x]),resetChat:(0,H.useCallback)(()=>{s([]),l(``),d(null),h(null),g.current=!1},[]),agentDisplayName:v,canSend:c.trim().length>0}}function JU(e,t){let n=(0,H.useRef)([]);return{actions:(0,H.useMemo)(()=>{let t=[...e].reverse().find(e=>e.sentBy===`assistant`);if(!t)return n.current;let r=ZV(t.text).find(e=>e.type===`widget`&&e.config.type===`actions`),i=r?.type===`widget`?r.config.actions??[]:[];return i.length>0&&(n.current=i),n.current},[e]),handleActionClick:(0,H.useCallback)(e=>{t(e.buttonText)},[t])}}function YU(e={}){let{axis:t=`y`,direction:n=1,onResizeChange:r}=e,[i,a]=(0,H.useState)(0),o=(0,H.useRef)({startPos:0,startOffset:0}),{startInteraction:s}=FM(),c=t===`y`?`ns-resize`:t===`x`?`ew-resize`:`nwse-resize`;return{offset:i,handlePointerDown:(0,H.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let l=t===`y`?e.clientY:e.clientX,u=i;o.current={startPos:l,startOffset:u},s({cursor:c,onMove:e=>{let i;i=t===`y`?-(e.clientY-l):(e.clientX-l)*n;let o=u+i;a(o),r?.(o)}})},[i,t,n,c,r,s]),style:{cursor:c,touchAction:`none`}}}var XU=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function ZU(e,t,n,r,i){let a=(0,H.useRef)(Math.max(280,t??420)),o=(0,H.useRef)(n??!1),s=(0,H.useRef)(null),c=e?.reserveLayoutSpace??!0,l=(0,H.useCallback)(()=>{let t=e?.hostContainerSelector,n=[...t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[],...XU];for(let e of n){let t=document.querySelector(e);if(t)return t}return document.body},[e?.hostContainerSelector]),u=(0,H.useCallback)(e=>{let t=document.documentElement;if(!c){if(t.style.removeProperty(`--agent-widget-panel-width`),s.current){let{element:e,inlinePaddingBefore:t}=s.current;e.style.paddingRight=t,s.current=null}return}if(e===null?t.style.removeProperty(`--agent-widget-panel-width`):t.style.setProperty(`--agent-widget-panel-width`,`${e}px`),e===null){if(s.current){let{element:e,inlinePaddingBefore:t}=s.current;e.style.paddingRight=t,s.current=null}return}if(!s.current||!document.contains(s.current.element)){let e=l();if(!e)return;s.current={element:e,inlinePaddingBefore:e.style.paddingRight,widthApplied:0}}let{element:n,inlinePaddingBefore:r,widthApplied:i}=s.current;e!==i&&(n.style.paddingRight=r,n.style.paddingRight=`calc(${r||`0px`} + ${e}px)`,s.current.widthApplied=e)},[l,c]),d=YU({axis:`x`,direction:-1,onResizeChange:(0,H.useCallback)(e=>{let n=Math.max(280,(t??420)+e);a.current=n,u(n)},[t,u])});(0,H.useEffect)(()=>{o.current=n??!1},[n]),(0,H.useEffect)(()=>{let e=Math.max(280,t??420);a.current=e,o.current&&u(e)},[t,u]),(0,H.useEffect)(()=>{if(!n){u(null),document.documentElement.removeAttribute(`data-agent-widget-open`);return}return u(a.current),document.documentElement.setAttribute(`data-agent-widget-open`,`true`),()=>{u(null),document.documentElement.removeAttribute(`data-agent-widget-open`)}},[n,u]);let f=d?Math.max(280,(t??420)+d.offset):t??420,p=r===`100%`||r===`100vh`,m=typeof e?.panelGap==`number`?`${e.panelGap}px`:e?.panelGap??`var(--mantine-custom-space-150)`,h=i??0;return{panelResizableWidth:d,actualWidth:f,shellGap:m,floatingTop:h?`calc(${h}px + ${m})`:m,floatingHeight:p?`calc(100vh - ${h}px - ${m} - ${m})`:typeof r==`number`?`${r}px`:r??`100%`,floatingMaxHeight:`calc(100vh - ${h}px - ${m} - ${m})`}}function QU(){let e=FU(),{runtimeInfo:t,setRuntimeInfo:n}=xU(),r=(0,H.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=HU(e),r=await UU(e),i=gT();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,H.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function $U(){let e=FU();return(0,H.useMemo)(()=>e&&WU(e)||`en-US`,[e])}function eW(e={}){let{lang:t=`en-EN`,continuous:n=!0,interimResults:r=!0,onResult:i,onError:a,onTextChange:o,pauseOnSubmit:s=!1}=e,[c,l]=(0,H.useState)(!1),[u,d]=(0,H.useState)(``),[f,p]=(0,H.useState)(!1),m=(0,H.useRef)(null),h=(0,H.useRef)(``),g=(0,H.useRef)(!1),_=(0,H.useRef)(!1),v=(0,H.useRef)(``),y=(0,H.useRef)(``),b=(0,H.useRef)(null),x=(0,H.useRef)(!1),S=(0,H.useRef)(o),C=(0,H.useRef)(c);(0,H.useEffect)(()=>{S.current=o,C.current=c}),(0,H.useEffect)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(typeof e!=`function`){p(!1);return}let o;try{o=new e,p(!0)}catch(e){console.log(`useAgentSpeechToText: Speech recognition is present but not constructable`,e),p(!1);return}return o.lang=t,o.continuous=n,o.interimResults=r,o.onresult=e=>{if(x.current)return;_.current=!0;let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r],a=i[0].transcript;i.isFinal?t+=a+` `:n+=a}t&&(h.current=(h.current+` `+t).trim());let r=(h.current+` `+n).trim();if(d(r),i?.(r,!!t),S.current)if(t){b.current!=null&&(cancelAnimationFrame(b.current),b.current=null);let e=v.current.trim(),t=[e,r.replace(e,``).trim()].filter(Boolean).join(` `).trim();v.current=t,S.current(t)}else y.current=r,b.current??=requestAnimationFrame(()=>{b.current=null;let e=y.current;S.current?.(e)})},o.onerror=e=>{console.log(`useAgentSpeechToText: Speech recognition error`,e.error),l(!1),a?.(e.error)},o.onend=()=>{if(g.current||!C.current){l(!1);return}queueMicrotask(()=>{if(!g.current)try{m.current?.start()}catch{l(!1)}})},m.current=o,()=>{m.current&&m.current.stop()}},[t,n,r,i,a]);let w=(0,H.useCallback)(()=>{if(!(!m.current||!f))try{d(``),h.current=``,g.current=!1,_.current=!1,x.current=!1,v.current=``,y.current=``,b.current!=null&&(cancelAnimationFrame(b.current),b.current=null),m.current.start(),l(!0)}catch(e){console.log(`useAgentSpeechToText: Failed to start speech recognition`,e),a?.(`Failed to start speech recognition`)}},[f,a]),T=(0,H.useCallback)(()=>{if(m.current)try{g.current=!0,m.current.stop(),l(!1)}catch(e){console.log(`useAgentSpeechToText: Failed to stop speech recognition`,e)}},[]);return{isListening:c,transcript:u,isSupported:f,startListening:w,stopListening:T,toggleListening:(0,H.useCallback)(()=>{c?T():w()},[c,w,T]),reset:(0,H.useCallback)(()=>{x.current=!0,v.current=``,y.current=``,b.current!=null&&(cancelAnimationFrame(b.current),b.current=null),s&&setTimeout(()=>{x.current=!1},500)},[s])}}var tW={bottom:24,right:24},nW=1e4;function rW(e){return{panelWidth:e?.panelWidth??420,panelHeight:e?.panelHeight??`100%`,panelHeaderHeight:e?.panelHeaderHeight??56,panelTopOffset:e?.panelTopOffset,panelGap:e?.panelGap,panelBorder:e?.panelBorder,panelBorderRadius:e?.panelBorderRadius,zIndex:e?.zIndex??nW,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??tW.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??tW.right}}}}function iW({isListening:e,stopListening:t,reset:n,sendMessage:r,composerText:i,setComposerText:a,startListening:o,close:s}){return{handleSubmit:()=>{e&&t(),n(),r(i)},handleToggleVoice:()=>{e?t():(a(``),o())},handleClose:()=>{e&&t(),s()}}}var aW=64;function oW(e,t={}){let{enabled:n=!0,behavior:r=`smooth`}=t,i=(0,H.useRef)(null),a=(0,H.useRef)(!0);return(0,H.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{a.current=e.scrollHeight-e.scrollTop-e.clientHeight<=aW},n=()=>{t()};return e.addEventListener(`scroll`,n),()=>e.removeEventListener(`scroll`,n)},[]),(0,H.useEffect)(()=>{if(!n||!a.current)return;let e=i.current;if(!e)return;let t=()=>{let t=globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches?`auto`:r;requestAnimationFrame(()=>{let n=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTo({top:n,behavior:t})})};requestAnimationFrame(()=>requestAnimationFrame(t))},e),i}var sW=kU({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>OU.loginToGenai(e,t)}),cW=new hE(`useGenaiLogin`),lW=null,uW=null;function dW(e=!1){let t=(0,H.useContext)(OM),{mutateAsync:n}=sW(),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(null);return(0,H.useEffect)(()=>{(async()=>{let r=gT();if(r&&!e){c(r);return}let a=t?.serviceAccount&&t?.serviceKey&&t?.tenantId?{serviceAccount:t.serviceAccount,serviceKey:t.serviceKey,tenantId:t.tenantId}:null;if(!a)return;u(a);let s=`${a.serviceAccount}::${a.serviceKey}`;if(lW===s&&!e){uW&&c(await uW);return}e&&(lW=null,uW=null),lW=s,i(!0),o(null),uW=(async()=>(await n({serviceAccount:a.serviceAccount,serviceKey:a.serviceKey})).access_token??null)();try{c(await uW)}catch(e){cW.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),o(`Failed to authenticate with GenAI service`)}finally{uW=null,i(!1)}})()},[t,n,e]),{isLoggingIn:r,loginError:a,loginToken:s,genaiInit:l}}var fW=kU({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>OU.switchTenant(e,t)}),pW=new hE(`useGenaiTenantSwitch`),mW=null,hW=null;function gW(e,t,n=!1){let{mutateAsync:r}=fW(),[i,a]=(0,H.useState)(!1),[o,s]=(0,H.useState)(null),[c,l]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{(async()=>{if(!e||!t)return;let i=gT();if(i&&i!==e&&!n){l(!0);return}if(hW===e&&!n){mW&&(await mW,l(!!gT()));return}n&&(hW=null,mW=null),hW=e,a(!0),s(null),mW=(async()=>{await r({tenant_id:t,token:e})})();try{await mW,l(!0)}catch(e){pW.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),s(`Failed to switch tenant`)}finally{mW=null,a(!1)}})()},[e,t,r,n]),{isSwitching:i,switchError:o,hasToken:c}}function _W(e=!1){let{isLoggingIn:t,loginError:n,loginToken:r,genaiInit:i}=dW(e),{isSwitching:a,switchError:o,hasToken:s}=gW(r,i?.tenantId,e);return{isAuthenticating:t||a,authError:n??o,hasToken:s}}function vW(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Wt({key:n?RT.PANEL_OPEN:`panel-state-${Date.now()}`,defaultValue:t,getInitialValueInEffect:!1}),a=(0,H.useRef)(!1);return(0,H.useEffect)(()=>{r&&!a.current&&e.onOpen&&(a.current=!0,e.onOpen())},[r,e.onOpen]),(0,H.useEffect)(()=>{let e=document.querySelector(`main`)||document.querySelector(`.main-content`)||document.body;return r?e?.classList.add(`panel-open`):(e?.classList.remove(`panel-open`),e?.style.removeProperty(`margin-right`)),()=>{e?.classList.remove(`panel-open`),e?.style.removeProperty(`margin-right`)}},[r]),{isOpen:r,open:(0,H.useCallback)(async()=>{i(!0),e.onOpen&&!a.current&&(a.current=!0,await e.onOpen())},[i,e.onOpen]),close:(0,H.useCallback)(()=>{i(!1)},[i]),toggle:(0,H.useCallback)(()=>{i(e=>!e)},[i]),setOpen:(0,H.useCallback)(e=>{i(e)},[i])}}function yW({runtime:e,uiOptions:t}){let n=e.forceReAuth,{isAuthenticating:r,hasToken:i}=_W(n),{panelWidth:a,panelHeight:o,panelHeaderHeight:s,panelTopOffset:c,panelBorder:l,panelBorderRadius:u,zIndex:d,fabPosition:f}=rW(t),p=(0,H.useRef)(!1),{messages:m,composerText:h,setComposerText:g,isLoading:_,error:v,sendMessage:y,sendInitialMessage:b,agentDisplayName:x,canSend:S}=qU(),{actions:C,handleActionClick:w}=JU(m,g),{runtimeInfo:T,refreshRuntimeInfo:E}=QU(),{isOpen:D,open:O,close:k}=vW({defaultOpen:!1,persist:!0,onOpen:async()=>{p.current||(p.current=!0,await E())}});(0,H.useEffect)(()=>{(async()=>{p.current&&D&&!r&&i&&await b()&&(p.current=!1)})()},[D,r,i,b]);let A=oW([m.length,_]),{isListening:j,isSupported:M,startListening:N,stopListening:P,reset:ee}=eW({lang:$U(),continuous:!0,pauseOnSubmit:!0,onTextChange:g}),{panelResizableWidth:F,actualWidth:I,shellGap:te,floatingTop:ne,floatingHeight:re,floatingMaxHeight:ie}=ZU(t,a,D,o,c),{handleSubmit:L,handleToggleVoice:ae,handleClose:oe}=iW({isListening:j,stopListening:P,reset:ee,sendMessage:y,composerText:h,setComposerText:g,startListening:N,close:k});return(0,U.jsxs)(U.Fragment,{children:[!D&&(0,U.jsx)(BM,{onClick:()=>void O(),zIndex:d,position:f,label:x}),D&&(0,U.jsx)(dU,{visible:!0,onClose:oe,messages:m,composerText:h,onComposerTextChange:g,isLoading:_,error:v,canSend:S,onSubmit:L,actions:C,onActionClick:w,isListening:j,isVoiceSupported:M,onToggleVoice:ae,panelTitle:x,runtimeInfo:T,scrollViewportRef:A,actualWidth:I,floatingTop:ne,floatingHeight:re,floatingMaxHeight:ie,shellGap:te,panelHeaderHeight:s,panelResizableWidth:F,panelBorder:l,panelBorderRadius:u,zIndex:d})]})}function bW(e){return(0,U.jsx)(yW,{...e})}function xW(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function SW(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var CW=(0,H.forwardRef)((e,t)=>{let{config:n,runtime:r,uiOptions:i,className:a,style:o,rootElement:s}=e,c=(0,H.useRef)(null),l=SW(n);Pe.locale||Pe.activate(`en`),EE(l,n);let u=(0,H.useMemo)(()=>CM({themeName:i?.themeName}),[i?.themeName]);return(0,U.jsx)(PM,{appConfig:l,config:n,runtime:r,theme:(0,H.useMemo)(()=>i?.theme?Vr(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,U.jsx)(`div`,{className:a,ref:e=>{c.current=e,xW(t,e)},style:o,children:(0,U.jsx)(bW,{config:n,runtime:r,uiOptions:i})})})});CW.displayName=`Widget`;var wW=`:root,
403
403
  :host {
404
404
  color-scheme: var(--mantine-color-scheme);
405
405
  }