bstp-agent-widget 0.2.126 → 0.2.127
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/angular.cjs +3 -3
- package/dist/angular.mjs +181 -176
- package/dist/element.cjs +3 -3
- package/dist/element.mjs +171 -166
- package/dist/index.cjs +87 -87
- package/dist/index.mjs +5654 -5649
- package/dist/shadow.cjs +3 -3
- package/dist/shadow.mjs +164 -159
- package/package.json +1 -1
package/dist/angular.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[UC]=this[UC]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=WC(e);t[r]||(XC(n,e),t[r]=!0)}return Z.isArray(e)?e.forEach(r):r(e),this}};ZC.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),Z.reduceDescriptors(ZC.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Z.freezeMethods(ZC);function QC(e,t){let n=this||BC,r=t||n,i=ZC.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 $C(e){return!!(e&&e.__CANCEL__)}var ew=class extends pC{constructor(e,t,n){super(e??`canceled`,pC.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function tw(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pC(`Request failed with status code `+n.status,[pC.ERR_BAD_REQUEST,pC.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nw(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function rw(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 iw(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 aw=(e,t,n=3)=>{let r=0,i=rw(50,250);return iw(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)},ow=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sw=e=>(...t)=>Z.asap(()=>e(...t)),cw=PC.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,PC.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(PC.origin),PC.navigator&&/(msie|trident)/i.test(PC.navigator.userAgent)):()=>!0,lw=PC.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 uw(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function dw(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function fw(e,t,n){let r=!uw(t);return e&&(r||n==0)?dw(e,t):t}var pw=e=>e instanceof ZC?{...e}:e;function mw(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(pw(e),pw(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 hw=e=>{let t=mw({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=ZC.from(o),t.url=wC(fw(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(PC.hasStandardBrowserEnv||PC.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(PC.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(t)),r||r!==!1&&cw(t.url))){let e=i&&a&&lw.read(a);e&&o.set(i,e)}return t},gw=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=hw(e),i=r.data,a=ZC.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=ZC.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());tw(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 pC(`Request aborted`,pC.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new pC(t&&t.message?t.message:`Network Error`,pC.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||EC;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new pC(t,i.clarifyTimeoutError?pC.ETIMEDOUT:pC.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]=aw(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=aw(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new ew(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 _=nw(r.url);if(_&&PC.protocols.indexOf(_)===-1){n(new pC(`Unsupported protocol `+_+`:`,pC.ERR_BAD_REQUEST,e));return}h.send(i||null)})},_w=(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 pC?t:new ew(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new pC(`timeout of ${t}ms exceeded`,pC.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}},vw=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},yw=async function*(e,t){for await(let n of bw(e))yield*vw(n,t)},bw=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()}},xw=(e,t,n,r)=>{let i=yw(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})},Sw=64*1024,{isFunction:Cw}=Z,ww=(({Request:e,Response:t})=>({Request:e,Response:t}))(Z.global),{ReadableStream:Tw,TextEncoder:Ew}=Z.global,Dw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ow=e=>{e=Z.merge.call({skipUndefined:!0},ww,e);let{fetch:t,Request:n,Response:r}=e,i=t?Cw(t):typeof fetch==`function`,a=Cw(n),o=Cw(r);if(!i)return!1;let s=i&&Cw(Tw),c=i&&(typeof Ew==`function`?(e=>t=>e.encode(t))(new Ew):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Dw(()=>{let e=!1,t=new Tw,r=new n(PC.origin,{body:t,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return t.cancel(),e&&!r}),u=o&&s&&Dw(()=>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 pC(`Response type '${e}' is not supported`,pC.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(PC.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}=hw(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=_w([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]=ow(T,aw(sw(g)));s=xw(e.body,Sw,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&&ow(t,aw(sw(h),!0))||[];f=new r(xw(f.body,Sw,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)=>{tw(t,n,{data:E,headers:ZC.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 pC(`Network Error`,pC.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):pC.from(t,t&&t.code,e,C,t&&t.response)}}},kw=new Map,Aw=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=kw;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Ow(t)),l=c;return c};Aw();var jw={http:null,xhr:gw,fetch:{get:Aw}};Z.forEach(jw,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var Mw=e=>`- ${e}`,Nw=e=>Z.isFunction(e)||e===null||e===!1;function Pw(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,!Nw(r)&&(i=jw[(n=String(r)).toLowerCase()],i===void 0))throw new pC(`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 pC(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
317
317
|
`+e.map(Mw).join(`
|
|
318
318
|
`):` `+Mw(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Fw={getAdapter:Pw,adapters:jw};function Iw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ew(null,e)}function Lw(e){return Iw(e),e.headers=ZC.from(e.headers),e.data=QC.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Fw.getAdapter(e.adapter||BC.adapter,e)(e).then(function(t){return Iw(e),t.data=QC.call(e,e.transformResponse,t),t.headers=ZC.from(t.headers),t},function(t){return $C(t)||(Iw(e),t&&t.response&&(t.response.data=QC.call(e,e.transformResponse,t.response),t.response.headers=ZC.from(t.response.headers))),Promise.reject(t)})}var Rw=`1.14.0`,zw={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{zw[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Bw={};zw.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Rw+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new pC(r(i,` has been removed`+(t?` in `+t:``)),pC.ERR_DEPRECATED);return t&&!Bw[i]&&(Bw[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}},zw.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Vw(e,t,n){if(typeof e!=`object`)throw new pC(`options must be an object`,pC.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 pC(`option `+a+` must be `+n,pC.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pC(`Unknown option `+a,pC.ERR_BAD_OPTION)}}var Hw={assertOptions:Vw,validators:zw},Uw=Hw.validators,Ww=class{constructor(e){this.defaults=e||{},this.interceptors={request:new TC,response:new TC}}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=mw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Hw.assertOptions(n,{silentJSONParsing:Uw.transitional(Uw.boolean),forcedJSONParsing:Uw.transitional(Uw.boolean),clarifyTimeoutError:Uw.transitional(Uw.boolean),legacyInterceptorReqResOrdering:Uw.transitional(Uw.boolean)},!1),r!=null&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:Hw.assertOptions(r,{encode:Uw.function,serialize:Uw.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Hw.assertOptions(t,{baseUrl:Uw.spelling(`baseURL`),withXsrfToken:Uw.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=ZC.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||EC;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=[Lw.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=Lw.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=mw(this.defaults,e),wC(fw(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Z.forEach([`delete`,`get`,`head`,`options`],function(e){Ww.prototype[e]=function(t,n){return this.request(mw(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(mw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Ww.prototype[e]=t(),Ww.prototype[e+`Form`]=t(!0)});var Gw=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 ew(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 Kw(e){return function(t){return e.apply(null,t)}}function qw(e){return Z.isObject(e)&&e.isAxiosError===!0}var Jw={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(Jw).forEach(([e,t])=>{Jw[t]=e});function Yw(e){let t=new Ww(e),n=nS(Ww.prototype.request,t);return Z.extend(n,Ww.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Yw(mw(e,t))},n}var Xw=Yw(BC);Xw.Axios=Ww,Xw.CanceledError=ew,Xw.CancelToken=Gw,Xw.isCancel=$C,Xw.VERSION=Rw,Xw.toFormData=yC,Xw.AxiosError=pC,Xw.Cancel=Xw.CanceledError,Xw.all=function(e){return Promise.all(e)},Xw.spread=Kw,Xw.isAxiosError=qw,Xw.mergeConfig=mw,Xw.AxiosHeaders=ZC,Xw.formToJSON=e=>RC(Z.isHTMLForm(e)?new FormData(e):e),Xw.getAdapter=Fw.getAdapter,Xw.HttpStatusCode=Jw,Xw.default=Xw;var{Axios:Zw,AxiosError:Qw,CanceledError:$w,isCancel:eT,CancelToken:tT,VERSION:nT,all:rT,Cancel:iT,isAxiosError:aT,spread:oT,toFormData:sT,AxiosHeaders:cT,HttpStatusCode:lT,formToJSON:uT,getAdapter:dT,mergeConfig:fT}=Xw,pT=`genai_access_token`,mT=`genai_tenant_id`,hT=`genai_switch_ready`;function gT(e){try{let t=JSON.parse(atob(e.split(`.`)[1]));return t.exp?t.exp*1e3<Date.now():!1}catch{return!0}}function _T(){if(typeof sessionStorage<`u`){let e=sessionStorage.getItem(pT);return e&&gT(e)?(sessionStorage.removeItem(pT),null):e}return null}function vT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(pT,e)}function yT(){return typeof sessionStorage<`u`?sessionStorage.getItem(mT):null}function bT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(mT,String(e))}function xT(){return typeof sessionStorage<`u`?sessionStorage.getItem(hT)===`true`:!1}function ST(e){typeof sessionStorage<`u`&&sessionStorage.setItem(hT,String(e))}function CT(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 wT(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 TT=CT({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5});function ET(e,t){let n=e.getState(),r=wT(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function DT(e,t=TT){let n=e.id||_t();return ET(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}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:`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 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:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,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:`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 jT({...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 MT={danger:(0,U.jsx)(OT,{}),info:(0,U.jsx)(AT,{}),success:(0,U.jsx)(kT,{}),warning:(0,U.jsx)(jT,{})};function NT(e,t){let n=MT[e];DT({...t,variant:e,icon:n})}function PT(e){NT(`danger`,{title:Fe._({id:`SlfejT`}),...e})}function FT(){return Fe._({id:`Qlh+W2`})}function IT(e,t){return{}[e]}function LT(e){return e?{401:Fe._({id:`9cOLBO`}),403:Fe._({id:`qriaXz`}),404:Fe._({id:`373i3G`}),500:Fe._({id:`lkE00/`}),502:Fe._({id:`9dPdtH`}),503:Fe._({id:`Vw36Gt`}),504:Fe._({id:`3R0fAs`})}[e]:``}var RT=`react-starter-kit-`,zT=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]:`${RT}${n}`}),{});function BT(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 VT(){return BT(zT.DEBUG,!1),!0}function HT(){return VT()?BT(zT.SHOW_HTTP_ERROR_DEBUG_TOASTER,!1):!1}function UT(e){return e?.operationResultCode!==void 0}function WT(e){return e?.error!==void 0}function GT(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 KT(e){return UT(e)?e.description:WT(e)?e.error:e?.message||e?.errorCode||FT()}function qT(e){return e.code?IT(e.code)||FT():``}function JT(e){return{url:e.config?.url,method:e.config?.method?.toUpperCase(),status:e.response?.status,response:e.response?.data}}function YT(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function XT({url:e,method:t,status:n,response:r}){let i=r!=null&&Object.keys(r).length>0;return(0,U.jsxs)(Vy,{children:[[{label:Fe._({id:`IagCbF`}),value:e},{label:Fe._({id:`fiPesM`}),value:t},{label:Fe._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,U.jsxs)(Eu,{gap:4,children:[(0,U.jsxs)(Xf,{size:`xs`,fw:500,children:[e,`:`]}),(0,U.jsx)(Xf,{size:`xs`,children:t})]},n)),i&&(0,U.jsx)(Im,{block:!0,lh:1.2,children:YT(r)})]})}function ZT(e){let t=e.response?.data;return UT(t)?t.operationResultCode:WT(t)?t.error:t?.errorCode||t?.code||t?.message||``}function QT(e){return e.response?.data?.status||e.response?.status||e.status}function $T(e){let t=e.response?.data,n=ZT(e);if(n){let e=IT(n);if(e)return e}return KT(t)}function eE(e){let t=e.response?.data;return qT(t)||LT(QT(e))}function tE(e){return e.response?.data?GT(e)?eE(e):$T(e):e.message}function nE(e){return e.response?.data?.errorId}function rE(e){let t=tE(e),n=GT(e)?nE(e):void 0;return n?(0,U.jsxs)(Vy,{gap:8,children:[(0,U.jsx)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,U.jsxs)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Fe._({id:`jf+o1U`}),`: `,n]})]}):t}function iE(e){if(!e)return FT();if(HT()){let t=JT(e);return Object.values(t).some(Boolean)?(0,U.jsx)(Vy,{children:XT(t)}):rE(e)}return rE(e)}function aE(){return HT()?Fe._({id:`J5ej6L`}):Fe._({id:`SlfejT`})}function oE(e){PT({title:aE(),message:iE(e),autoClose:HT()?!1:5e3})}var sE=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},cE=(e=>e?sE(e):sE),lE=e=>e;function uE(e,t=lE){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 dE=e=>{let t=cE(e),n=e=>uE(t,e);return Object.assign(n,t),n},fE=(e=>e?dE(e):dE),pE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function mE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var hE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:mE(),spanId:mE().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=mE().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(),gE=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??VT(),minLogLevel:n.minLogLevel??e.globalConfig.minLogLevel}}createLogEntry(t,n,r){let i=hE.getCurrentContext(this.name)??hE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:pE[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||pE[t]<pE[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(){hE.startSpan(this.name)}clearTraceContext(){hE.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 gE(`KeycloakService`);var _E=null;function vE(){return _E?.token?`Bearer ${_E.token}`:void 0}function yE(){return _E}var bE=new Zx({queryCache:new Xx({onError:(e,t)=>{(t.meta?.handleGlobalError??!0)&&e instanceof Qw&&oE(e)}}),mutationCache:new qx({onError:(e,t,n,r)=>{(r.meta?.handleGlobalError??!0)&&e instanceof Qw&&oE(e)}}),defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:600*1e3},mutations:{retry:!1}}});function xE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?SE(r):t===`private`||n?CE(r):SE(r):r}function SE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function CE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function wE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function TE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Xw.create({baseURL:wE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=yE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=xE(e.url||``,e.accessScope,t));let i=_T(),a=yT();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=vE();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Fe.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 EE;function DE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;TE({baseUrl:n,prefix:r.crm}),TE({baseUrl:n,prefix:r.uiAuthz}),EE=TE({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 OE({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 kE({formatter:e,...t}){return(e||OE)(t)}function AE({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 jE({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=AE({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`)?jE({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function ME(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function NE(e){return e.current?.map(e=>e.map(e=>e.length))}function PE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=ME(i.key);a&&(i.preventDefault(),jE({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:NE(e)}))}function FE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD`)}function IE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function LE({minDate:e,maxDate:t}){let n=(0,Q.default)();return!e&&!t?FE(n):e&&(0,Q.default)(n).isBefore(e)?FE(e):t&&(0,Q.default)(n).isAfter(t)?FE(t):FE(n)}var RE=(0,H.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function zE(){let e=(0,H.use)(RE),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 BE({value:e,type:t,withTime:n}){let r=n?IE:FE;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 VE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,U.jsx)(`input`,{type:`hidden`,value:BE({value:e,type:t,withTime:i}),name:n,form:r})}VE.displayName=`@mantine/dates/HiddenDatesInput`;var HE={day:`m_396ce5cb`},UE=Cn((e,{size:t})=>({day:{"--day-size":at(t,`day-size`)}})),WE=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)(dl,{...G({name:u||`Day`,classes:HE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:UE,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()})});WE.classes=HE,WE.varsResolver=UE,WE.displayName=`@mantine/dates/Day`;function GE({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 KE={weekday:`m_18a3eca`},qE=Cn((e,{size:t})=>({weekdaysRow:{"--wr-fz":ct(t),"--wr-spacing":ot(t)}})),JE=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:KE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:qE,rootSelector:`weekdaysRow`}),_=zE(),v=GE({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]})});JE.classes=KE,JE.varsResolver=qE,JE.displayName=`@mantine/dates/WeekdaysRow`;function YE(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 XE(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 ZE({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=YE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Q.default)(XE(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 QE(e,t){return(0,Q.default)(e).format(`YYYY-MM`)===(0,Q.default)(t).format(`YYYY-MM`)}function $E(e,t){return t?(0,Q.default)(e).isAfter((0,Q.default)(t).subtract(1,`day`),`day`):!0}function eD(e,t){return t?(0,Q.default)(e).isBefore((0,Q.default)(t).add(1,`day`),`day`):!0}function tD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>eD(e,n)&&$E(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||QE(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Q.default)().isSame(e,`date`))||s[0]}var nD=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(nD.default);function rD(e){return(0,Q.default)(e.find(e=>(0,Q.default)(e).day()===1)).isoWeek()}var iD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},aD={withCellSpacing:!0},oD=Cn((e,{size:t})=>({weekNumber:{"--wn-fz":ct(t),"--wn-size":at(t,`wn-size`)}})),sD=K(e=>{let t=W(`Month`,aD,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:iD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:oD,rootSelector:`month`}),I=zE(),te=ZE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=tD({dates:te,minDate:FE(g),maxDate:FE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Ur({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!QE(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)(WE,{__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)||!eD(e,FE(_))||!$E(e,FE(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:rD(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)(JE,{__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})]})});sD.classes=iD,sD.varsResolver=oD,sD.displayName=`@mantine/dates/Month`;var cD={pickerControl:`m_dc6a3c71`},lD=Cn((e,{size:t})=>({pickerControl:{"--dpc-fz":ct(t),"--dpc-size":at(t,`dpc-size`)}})),uD=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)(dl,{...G({name:d||`PickerControl`,classes:cD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:lD,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})});uD.classes=cD,uD.varsResolver=lD,uD.displayName=`@mantine/dates/PickerControl`;function dD({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 fD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!dD({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 pD(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 mD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},hD={yearsListFormat:`YYYY`,withCellSpacing:!0},gD=K(e=>{let t=W(`YearsList`,hD,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:mD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=zE(),O=pD(c),k=fD({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)(uD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:dD({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})})});gD.classes=mD,gD.displayName=`@mantine/dates/YearsList`;function _D({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 vD({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!_D({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 yD(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 bD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},xD={monthsListFormat:`MMM`,withCellSpacing:!0},SD=K(e=>{let t=W(`MonthsList`,xD,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:bD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=zE(),O=yD(l),k=vD({months:O,minDate:FE(f),maxDate:FE(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)(uD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:_D({month:e,minDate:FE(f),maxDate:FE(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})})});SD.classes=bD,SD.displayName=`@mantine/dates/MonthsList`;var CD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},wD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},TD=Cn((e,{size:t})=>({calendarHeader:{"--dch-control-size":at(t,`dch-control-size`),"--dch-fz":ct(t)}})),ED=K(e=>{let t=W(`CalendarHeader`,wD,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:CD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:TD,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,H.createElement)(dl,{...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)(Pf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,H.createElement)(dl,{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)(dl,{...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)(Pf,{...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})});ED.classes=CD,ED.varsResolver=TD,ED.displayName=`@mantine/dates/CalendarHeader`;function DD(e){let t=pD(e);return[t[0][0],t[3][0]]}var OD={decadeLabelFormat:`YYYY`},kD=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`,OD,e),ee=zE(),[F,I]=DD(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)(ED,{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)(gD,{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})]})});kD.classes={...gD.classes,...ED.classes},kD.displayName=`@mantine/dates/DecadeLevel`;var AD={yearLabelFormat:`YYYY`},jD=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`,AD,e),I=zE(),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)(ED,{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)(SD,{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})]})});jD.classes={...ED.classes,...SD.classes},jD.displayName=`@mantine/dates/YearLevel`;var MD={monthLabelFormat:`MMMM YYYY`},ND=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`,MD,e),le=zE(),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)(ED,{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)(sD,{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})]})});ND.classes={...sD.classes,...ED.classes},ND.displayName=`@mantine/dates/MonthLevel`;var PD={levelsGroup:`m_30b26e33`},FD=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:PD,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})});FD.classes=PD,FD.displayName=`@mantine/dates/LevelsGroup`;var ID={numberOfColumns:1},LD=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`,ID,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)(kD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>PE({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)(FD,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});LD.classes={...FD.classes,...kD.classes},LD.displayName=`@mantine/dates/DecadeLevelGroup`;var RD={numberOfColumns:1},zD=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`,RD,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)(jD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>PE({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)(FD,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});zD.classes={...jD.classes,...FD.classes},zD.displayName=`@mantine/dates/YearLevelGroup`;var BD={numberOfColumns:1},VD=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`,BD,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)(ND,{month:oe,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>PE({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)(FD,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:ae,...oe,children:ce})});VD.classes={...FD.classes,...ND.classes},VD.displayName=`@mantine/dates/MonthLevelGroup`;var HD={input:`m_6fa5e2aa`},UD=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}=xf(`PickerInputBase`,{size:`sm`},e),A=(0,U.jsx)(bf.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)(gg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,U.jsx)(bf.Wrapper,{...n,children:(0,U.jsxs)(eu,{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)(eu.Target,{children:(0,U.jsx)(bf,{"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:Tn(HD.input,i?.input)},...k,children:d||(0,U.jsx)(bf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,U.jsx)(eu.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,U.jsx)(VE,{value:C,name:w,form:T,type:E,withTime:O})]})});UD.classes=HD,UD.displayName=`@mantine/dates/PickerInputBase`;var WD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,GD=(e,t)=>{let n=t?IE:FE;return Array.isArray(e)?e.map(n):n(e)};function KD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,H.useRef)(e),[o,s,c]=Yt({value:GD(t,i),defaultValue:GD(n,i),finalValue:WD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?WD(e):n,s(l))),[l,s,c]}function qD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function JD(e){return e===0?`month`:e===1?`year`:`decade`}function YD(e,t,n){return JD(gt(qD(e,0),qD(t,0),qD(n,2)))}var XD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},ZD=K(e=>{let t=W(`Calendar`,XD,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}=Ur({classNames:ue,styles:de,props:t}),[je,Me]=Yt({value:o?YD(o,i,r):void 0,defaultValue:a?YD(a,i,r):void 0,finalValue:YD(void 0,i,r),onChange:s}),[Ne,Pe]=KD({type:`default`,value:FE(c),defaultValue:FE(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)},Ue=()=>{let e=(0,Q.default)(Re).add(10*Ie,`year`).format(`YYYY-MM-DD`);ve?.(e),Pe(e)},V=()=>{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(),V()):t&&(e.preventDefault(),He());break;case`ArrowDown`:t&&n?(e.preventDefault(),Ue()):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,Ue,V]),(0,U.jsxs)(q,{ref:Jt(We,De),size:ge,"data-calendar":!0,"data-full-width":Te||void 0,...Oe,children:[je===`month`&&(0,U.jsx)(VD,{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)(zD,{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(YD(`month`,i,r)),_?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe}),je===`decade`&&(0,U.jsx)(LD,{decade:Re,minDate:R,maxDate:pe,yearsListFormat:se,getYearControlProps:ce,locale:me,onNext:Ue,onPrevious:V,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(YD(`year`,i,r)),g?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe})]})});ZD.classes={...LD.classes,...zD.classes,...VD.classes},ZD.displayName=`@mantine/dates/Calendar`;function QD(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 $D(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 eO({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=KD({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?$D(e,[f,u]):c[0]&&c[1]?$D(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 tO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},nO=Cn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":ct(t)}})),rO={type:`default`},iO=K(e=>{let t=W(`YearPicker`,rO,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}=QD(w),D=(0,H.useRef)(null),O=(0,H.useRef)(null),k=G({name:l||`YearPicker`,classes:tO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:nO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=eO({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Ur({classNames:n,styles:r,props:t}),I=(0,U.jsx)(ZD,{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)(dl,{...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]})});iO.classes={...ZD.classes,...tO},iO.varsResolver=nO,iO.displayName=`@mantine/dates/YearPicker`;var aO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},oO=Cn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":ct(t)}})),sO={type:`default`},cO=K(e=>{let t=W(`MonthPicker`,sO,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}=QD(T),O=(0,H.useRef)(null),k=(0,H.useRef)(null),A=G({name:l||`MonthPicker`,classes:aO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:oO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=eO({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Ur({classNames:n,styles:r,props:t}),te=(0,U.jsx)(ZD,{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)(dl,{...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]})});cO.classes={...ZD.classes,...aO},cO.varsResolver=oO,cO.displayName=`@mantine/dates/MonthPicker`;var lO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},uO=Cn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":ct(t)}})),dO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},fO=K(e=>{let t=W(`DatePicker`,dO,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}=QD(S),T=(0,H.useRef)(null),E=(0,H.useRef)(null),D=G({name:u||`DatePicker`,classes:lO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:uO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=eO({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Ur({classNames:c,styles:l,props:t}),F=(0,U.jsx)(ZD,{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`?QE(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)(dl,{...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]})});fO.classes=ZD.classes,fO.varsResolver=uO,fO.displayName=`@mantine/dates/DatePicker`;function pO(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 mO({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 hO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},gO=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}=xf(`DateInput`,hO,e),I=(0,H.useRef)(null),te=(0,H.useRef)(null),[ne,re]=(0,H.useState)(!1),{calendarProps:ie,others:L}=QD(F),ae=zE(),oe=m||(e=>{let t=(0,Q.default)(e,f,ae.getLocale(d)).toDate();return Number.isNaN(t.getTime())?pO(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]=KD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[fe,R]=KD({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&&mO({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)(bf.ClearButton,{onClick:()=>{ue(null),!de&&me(``),re(!1)},unstyled:E,...c}),be=o&&!!le&&!S&&!ee;return Et(()=>{le!==void 0&&!ne&&me(ce(le))},[le]),St(()=>re(!1),void 0,[I.current,te.current]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(bf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,U.jsxs)(eu,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,U.jsx)(eu.Target,{children:(0,U.jsx)(bf,{"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)(eu.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,U.jsx)(ZD,{__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`?QE(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)(VE,{name:C,form:w,value:le,type:`default`,withTime:p})]})});gO.classes={...bf.classes,...ZD.classes},gO.displayName=`@mantine/dates/DateInput`;function _O({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=zE(),[d,f]=rn(!1),[p,m]=KD({type:e,value:t,defaultValue:n,onChange:r}),h=kE({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 vO={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},yO=K(e=>{let t=W(`YearPickerInput`,vO,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}=Ur({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=QD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=_O({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(UD,{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)(iO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||LE({maxDate:v,minDate:_}):O||LE({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})})});yO.classes={...UD.classes,...iO.classes},yO.displayName=`@mantine/dates/YearPickerInput`;var bO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},xO=K(e=>{let t=W(`MonthPickerInput`,bO,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}=Ur({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=QD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=_O({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(UD,{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)(cO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||LE({maxDate:v,minDate:_}):O||LE({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})})});xO.classes={...UD.classes,...cO.classes},xO.displayName=`@mantine/dates/MonthPickerInput`;var SO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},CO=K(e=>{let t=W(`DatePickerInput`,SO,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}=Ur({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=QD(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=_O({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)(UD,{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)(fO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||LE({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})})});CO.classes={...UD.classes,...fO.classes},CO.displayName=`@mantine/dates/DatePickerInput`;var wO=`DD/MM/YYYY`,TO=gO.extend({defaultProps:{placeholder:wO,valueFormat:wO}});function EO({...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 DO=Hf.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)(EO,{}),variant:`separated`}}),OO=gu.extend({classNames:{root:`_root_8921i_1`},defaultProps:{size:`md`,variant:`primary`}}),kO=Gf.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`}}}),AO=$f.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),jO=ym.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),MO=Sm.extend({classNames:{root:`_root_c4e34_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),NO=jm.extend({classNames:{root:`_root_d2yo7_1`,section:`_section_d2yo7_204`},defaultProps:{size:`md`,variant:`primary`}}),[PO,FO]=Je(`Carousel component was not found in tree`),IO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},LO=K(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=W(`CarouselSlide`,null,e),c=FO();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})});LO.classes=IO,LO.displayName=`@mantine/carousel/CarouselSlide`;function RO({slideGap:e,slideSize:t,selector:n}){let r=wr(),i=Ge({"--carousel-slide-gap":ot(mt(e)),"--carousel-slide-size":V(mt(t))}),a=Ie(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=ot(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=ot(t[r])),n),{});return(0,U.jsx)(oi,{styles:i,media:pt(Ie(a),r.breakpoints).filter(e=>Ie(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function zO(e){return typeof e==`object`&&e?Ie(e):[]}function BO(e){return e.sort((e,t)=>Ve(e)-Ve(t))}function VO({slideGap:e,slideSize:t}){return BO(Array.from(new Set([...zO(e),...zO(t)])))}function HO({slideGap:e,slideSize:t,selector:n}){let r=Ge({"--carousel-slide-gap":ot(mt(e)),"--carousel-slide-size":V(mt(t))}),i=VO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=ot(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=ot(t[r])),n),{});return(0,U.jsx)(oi,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function UO({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 WO(e){return Object.prototype.toString.call(e)===`[object Object]`}function GO(e){return WO(e)||Array.isArray(e)}function KO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function qO(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}`:!GO(r)||!GO(i)?r===i:qO(r,i)})}function JO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function YO(e,t){if(e.length!==t.length)return!1;let n=JO(e),r=JO(t);return n.every((e,t)=>{let n=r[t];return qO(e,n)})}function XO(e){return typeof e==`number`}function ZO(e){return typeof e==`string`}function QO(e){return typeof e==`boolean`}function $O(e){return Object.prototype.toString.call(e)===`[object Object]`}function ek(e){return Math.abs(e)}function tk(e){return Math.sign(e)}function nk(e,t){return ek(e-t)}function rk(e,t){return e===0||t===0||ek(e)<=ek(t)?0:ek(nk(ek(e),ek(t))/e)}function ik(e){return Math.round(e*100)/100}function ak(e){return uk(e).map(Number)}function ok(e){return e[sk(e)]}function sk(e){return Math.max(0,e.length-1)}function ck(e,t){return t===sk(e)}function lk(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function uk(e){return Object.keys(e)}function dk(e,t){return[e,t].reduce((e,t)=>(uk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=$O(r)&&$O(i)?dk(r,i):i}),e),{})}function fk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function pk(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 ZO(e)?n[e](r):e(t,r,i)}return{measure:o}}function mk(){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 hk(e,t,n,r){let i=mk(),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 gk(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 _k(e=0,t=0){let n=ek(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 vk(e,t,n){let{constrain:r}=_k(0,e),i=e+1,a=o(t);function o(e){return n?ek((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 vk(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function yk(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=mk(),w=mk(),T=_k(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){(QO(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(tk(e)*-1),r=u.byDistance(e,!m).distance;return m||ek(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=fk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=nk(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(!fk(e,r)&&e.touches.length>=2)return oe(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=nk(t,A),c=nk(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=rk(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 bk(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(fk(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&&ek(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function xk(){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 Sk(e){function t(t){return t/100*e}return{measure:t}}function Ck(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(ek(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(QO(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 wk(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=tk(a),d=u,x}function p(){return ek(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 Tk(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=_k(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=ek(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&ek(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 Ek(e,t,n,r,i){let a=_k(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return nk(e,t)<=1}function u(){let e=o[0],t=ok(o);return _k(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=ck(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 Dk(e,t,n){let r=t[0];return{limit:_k(n?r-e:ok(t),r)}}function Ok(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=_k(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 kk(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function Ak(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=>ok(e)[o]-e[0][a]).map(ek)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-ek(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function jk(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=ck(n,t);return r?lk(ok(n[0])+1):i?lk(sk(a)-ok(n)[0]+1,ok(n)[0]):e})}return{slideRegistry:l}}function Mk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>ek(e)-ek(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)=>ek(e.diff)-ek(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=>tk(e)===r);return a.length?c(a):ok(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 Nk(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 Pk(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));XO(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=>{(QO(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Fk(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 XO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Ik(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=ik(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 Lk(e,t,n,r,i,a,o,s,c){let l=.5,u=ak(i),d=ak(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:Fk(-1),translate:Ik(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 Rk(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||(QO(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function zk(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 uk(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 Bk(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 ek(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ok(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=ck(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(ek)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Vk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=XO(n);function p(e,t){return ak(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ak(e).reduce((n,f,p)=>{let m=ok(n)||0,h=m===0,g=f===sk(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=ek(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 Hk(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=xk(),w=C.measure(t),T=n.map(C.measure),E=gk(c,l),D=E.measureSize(w),O=Sk(D),k=pk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Bk(E,w,T,n,d||!!v,i),ee=Vk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=Ak(E,k,w,T,ee),te=-ok(F)+ok(M),{snapsContained:ne,scrollContainLimit:re}=Ek(D,te,I,v,2),ie=A?ne:I,{limit:L}=Dk(te,ie,d),ae=vk(sk(ie),u,d),oe=ae.clone(),se=ak(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=hk(r,i,()=>ce(Se),e=>le(Se,e)),de=.68,fe=ie[ae.get()],R=Fk(fe),pe=Fk(fe),me=Fk(fe),he=Fk(fe),ge=wk(R,me,pe,he,f,de),z=Mk(d,ie,te,L,he),_e=Nk(ue,ae,oe,ge,z,he,o),ve=kk(L),B=mk(),ye=zk(t,n,o,h),{slideRegistry:be}=jk(A,v,ie,re,ee,se),xe=Pk(e,n,be,_e,ge,B,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:ue,axis:E,dragHandler:yk(E,e,r,i,he,bk(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:Ck(t,o,i,n,E,y,C),scrollBody:ge,scrollBounds:Tk(L,me,he,ge,O),scrollLooper:Ok(te,L,me,[R,me,pe,he]),scrollProgress:ve,scrollSnapList:ie.map(ve.get),scrollSnaps:ie,scrollTarget:z,scrollTo:_e,slideLooper:Lk(E,D,te,j,M,F,ie,me,n),slideFocus:xe,slidesHandler:Rk(t,o,b),slidesInView:ye,slideIndexes:se,slideRegistry:be,slidesToScroll:ee,target:he,translate:Ik(E,t)};return Se}function Uk(){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 Wk={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 Gk(e){function t(e,t){return dk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,uk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>uk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Kk(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 qk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Gk(i),o=Kk(a),s=mk(),c=Uk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Wk,qk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(ZO(t)?e.querySelector(t):t)||e.children[0];let r=ZO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Hk(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}qk.globalOptions=void 0;function Jk(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)(()=>{qO(n.current,e)||(n.current=e,c())},[e,c]),(0,H.useEffect)(()=>{YO(r.current,t)||(r.current=t,c())},[t,c]),(0,H.useEffect)(()=>{if(KO()&&o){qk.globalOptions=Jk.globalOptions;let e=qk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Jk.globalOptions=void 0;var Yk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Xk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Zk=Cn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":V(t),"--carousel-control-size":V(n),"--carousel-controls-offset":ot(r)}})),Qk=K(e=>{let t=W(`Carousel`,Yk,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:IO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Zk}),te=Rt(ee),ne=Mi(),{dir:re}=Ki(),[ie,L]=Jk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Xk,...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=>gt(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)(dl,{...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)(PO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,U.jsx)(HO,{...t,selector:`.${ne}`}):(0,U.jsx)(RO,{...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)(pl,{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)(dl,{"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)(Pf,{style:{transform:`rotate(${UO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,U.jsx)(dl,{"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)(Pf,{style:{transform:`rotate(${UO({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})]})]})});Qk.classes=IO,Qk.varsResolver=Zk,Qk.displayName=`@mantine/carousel/Carousel`,Qk.Slide=LO;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:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function eA({...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 tA={"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`},nA=Qk.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)(eA,{height:16,width:16}),previousControlIcon:(0,U.jsx)($k,{height:16,width:16}),slideGap:V(tA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),rA={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 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:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function aA({...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 oA=tm.extend({classNames:rA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,U.jsx)(aA,{...t}):(0,U.jsx)(iA,{...t})}}),sA=Bm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),cA={XS:352,SM:584,MD:800,LG:1160,XL:1160},lA=Object.entries(cA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:V(n)}),{}),uA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},dA=Wm.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:Tn({[uA.fluidContainer]:n,[uA.miniContainer]:t===`mini`,[uA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in lA?lA[t]:V(t)}})}),fA={placeholder:wO,getYearControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`month`)&&{"current-month":!0}}})},pA={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`},mA=fO.extend({classNames:pA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,Q.default)(e),n=(0,Q.default)().isSame(t,`day`);return(0,U.jsx)(Xf,{span:!0,className:Tn({[pA.dayToday]:n}),children:t.format(`D`)})},...fA}}),hA=CO.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:{...fA,valueFormat:wO}}),gA=Jm.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),_A={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},vA=mh.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:_A.xl,blur:6}}}),yA=Oh.extend({defaultProps:{columnGap:24,rowGap:16}}),bA=Eu.extend({defaultProps:{gap:0,align:`flex-start`}}),xA={wrapper:`_wrapper_4biwb_1`,input:`_input_4biwb_9`,section:`_section_4biwb_42`},SA={placeholder:`_placeholder_1o876_1`},CA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},wA=bf.extend({classNames:xA}),TA=bf.Wrapper.extend({classNames:CA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),EA=bf.Placeholder.extend({classNames:SA}),DA=cu.extend({defaultProps:{size:`xs`}}),OA=eg.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),kA=gg.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:_A.xl,blur:6},scrollAreaComponent:sl.Autosize}}),AA=cO.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:{...fA}}),jA=xO.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:{...fA}}),MA=Pg.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)(Eu,{gap:8,children:[(0,U.jsx)(tm,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,U.jsx)(Xf,{span:!0,children:t.label})]}),searchable:!0}}),NA=Lg.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),PA=Vg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),FA=Q_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),IA=xv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:eA,previousIcon:$k,size:`lg`}}),LA=gl.extend({defaultProps:{shadow:`none`}});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:`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 zA({...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 BA=Ev.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,U.jsx)(RA,{}):(0,U.jsx)(zA,{})}}),VA=wg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),HA=eu.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),UA=Fv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),WA=Zv.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`}}),GA=Zv.Card.extend({classNames:{card:`_card_11cie_1`}}),KA=Zv.Indicator.extend({classNames:{indicator:`_indicator_yh8fo_1`,icon:`_icon_yh8fo_17`}}),qA=Cy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function JA({...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 YA=({checked:e,option:t})=>(0,U.jsxs)(Eu,{gap:8,children:[e&&(0,U.jsx)(JA,{width:16,height:16}),(0,U.jsx)(Xf,{span:!0,children:t.label})]}),XA=Ty.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:YA}}),ZA=Vy.extend({defaultProps:{gap:0}}),QA=Zy.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}}),$A=ib.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}}),ej=Cb.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}}),tj=Nb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),nj=Rb.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),rj=Xf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),ij=Lh.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),aj=Yb.extend({classNames:{root:`_root_6pd11_1`}}),oj=dy.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),sj=iO.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:{...fA}}),cj=yO.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:{...fA}}),lj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],uj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],dj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],fj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],pj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],mj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],hj={xs:V(10),sm:V(12),md:V(14),lg:V(16),xl:V(20)},gj={xs:V(12),sm:V(16),md:V(20),lg:V(24),xl:V(28)},_j={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)}}},vj=Object.entries(cA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:We(n)}),{});function yj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function bj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(yj(a)&&yj(i)?n[r]=bj(a,i):n[r]=i)}return n}var xj={"brand-dark-blue":lj,"brand-orange":uj,accent:uj,blue:dj,orange:fj,red:pj,green:mj},Sj={Accordion:DO,ActionIcon:OO,Alert:kO,Anchor:AO,Avatar:jO,Badge:MO,Button:NO,Carousel:nA,Checkbox:oA,ColorSwatch:sA,Container:dA,DateInput:TO,DatePicker:mA,DatePickerInput:hA,Divider:gA,Drawer:vA,Grid:yA,Group:bA,Input:wA,InputPlaceholder:EA,InputWrapper:TA,Loader:DA,Menu:OA,Modal:kA,MonthPicker:AA,MonthPickerInput:jA,MultiSelect:MA,NavLink:NA,Notification:PA,NumberInput:FA,Paper:LA,Pagination:IA,PasswordInput:BA,Pill:VA,Popover:HA,Progress:UA,Radio:WA,RadioCard:GA,RadioIndicator:KA,SegmentedControl:qA,Select:XA,Stack:ZA,Stepper:QA,Switch:$A,Table:ej,Tabs:tj,TagsInput:nj,Text:rj,Textarea:ij,Title:aj,Tooltip:oj,YearPicker:sj,YearPickerInput:cj};function Cj(e={}){let t={...hj,...e.fontSizes},n={...gj,...e.lineHeights},r=bj(_j,e.headings??{}),i={...vj,...e.breakpoints},a={...xj,...e.colors};return Vr({components:Sj,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})}Cj();var wj={"border-025":`1px`,"border-050":`2px`},Tj={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Ej={"primary-lighter":`#F8F8FB`,"primary-light":`#EFEFF6`,"primary-default":`#414275`,"primary-dark":`#35355F`,"primary-darker":`#18182B`},Dj={"secondary-lighter":`#FFF7F0`,"secondary-light":`#FFA34D`,"secondary-default":`#FF7A00`,"secondary-dark":`#A85100`,"secondary-darker":`#7A3B00`},Oj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},kj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},Aj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},jj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},Mj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Nj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Pj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Fj={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Ij={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Lj={"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%`},Rj={"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)`},zj={...Tj,...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj,...Fj},Bj=_A;function Vj(e={}){let{tokens:t={},theme:n={}}=e;return Hr(Cj(n),Vr({other:{border:{...wj,...t.border},color:{...zj,...t.color},iconSize:{...Ij,...t.iconSize},opacity:{...Bj,...t.opacity},radius:{...Lj,...t.radius},space:{...tA,...t.space},shadow:{...Rj,...t.shadow}}}))}Vj();function Hj(){return wr()}var Uj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Wj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Gj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},Kj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},qj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},Jj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Yj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Xj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Zj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},Qj={...Gj,...Kj,...qj,...Jj,...Yj,...Xj,...Zj},$j={"icon-xs":Ij[`icon-xs`],"icon-sm":Ij[`icon-sm`],"icon-md":Ij[`icon-md`],"icon-lg":Ij[`icon-lg`],"icon-xl":Ij[`icon-xl`]},eM={"radius-150":Lj[`radius-150`],"radius-300":Lj[`radius-300`],"radius-400":Lj[`radius-400`],"radius-500":Lj[`radius-500`]},tM={"space-150":tA[`space-150`],"space-200":tA[`space-200`],"space-300":tA[`space-300`],"space-400":tA[`space-400`],"space-500":tA[`space-500`],"space-600":tA[`space-600`]},nM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(12),md:V(14),lg:V(16)}},brand:{darkBlue:Uj,orange:Wj},tokens:{color:Qj,radius:eM,space:tM,iconSize:$j}},rM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],iM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],aM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},oM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},sM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},cM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},lM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},uM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},dM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},fM={...aM,...oM,...sM,...cM,...lM,...uM,...dM},pM={"icon-sm":Ij[`icon-sm`],"icon-md":Ij[`icon-md`],"icon-lg":Ij[`icon-lg`],"icon-xl":Ij[`icon-xl`]},mM={"radius-300":Lj[`radius-300`],"radius-400":Lj[`radius-400`],"radius-500":Lj[`radius-500`]},hM={"space-300":tA[`space-300`],"space-400":tA[`space-400`],"space-500":tA[`space-500`],"space-600":tA[`space-600`],"space-700":tA[`space-700`],"space-800":tA[`space-800`],"space-900":tA[`space-900`]},gM={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(13),md:V(15),lg:V(17)}},brand:{darkBlue:rM,orange:iM},tokens:{color:fM,radius:mM,space:hM,iconSize:pM}},_M={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`accent`},brand:{darkBlue:lj,orange:uj},tokens:{color:{...Tj,...Ej,...Dj,...Mj,...Nj,...Pj,...Fj},radius:Lj,space:tA,iconSize:Ij,border:wj,shadow:Rj,opacity:_A}},ocean:gM,forest:nM},vM=[`foundations`,`ocean`,`forest`],yM=`foundations`;function bM(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 xM={foundations:bM(_M.foundations),ocean:bM(_M.ocean),forest:bM(_M.forest)};function SM(e){return typeof e==`string`&&vM.includes(e)}function CM(e){return xM[SM(e)?e:yM]}function wM({themeName:e}={}){return Vj(CM(e).options)}var TM=(0,H.createContext)(null),EM=e=>{let t=(0,H.useContext)(TM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function DM(){return EM()}var OM=({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)(TM.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)},kM=(0,H.createContext)(null),AM=(0,H.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function jM({runtime:e,children:t}){return(0,U.jsx)(AM.Provider,{value:e,children:t})}function MM({config:e,children:t}){return(0,U.jsx)(kM.Provider,{value:e,children:t})}var NM=(0,H.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),PM=({children:e,config:t})=>(0,U.jsx)(NM.Provider,{value:t,children:e});function FM({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)(OM,{i18n:Fe,children:(0,U.jsx)(zr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,U.jsx)(eS,{client:bE,children:(0,U.jsx)(PM,{config:t,children:(0,U.jsx)(MM,{config:n,children:(0,U.jsx)(jM,{runtime:r,children:e})})})})})})}function IM(){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 LM=4;function RM(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}=IM();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>=LM&&(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 zM(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 BM={root:`_root_677yy_1`,button:`_button_677yy_5`,buttonInner:`_buttonInner_677yy_30`,iconSection:`_iconSection_677yy_35`,label:`_label_677yy_39`};function VM({onClick:e,zIndex:t,position:n,label:r}){let i=Hj(),{handlePointerDown:a,style:o}=RM({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:BM.root,style:d,children:(0,U.jsx)(jm,{onClick:e,onPointerDown:a,style:f,classNames:{root:BM.button,inner:BM.buttonInner,section:BM.iconSection,label:BM.label},leftSection:(0,U.jsx)(zM,{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 HM({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 UM({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}=HM({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,U.jsxs)(Eu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,U.jsx)(Xf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,U.jsx)(cu,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,U.jsx)(Xf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var{entries:WM,setPrototypeOf:GM,isFrozen:KM,getPrototypeOf:qM,getOwnPropertyDescriptor:JM}=Object,{freeze:YM,seal:XM,create:ZM}=Object,{apply:QM,construct:$M}=typeof Reflect<`u`&&Reflect;YM||=function(e){return e},XM||=function(e){return e},QM||=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)},$M||=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 eN=mN(Array.prototype.forEach),tN=mN(Array.prototype.lastIndexOf),nN=mN(Array.prototype.pop),rN=mN(Array.prototype.push),iN=mN(Array.prototype.splice),aN=mN(String.prototype.toLowerCase),oN=mN(String.prototype.toString),sN=mN(String.prototype.match),cN=mN(String.prototype.replace),lN=mN(String.prototype.indexOf),uN=mN(String.prototype.trim),dN=mN(Object.prototype.hasOwnProperty),fN=mN(RegExp.prototype.test),pN=hN(TypeError);function mN(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 QM(e,t,r)}}function hN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return $M(e,n)}}function gN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:aN;GM&&GM(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(KM(t)||(t[r]=e),i=e)}e[i]=!0}return e}function _N(e){for(let t=0;t<e.length;t++)dN(e,t)||(e[t]=null);return e}function vN(e){let t=ZM(null);for(let[n,r]of WM(e))dN(e,n)&&(Array.isArray(r)?t[n]=_N(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=vN(r):t[n]=r);return t}function yN(e,t){for(;e!==null;){let n=JM(e,t);if(n){if(n.get)return mN(n.get);if(typeof n.value==`function`)return mN(n.value)}e=qM(e)}function n(){return null}return n}var bN=YM(`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(`.`)),xN=YM(`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(`.`)),SN=YM([`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`]),CN=YM([`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`]),wN=YM(`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(`.`)),TN=YM([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),EN=YM([`#text`]),DN=YM(`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(`.`)),ON=YM(`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(`.`)),kN=YM(`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(`.`)),AN=YM([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),jN=XM(/\{\{[\w\W]*|[\w\W]*\}\}/gm),MN=XM(/<%[\w\W]*|[\w\W]*%>/gm),NN=XM(/\$\{[\w\W]*/gm),PN=XM(/^data-[\-\w.\u00B7-\uFFFF]+$/),FN=XM(/^aria-[\-\w]+$/),IN=XM(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),LN=XM(/^(?:\w+script|data):/i),RN=XM(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zN=XM(/^html$/i),BN=XM(/^[a-z][.\w]*(-[.\w]+)+$/i),VN=Object.freeze({__proto__:null,ARIA_ATTR:FN,ATTR_WHITESPACE:RN,CUSTOM_ELEMENT:BN,DATA_ATTR:PN,DOCTYPE_NAME:zN,ERB_EXPR:MN,IS_ALLOWED_URI:IN,IS_SCRIPT_OR_DATA:LN,MUSTACHE_EXPR:jN,TMPLIT_EXPR:NN}),HN={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},UN=function(){return typeof window>`u`?null:window},WN=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}},GN=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function KN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UN(),t=e=>KN(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==HN.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=yN(m,`cloneNode`),g=yN(m,`remove`),_=yN(m,`nextSibling`),v=yN(m,`childNodes`),y=yN(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=GN();t.isSupported=typeof WM==`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}=VN,{IS_ALLOWED_URI:F}=VN,I=null,te=gN({},[...bN,...xN,...SN,...wN,...EN]),ne=null,re=gN({},[...DN,...ON,...kN,...AN]),ie=Object.seal(ZM(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(ZM(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=gN({},[`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=gN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Te=null,Ee=gN({},[`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=gN({},[De,Oe,ke],oN),Pe=gN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Fe=gN({},[`annotation-xml`]),Ie=gN({},[`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},Ue=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===e)){if((!e||typeof e!=`object`)&&(e={}),e=vN(e),Le=Re.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ze=Le===`application/xhtml+xml`?oN:aN,I=dN(e,`ALLOWED_TAGS`)?gN({},e.ALLOWED_TAGS,ze):te,ne=dN(e,`ALLOWED_ATTR`)?gN({},e.ALLOWED_ATTR,ze):re,Me=dN(e,`ALLOWED_NAMESPACES`)?gN({},e.ALLOWED_NAMESPACES,oN):Ne,Te=dN(e,`ADD_URI_SAFE_ATTR`)?gN(vN(Ee),e.ADD_URI_SAFE_ATTR,ze):Ee,Ce=dN(e,`ADD_DATA_URI_TAGS`)?gN(vN(we),e.ADD_DATA_URI_TAGS,ze):we,xe=dN(e,`FORBID_CONTENTS`)?gN({},e.FORBID_CONTENTS,ze):Se,L=dN(e,`FORBID_TAGS`)?gN({},e.FORBID_TAGS,ze):vN({}),ae=dN(e,`FORBID_ATTR`)?gN({},e.FORBID_ATTR,ze):vN({}),be=dN(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||IN,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=gN({},EN),ne=ZM(null),be.html===!0&&(gN(I,bN),gN(ne,DN)),be.svg===!0&&(gN(I,xN),gN(ne,ON),gN(ne,AN)),be.svgFilters===!0&&(gN(I,SN),gN(ne,ON),gN(ne,AN)),be.mathMl===!0&&(gN(I,wN),gN(ne,kN),gN(ne,AN))),dN(e,`ADD_TAGS`)||(oe.tagCheck=null),dN(e,`ADD_ATTR`)||(oe.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?oe.tagCheck=e.ADD_TAGS:(I===te&&(I=vN(I)),gN(I,e.ADD_TAGS,ze))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?oe.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=vN(ne)),gN(ne,e.ADD_ATTR,ze))),e.ADD_URI_SAFE_ATTR&&gN(Te,e.ADD_URI_SAFE_ATTR,ze),e.FORBID_CONTENTS&&(xe===Se&&(xe=vN(xe)),gN(xe,e.FORBID_CONTENTS,ze)),e.ADD_FORBID_CONTENTS&&(xe===Se&&(xe=vN(xe)),gN(xe,e.ADD_FORBID_CONTENTS,ze)),B&&(I[`#text`]=!0),R&&gN(I,[`html`,`head`,`body`]),I.table&&(gN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw pN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw pN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=WN(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));YM&&YM(e),Be=e}},V=gN({},[...xN,...SN,...CN]),We=gN({},[...wN,...TN]),Ge=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ae,tagName:`template`});let n=aN(e.tagName),r=aN(t.tagName);return Me[e.namespaceURI]?e.namespaceURI===Oe?t.namespaceURI===ke?n===`svg`:t.namespaceURI===De?n===`svg`&&(r===`annotation-xml`||Pe[r]):!!V[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]||!V[n]):!!(Le===`application/xhtml+xml`&&Me[e.namespaceURI]):!1},Ke=function(e){rN(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},H=function(e,n){try{rN(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{rN(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(he||ge)try{Ke(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=sN(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){eN(e,e=>{e.call(t,n,r,Be)})}let Qe=function(e){let n=null;if(Ze(D.beforeSanitizeElements,e,null),Ye(e))return Ke(e),!0;let r=ze(e.nodeName);if(Ze(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),fe&&e.hasChildNodes()&&!Xe(e.firstElementChild)&&fN(/<[/\w!]/g,e.innerHTML)&&fN(/<[/\w!]/g,e.textContent)||e.nodeType===HN.progressingInstruction||fe&&e.nodeType===HN.comment&&fN(/<[/\w]/g,e.data))return Ke(e),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&et(r)&&(ie.tagNameCheck instanceof RegExp&&fN(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 Ke(e),!0}return e instanceof c&&!Ge(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&fN(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ke(e),!0):(de&&e.nodeType===HN.text&&(n=e.textContent,eN([O,k,A],e=>{n=cN(n,e,` `)}),e.textContent!==n&&(rN(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]&&fN(j,t))&&!(se&&fN(M,t))&&!(oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e))){if(!ne[t]||ae[t]){if(!(et(e)&&(ie.tagNameCheck instanceof RegExp&&fN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&fN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&fN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!Te[t]&&!fN(F,cN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&lN(r,`data:`)===0&&Ce[e])&&!(le&&!fN(N,cN(r,P,``)))&&r)return!1}return!0},et=function(e){return e!==`annotation-xml`&&sN(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:uN(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`)&&(H(a,e),u=`user-content-`+u),fe&&fN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){H(a,e);continue}if(c===`attributename`&&sN(u,`href`)){H(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){H(a,e);continue}if(!ue&&fN(/\/>/i,u)){H(a,e);continue}de&&eN([O,k,A],e=>{u=cN(u,e,` `)});let d=ze(e.nodeName);if(!$e(d,c,u)){H(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)?Ke(e):nN(t.removed)}catch{H(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 pN(`dirty is not a string, aborting`)}else throw pN(`toString is not a function`);if(!t.isSupported)return e;if(pe||Ue(n),t.removed=[],typeof e==`string`&&(ye=!1),ye){if(e.nodeName){let t=ze(e.nodeName);if(!I[t]||L[t])throw pN(`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===HN.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&&Ke(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&&fN(zN,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=mw(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Hw.assertOptions(n,{silentJSONParsing:Uw.transitional(Uw.boolean),forcedJSONParsing:Uw.transitional(Uw.boolean),clarifyTimeoutError:Uw.transitional(Uw.boolean),legacyInterceptorReqResOrdering:Uw.transitional(Uw.boolean)},!1),r!=null&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:Hw.assertOptions(r,{encode:Uw.function,serialize:Uw.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Hw.assertOptions(t,{baseUrl:Uw.spelling(`baseURL`),withXsrfToken:Uw.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=ZC.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||EC;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=[Lw.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=Lw.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=mw(this.defaults,e),wC(fw(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Z.forEach([`delete`,`get`,`head`,`options`],function(e){Ww.prototype[e]=function(t,n){return this.request(mw(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(mw(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Ww.prototype[e]=t(),Ww.prototype[e+`Form`]=t(!0)});var Gw=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 ew(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 Kw(e){return function(t){return e.apply(null,t)}}function qw(e){return Z.isObject(e)&&e.isAxiosError===!0}var Jw={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(Jw).forEach(([e,t])=>{Jw[t]=e});function Yw(e){let t=new Ww(e),n=nS(Ww.prototype.request,t);return Z.extend(n,Ww.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Yw(mw(e,t))},n}var Xw=Yw(BC);Xw.Axios=Ww,Xw.CanceledError=ew,Xw.CancelToken=Gw,Xw.isCancel=$C,Xw.VERSION=Rw,Xw.toFormData=yC,Xw.AxiosError=pC,Xw.Cancel=Xw.CanceledError,Xw.all=function(e){return Promise.all(e)},Xw.spread=Kw,Xw.isAxiosError=qw,Xw.mergeConfig=mw,Xw.AxiosHeaders=ZC,Xw.formToJSON=e=>RC(Z.isHTMLForm(e)?new FormData(e):e),Xw.getAdapter=Fw.getAdapter,Xw.HttpStatusCode=Jw,Xw.default=Xw;var{Axios:Zw,AxiosError:Qw,CanceledError:$w,isCancel:eT,CancelToken:tT,VERSION:nT,all:rT,Cancel:iT,isAxiosError:aT,spread:oT,toFormData:sT,AxiosHeaders:cT,HttpStatusCode:lT,formToJSON:uT,getAdapter:dT,mergeConfig:fT}=Xw,pT=`genai_access_token`,mT=`genai_tenant_id`,hT=`genai_switch_ready`;function gT(e){try{let t=e.split(`.`);if(t.length<2)return!1;let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(Math.ceil(n.length/4)*4,`=`),i=JSON.parse(atob(r));return i.exp?i.exp*1e3<Date.now():!1}catch{return!1}}function _T(){if(typeof sessionStorage<`u`){let e=sessionStorage.getItem(pT);return e&&gT(e)?(sessionStorage.removeItem(pT),null):e}return null}function vT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(pT,e)}function yT(){return typeof sessionStorage<`u`?sessionStorage.getItem(mT):null}function bT(e){typeof sessionStorage<`u`&&sessionStorage.setItem(mT,String(e))}function xT(){return typeof sessionStorage<`u`?sessionStorage.getItem(hT)===`true`:!1}function ST(e){typeof sessionStorage<`u`&&sessionStorage.setItem(hT,String(e))}function CT(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 wT(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 TT=CT({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5});function ET(e,t){let n=e.getState(),r=wT(t([...n.notifications,...n.queue]),n.defaultPosition,n.limit);e.setState({notifications:r.notifications,queue:r.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function DT(e,t=TT){let n=e.id||_t();return ET(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}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:`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 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:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,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:`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 jT({...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 MT={danger:(0,U.jsx)(OT,{}),info:(0,U.jsx)(AT,{}),success:(0,U.jsx)(kT,{}),warning:(0,U.jsx)(jT,{})};function NT(e,t){let n=MT[e];DT({...t,variant:e,icon:n})}function PT(e){NT(`danger`,{title:Fe._({id:`SlfejT`}),...e})}function FT(){return Fe._({id:`Qlh+W2`})}function IT(e,t){return{}[e]}function LT(e){return e?{401:Fe._({id:`9cOLBO`}),403:Fe._({id:`qriaXz`}),404:Fe._({id:`373i3G`}),500:Fe._({id:`lkE00/`}),502:Fe._({id:`9dPdtH`}),503:Fe._({id:`Vw36Gt`}),504:Fe._({id:`3R0fAs`})}[e]:``}var RT=`react-starter-kit-`,zT=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]:`${RT}${n}`}),{});function BT(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 VT(){return BT(zT.DEBUG,!1),!0}function HT(){return VT()?BT(zT.SHOW_HTTP_ERROR_DEBUG_TOASTER,!1):!1}function UT(e){return e?.operationResultCode!==void 0}function WT(e){return e?.error!==void 0}function GT(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 KT(e){return UT(e)?e.description:WT(e)?e.error:e?.message||e?.errorCode||FT()}function qT(e){return e.code?IT(e.code)||FT():``}function JT(e){return{url:e.config?.url,method:e.config?.method?.toUpperCase(),status:e.response?.status,response:e.response?.data}}function YT(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function XT({url:e,method:t,status:n,response:r}){let i=r!=null&&Object.keys(r).length>0;return(0,U.jsxs)(Vy,{children:[[{label:Fe._({id:`IagCbF`}),value:e},{label:Fe._({id:`fiPesM`}),value:t},{label:Fe._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,U.jsxs)(Eu,{gap:4,children:[(0,U.jsxs)(Xf,{size:`xs`,fw:500,children:[e,`:`]}),(0,U.jsx)(Xf,{size:`xs`,children:t})]},n)),i&&(0,U.jsx)(Im,{block:!0,lh:1.2,children:YT(r)})]})}function ZT(e){let t=e.response?.data;return UT(t)?t.operationResultCode:WT(t)?t.error:t?.errorCode||t?.code||t?.message||``}function QT(e){return e.response?.data?.status||e.response?.status||e.status}function $T(e){let t=e.response?.data,n=ZT(e);if(n){let e=IT(n);if(e)return e}return KT(t)}function eE(e){let t=e.response?.data;return qT(t)||LT(QT(e))}function tE(e){return e.response?.data?GT(e)?eE(e):$T(e):e.message}function nE(e){return e.response?.data?.errorId}function rE(e){let t=tE(e),n=GT(e)?nE(e):void 0;return n?(0,U.jsxs)(Vy,{gap:8,children:[(0,U.jsx)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,U.jsxs)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Fe._({id:`jf+o1U`}),`: `,n]})]}):t}function iE(e){if(!e)return FT();if(HT()){let t=JT(e);return Object.values(t).some(Boolean)?(0,U.jsx)(Vy,{children:XT(t)}):rE(e)}return rE(e)}function aE(){return HT()?Fe._({id:`J5ej6L`}):Fe._({id:`SlfejT`})}function oE(e){PT({title:aE(),message:iE(e),autoClose:HT()?!1:5e3})}var sE=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},cE=(e=>e?sE(e):sE),lE=e=>e;function uE(e,t=lE){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 dE=e=>{let t=cE(e),n=e=>uE(t,e);return Object.assign(n,t),n},fE=(e=>e?dE(e):dE),pE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function mE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var hE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:mE(),spanId:mE().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=mE().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(),gE=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??VT(),minLogLevel:n.minLogLevel??e.globalConfig.minLogLevel}}createLogEntry(t,n,r){let i=hE.getCurrentContext(this.name)??hE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:pE[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||pE[t]<pE[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(){hE.startSpan(this.name)}clearTraceContext(){hE.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 gE(`KeycloakService`);var _E=null;function vE(){return _E?.token?`Bearer ${_E.token}`:void 0}function yE(){return _E}var bE=new Zx({queryCache:new Xx({onError:(e,t)=>{(t.meta?.handleGlobalError??!0)&&e instanceof Qw&&oE(e)}}),mutationCache:new qx({onError:(e,t,n,r)=>{(r.meta?.handleGlobalError??!0)&&e instanceof Qw&&oE(e)}}),defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:600*1e3},mutations:{retry:!1}}});function xE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?SE(r):t===`private`||n?CE(r):SE(r):r}function SE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function CE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function wE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function TE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Xw.create({baseURL:wE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=yE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=xE(e.url||``,e.accessScope,t));let i=_T(),a=yT();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=vE();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Fe.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 EE;function DE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;TE({baseUrl:n,prefix:r.crm}),TE({baseUrl:n,prefix:r.uiAuthz}),EE=TE({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 OE({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 kE({formatter:e,...t}){return(e||OE)(t)}function AE({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 jE({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=AE({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`)?jE({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function ME(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function NE(e){return e.current?.map(e=>e.map(e=>e.length))}function PE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=ME(i.key);a&&(i.preventDefault(),jE({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:NE(e)}))}function FE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD`)}function IE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function LE({minDate:e,maxDate:t}){let n=(0,Q.default)();return!e&&!t?FE(n):e&&(0,Q.default)(n).isBefore(e)?FE(e):t&&(0,Q.default)(n).isAfter(t)?FE(t):FE(n)}var RE=(0,H.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function zE(){let e=(0,H.use)(RE),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 BE({value:e,type:t,withTime:n}){let r=n?IE:FE;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 VE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,U.jsx)(`input`,{type:`hidden`,value:BE({value:e,type:t,withTime:i}),name:n,form:r})}VE.displayName=`@mantine/dates/HiddenDatesInput`;var HE={day:`m_396ce5cb`},UE=Cn((e,{size:t})=>({day:{"--day-size":at(t,`day-size`)}})),WE=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)(dl,{...G({name:u||`Day`,classes:HE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:UE,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()})});WE.classes=HE,WE.varsResolver=UE,WE.displayName=`@mantine/dates/Day`;function GE({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 KE={weekday:`m_18a3eca`},qE=Cn((e,{size:t})=>({weekdaysRow:{"--wr-fz":ct(t),"--wr-spacing":ot(t)}})),JE=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:KE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:qE,rootSelector:`weekdaysRow`}),_=zE(),v=GE({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]})});JE.classes=KE,JE.varsResolver=qE,JE.displayName=`@mantine/dates/WeekdaysRow`;function YE(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 XE(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 ZE({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=YE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Q.default)(XE(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 QE(e,t){return(0,Q.default)(e).format(`YYYY-MM`)===(0,Q.default)(t).format(`YYYY-MM`)}function $E(e,t){return t?(0,Q.default)(e).isAfter((0,Q.default)(t).subtract(1,`day`),`day`):!0}function eD(e,t){return t?(0,Q.default)(e).isBefore((0,Q.default)(t).add(1,`day`),`day`):!0}function tD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>eD(e,n)&&$E(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||QE(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Q.default)().isSame(e,`date`))||s[0]}var nD=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(nD.default);function rD(e){return(0,Q.default)(e.find(e=>(0,Q.default)(e).day()===1)).isoWeek()}var iD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},aD={withCellSpacing:!0},oD=Cn((e,{size:t})=>({weekNumber:{"--wn-fz":ct(t),"--wn-size":at(t,`wn-size`)}})),sD=K(e=>{let t=W(`Month`,aD,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:iD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:oD,rootSelector:`month`}),I=zE(),te=ZE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=tD({dates:te,minDate:FE(g),maxDate:FE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Ur({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!QE(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)(WE,{__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)||!eD(e,FE(_))||!$E(e,FE(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:rD(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)(JE,{__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})]})});sD.classes=iD,sD.varsResolver=oD,sD.displayName=`@mantine/dates/Month`;var cD={pickerControl:`m_dc6a3c71`},lD=Cn((e,{size:t})=>({pickerControl:{"--dpc-fz":ct(t),"--dpc-size":at(t,`dpc-size`)}})),uD=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)(dl,{...G({name:d||`PickerControl`,classes:cD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:lD,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})});uD.classes=cD,uD.varsResolver=lD,uD.displayName=`@mantine/dates/PickerControl`;function dD({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 fD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!dD({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 pD(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 mD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},hD={yearsListFormat:`YYYY`,withCellSpacing:!0},gD=K(e=>{let t=W(`YearsList`,hD,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:mD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=zE(),O=pD(c),k=fD({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)(uD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:dD({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})})});gD.classes=mD,gD.displayName=`@mantine/dates/YearsList`;function _D({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 vD({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!_D({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 yD(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 bD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},xD={monthsListFormat:`MMM`,withCellSpacing:!0},SD=K(e=>{let t=W(`MonthsList`,xD,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:bD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=zE(),O=yD(l),k=vD({months:O,minDate:FE(f),maxDate:FE(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)(uD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:_D({month:e,minDate:FE(f),maxDate:FE(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})})});SD.classes=bD,SD.displayName=`@mantine/dates/MonthsList`;var CD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},wD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},TD=Cn((e,{size:t})=>({calendarHeader:{"--dch-control-size":at(t,`dch-control-size`),"--dch-fz":ct(t)}})),ED=K(e=>{let t=W(`CalendarHeader`,wD,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:CD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:TD,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,H.createElement)(dl,{...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)(Pf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,H.createElement)(dl,{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)(dl,{...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)(Pf,{...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})});ED.classes=CD,ED.varsResolver=TD,ED.displayName=`@mantine/dates/CalendarHeader`;function DD(e){let t=pD(e);return[t[0][0],t[3][0]]}var OD={decadeLabelFormat:`YYYY`},kD=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`,OD,e),ee=zE(),[F,I]=DD(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)(ED,{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)(gD,{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})]})});kD.classes={...gD.classes,...ED.classes},kD.displayName=`@mantine/dates/DecadeLevel`;var AD={yearLabelFormat:`YYYY`},jD=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`,AD,e),I=zE(),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)(ED,{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)(SD,{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})]})});jD.classes={...ED.classes,...SD.classes},jD.displayName=`@mantine/dates/YearLevel`;var MD={monthLabelFormat:`MMMM YYYY`},ND=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`,MD,e),le=zE(),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)(ED,{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)(sD,{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})]})});ND.classes={...sD.classes,...ED.classes},ND.displayName=`@mantine/dates/MonthLevel`;var PD={levelsGroup:`m_30b26e33`},FD=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:PD,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})});FD.classes=PD,FD.displayName=`@mantine/dates/LevelsGroup`;var ID={numberOfColumns:1},LD=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`,ID,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)(kD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>PE({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)(FD,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});LD.classes={...FD.classes,...kD.classes},LD.displayName=`@mantine/dates/DecadeLevelGroup`;var RD={numberOfColumns:1},zD=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`,RD,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)(jD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>PE({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)(FD,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});zD.classes={...jD.classes,...FD.classes},zD.displayName=`@mantine/dates/YearLevelGroup`;var BD={numberOfColumns:1},VD=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`,BD,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)(ND,{month:oe,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>PE({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)(FD,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:ae,...oe,children:ce})});VD.classes={...FD.classes,...ND.classes},VD.displayName=`@mantine/dates/MonthLevelGroup`;var HD={input:`m_6fa5e2aa`},UD=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}=xf(`PickerInputBase`,{size:`sm`},e),A=(0,U.jsx)(bf.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)(gg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,U.jsx)(bf.Wrapper,{...n,children:(0,U.jsxs)(eu,{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)(eu.Target,{children:(0,U.jsx)(bf,{"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:Tn(HD.input,i?.input)},...k,children:d||(0,U.jsx)(bf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,U.jsx)(eu.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,U.jsx)(VE,{value:C,name:w,form:T,type:E,withTime:O})]})});UD.classes=HD,UD.displayName=`@mantine/dates/PickerInputBase`;var WD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,GD=(e,t)=>{let n=t?IE:FE;return Array.isArray(e)?e.map(n):n(e)};function KD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,H.useRef)(e),[o,s,c]=Yt({value:GD(t,i),defaultValue:GD(n,i),finalValue:WD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?WD(e):n,s(l))),[l,s,c]}function qD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function JD(e){return e===0?`month`:e===1?`year`:`decade`}function YD(e,t,n){return JD(gt(qD(e,0),qD(t,0),qD(n,2)))}var XD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},ZD=K(e=>{let t=W(`Calendar`,XD,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}=Ur({classNames:ue,styles:de,props:t}),[je,Me]=Yt({value:o?YD(o,i,r):void 0,defaultValue:a?YD(a,i,r):void 0,finalValue:YD(void 0,i,r),onChange:s}),[Ne,Pe]=KD({type:`default`,value:FE(c),defaultValue:FE(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)},Ue=()=>{let e=(0,Q.default)(Re).add(10*Ie,`year`).format(`YYYY-MM-DD`);ve?.(e),Pe(e)},V=()=>{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(),V()):t&&(e.preventDefault(),He());break;case`ArrowDown`:t&&n?(e.preventDefault(),Ue()):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,Ue,V]),(0,U.jsxs)(q,{ref:Jt(We,De),size:ge,"data-calendar":!0,"data-full-width":Te||void 0,...Oe,children:[je===`month`&&(0,U.jsx)(VD,{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)(zD,{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(YD(`month`,i,r)),_?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe}),je===`decade`&&(0,U.jsx)(LD,{decade:Re,minDate:R,maxDate:pe,yearsListFormat:se,getYearControlProps:ce,locale:me,onNext:Ue,onPrevious:V,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(YD(`year`,i,r)),g?.(t)},__preventFocus:z,__stopPropagation:_e,withCellSpacing:ne,headerControlsOrder:b,fullWidth:Te,...Fe})]})});ZD.classes={...LD.classes,...zD.classes,...VD.classes},ZD.displayName=`@mantine/dates/Calendar`;function QD(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 $D(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 eO({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=KD({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?$D(e,[f,u]):c[0]&&c[1]?$D(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 tO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},nO=Cn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":ct(t)}})),rO={type:`default`},iO=K(e=>{let t=W(`YearPicker`,rO,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}=QD(w),D=(0,H.useRef)(null),O=(0,H.useRef)(null),k=G({name:l||`YearPicker`,classes:tO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:nO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=eO({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Ur({classNames:n,styles:r,props:t}),I=(0,U.jsx)(ZD,{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)(dl,{...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]})});iO.classes={...ZD.classes,...tO},iO.varsResolver=nO,iO.displayName=`@mantine/dates/YearPicker`;var aO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},oO=Cn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":ct(t)}})),sO={type:`default`},cO=K(e=>{let t=W(`MonthPicker`,sO,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}=QD(T),O=(0,H.useRef)(null),k=(0,H.useRef)(null),A=G({name:l||`MonthPicker`,classes:aO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:oO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=eO({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Ur({classNames:n,styles:r,props:t}),te=(0,U.jsx)(ZD,{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)(dl,{...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]})});cO.classes={...ZD.classes,...aO},cO.varsResolver=oO,cO.displayName=`@mantine/dates/MonthPicker`;var lO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},uO=Cn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":ct(t)}})),dO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},fO=K(e=>{let t=W(`DatePicker`,dO,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}=QD(S),T=(0,H.useRef)(null),E=(0,H.useRef)(null),D=G({name:u||`DatePicker`,classes:lO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:uO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=eO({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Ur({classNames:c,styles:l,props:t}),F=(0,U.jsx)(ZD,{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`?QE(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)(dl,{...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]})});fO.classes=ZD.classes,fO.varsResolver=uO,fO.displayName=`@mantine/dates/DatePicker`;function pO(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 mO({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 hO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},gO=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}=xf(`DateInput`,hO,e),I=(0,H.useRef)(null),te=(0,H.useRef)(null),[ne,re]=(0,H.useState)(!1),{calendarProps:ie,others:L}=QD(F),ae=zE(),oe=m||(e=>{let t=(0,Q.default)(e,f,ae.getLocale(d)).toDate();return Number.isNaN(t.getTime())?pO(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]=KD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[fe,R]=KD({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&&mO({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)(bf.ClearButton,{onClick:()=>{ue(null),!de&&me(``),re(!1)},unstyled:E,...c}),be=o&&!!le&&!S&&!ee;return Et(()=>{le!==void 0&&!ne&&me(ce(le))},[le]),St(()=>re(!1),void 0,[I.current,te.current]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(bf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,U.jsxs)(eu,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,U.jsx)(eu.Target,{children:(0,U.jsx)(bf,{"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)(eu.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,U.jsx)(ZD,{__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`?QE(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)(VE,{name:C,form:w,value:le,type:`default`,withTime:p})]})});gO.classes={...bf.classes,...ZD.classes},gO.displayName=`@mantine/dates/DateInput`;function _O({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=zE(),[d,f]=rn(!1),[p,m]=KD({type:e,value:t,defaultValue:n,onChange:r}),h=kE({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 vO={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},yO=K(e=>{let t=W(`YearPickerInput`,vO,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}=Ur({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=QD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=_O({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(UD,{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)(iO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||LE({maxDate:v,minDate:_}):O||LE({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})})});yO.classes={...UD.classes,...iO.classes},yO.displayName=`@mantine/dates/YearPickerInput`;var bO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},xO=K(e=>{let t=W(`MonthPickerInput`,bO,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}=Ur({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=QD(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=_O({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,U.jsx)(UD,{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)(cO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||LE({maxDate:v,minDate:_}):O||LE({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})})});xO.classes={...UD.classes,...cO.classes},xO.displayName=`@mantine/dates/MonthPickerInput`;var SO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},CO=K(e=>{let t=W(`DatePickerInput`,SO,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}=Ur({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=QD(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=_O({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)(UD,{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)(fO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||LE({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})})});CO.classes={...UD.classes,...fO.classes},CO.displayName=`@mantine/dates/DatePickerInput`;var wO=`DD/MM/YYYY`,TO=gO.extend({defaultProps:{placeholder:wO,valueFormat:wO}});function EO({...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 DO=Hf.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)(EO,{}),variant:`separated`}}),OO=gu.extend({classNames:{root:`_root_8921i_1`},defaultProps:{size:`md`,variant:`primary`}}),kO=Gf.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`}}}),AO=$f.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),jO=ym.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),MO=Sm.extend({classNames:{root:`_root_c4e34_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),NO=jm.extend({classNames:{root:`_root_d2yo7_1`,section:`_section_d2yo7_204`},defaultProps:{size:`md`,variant:`primary`}}),[PO,FO]=Je(`Carousel component was not found in tree`),IO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},LO=K(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=W(`CarouselSlide`,null,e),c=FO();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})});LO.classes=IO,LO.displayName=`@mantine/carousel/CarouselSlide`;function RO({slideGap:e,slideSize:t,selector:n}){let r=wr(),i=Ge({"--carousel-slide-gap":ot(mt(e)),"--carousel-slide-size":V(mt(t))}),a=Ie(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=ot(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=ot(t[r])),n),{});return(0,U.jsx)(oi,{styles:i,media:pt(Ie(a),r.breakpoints).filter(e=>Ie(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function zO(e){return typeof e==`object`&&e?Ie(e):[]}function BO(e){return e.sort((e,t)=>Ve(e)-Ve(t))}function VO({slideGap:e,slideSize:t}){return BO(Array.from(new Set([...zO(e),...zO(t)])))}function HO({slideGap:e,slideSize:t,selector:n}){let r=Ge({"--carousel-slide-gap":ot(mt(e)),"--carousel-slide-size":V(mt(t))}),i=VO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=ot(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=ot(t[r])),n),{});return(0,U.jsx)(oi,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function UO({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 WO(e){return Object.prototype.toString.call(e)===`[object Object]`}function GO(e){return WO(e)||Array.isArray(e)}function KO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function qO(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}`:!GO(r)||!GO(i)?r===i:qO(r,i)})}function JO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function YO(e,t){if(e.length!==t.length)return!1;let n=JO(e),r=JO(t);return n.every((e,t)=>{let n=r[t];return qO(e,n)})}function XO(e){return typeof e==`number`}function ZO(e){return typeof e==`string`}function QO(e){return typeof e==`boolean`}function $O(e){return Object.prototype.toString.call(e)===`[object Object]`}function ek(e){return Math.abs(e)}function tk(e){return Math.sign(e)}function nk(e,t){return ek(e-t)}function rk(e,t){return e===0||t===0||ek(e)<=ek(t)?0:ek(nk(ek(e),ek(t))/e)}function ik(e){return Math.round(e*100)/100}function ak(e){return uk(e).map(Number)}function ok(e){return e[sk(e)]}function sk(e){return Math.max(0,e.length-1)}function ck(e,t){return t===sk(e)}function lk(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function uk(e){return Object.keys(e)}function dk(e,t){return[e,t].reduce((e,t)=>(uk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=$O(r)&&$O(i)?dk(r,i):i}),e),{})}function fk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function pk(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 ZO(e)?n[e](r):e(t,r,i)}return{measure:o}}function mk(){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 hk(e,t,n,r){let i=mk(),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 gk(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 _k(e=0,t=0){let n=ek(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 vk(e,t,n){let{constrain:r}=_k(0,e),i=e+1,a=o(t);function o(e){return n?ek((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 vk(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function yk(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=mk(),w=mk(),T=_k(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){(QO(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(tk(e)*-1),r=u.byDistance(e,!m).distance;return m||ek(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=fk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=nk(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(!fk(e,r)&&e.touches.length>=2)return oe(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=nk(t,A),c=nk(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=rk(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 bk(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(fk(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&&ek(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function xk(){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 Sk(e){function t(t){return t/100*e}return{measure:t}}function Ck(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(ek(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(QO(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 wk(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=tk(a),d=u,x}function p(){return ek(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 Tk(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=_k(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=ek(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&ek(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 Ek(e,t,n,r,i){let a=_k(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return nk(e,t)<=1}function u(){let e=o[0],t=ok(o);return _k(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=ck(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 Dk(e,t,n){let r=t[0];return{limit:_k(n?r-e:ok(t),r)}}function Ok(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=_k(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 kk(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function Ak(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=>ok(e)[o]-e[0][a]).map(ek)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-ek(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function jk(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=ck(n,t);return r?lk(ok(n[0])+1):i?lk(sk(a)-ok(n)[0]+1,ok(n)[0]):e})}return{slideRegistry:l}}function Mk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>ek(e)-ek(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)=>ek(e.diff)-ek(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=>tk(e)===r);return a.length?c(a):ok(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 Nk(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 Pk(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));XO(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=>{(QO(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Fk(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 XO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Ik(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=ik(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 Lk(e,t,n,r,i,a,o,s,c){let l=.5,u=ak(i),d=ak(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:Fk(-1),translate:Ik(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 Rk(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||(QO(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function zk(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 uk(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 Bk(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 ek(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(ok(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=ck(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(ek)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Vk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=XO(n);function p(e,t){return ak(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ak(e).reduce((n,f,p)=>{let m=ok(n)||0,h=m===0,g=f===sk(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=ek(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 Hk(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=xk(),w=C.measure(t),T=n.map(C.measure),E=gk(c,l),D=E.measureSize(w),O=Sk(D),k=pk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Bk(E,w,T,n,d||!!v,i),ee=Vk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=Ak(E,k,w,T,ee),te=-ok(F)+ok(M),{snapsContained:ne,scrollContainLimit:re}=Ek(D,te,I,v,2),ie=A?ne:I,{limit:L}=Dk(te,ie,d),ae=vk(sk(ie),u,d),oe=ae.clone(),se=ak(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=hk(r,i,()=>ce(Se),e=>le(Se,e)),de=.68,fe=ie[ae.get()],R=Fk(fe),pe=Fk(fe),me=Fk(fe),he=Fk(fe),ge=wk(R,me,pe,he,f,de),z=Mk(d,ie,te,L,he),_e=Nk(ue,ae,oe,ge,z,he,o),ve=kk(L),B=mk(),ye=zk(t,n,o,h),{slideRegistry:be}=jk(A,v,ie,re,ee,se),xe=Pk(e,n,be,_e,ge,B,o,S),Se={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:ue,axis:E,dragHandler:yk(E,e,r,i,he,bk(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:Ck(t,o,i,n,E,y,C),scrollBody:ge,scrollBounds:Tk(L,me,he,ge,O),scrollLooper:Ok(te,L,me,[R,me,pe,he]),scrollProgress:ve,scrollSnapList:ie.map(ve.get),scrollSnaps:ie,scrollTarget:z,scrollTo:_e,slideLooper:Lk(E,D,te,j,M,F,ie,me,n),slideFocus:xe,slidesHandler:Rk(t,o,b),slidesInView:ye,slideIndexes:se,slideRegistry:be,slidesToScroll:ee,target:he,translate:Ik(E,t)};return Se}function Uk(){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 Wk={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 Gk(e){function t(e,t){return dk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,uk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>uk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Kk(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 qk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Gk(i),o=Kk(a),s=mk(),c=Uk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Wk,qk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(ZO(t)?e.querySelector(t):t)||e.children[0];let r=ZO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Hk(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}qk.globalOptions=void 0;function Jk(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)(()=>{qO(n.current,e)||(n.current=e,c())},[e,c]),(0,H.useEffect)(()=>{YO(r.current,t)||(r.current=t,c())},[t,c]),(0,H.useEffect)(()=>{if(KO()&&o){qk.globalOptions=Jk.globalOptions;let e=qk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Jk.globalOptions=void 0;var Yk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Xk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Zk=Cn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":V(t),"--carousel-control-size":V(n),"--carousel-controls-offset":ot(r)}})),Qk=K(e=>{let t=W(`Carousel`,Yk,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:IO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Zk}),te=Rt(ee),ne=Mi(),{dir:re}=Ki(),[ie,L]=Jk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Xk,...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=>gt(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)(dl,{...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)(PO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,U.jsx)(HO,{...t,selector:`.${ne}`}):(0,U.jsx)(RO,{...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)(pl,{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)(dl,{"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)(Pf,{style:{transform:`rotate(${UO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,U.jsx)(dl,{"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)(Pf,{style:{transform:`rotate(${UO({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})]})]})});Qk.classes=IO,Qk.varsResolver=Zk,Qk.displayName=`@mantine/carousel/Carousel`,Qk.Slide=LO;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:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function eA({...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 tA={"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`},nA=Qk.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)(eA,{height:16,width:16}),previousControlIcon:(0,U.jsx)($k,{height:16,width:16}),slideGap:V(tA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),rA={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 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:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function aA({...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 oA=tm.extend({classNames:rA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,U.jsx)(aA,{...t}):(0,U.jsx)(iA,{...t})}}),sA=Bm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),cA={XS:352,SM:584,MD:800,LG:1160,XL:1160},lA=Object.entries(cA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:V(n)}),{}),uA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},dA=Wm.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:Tn({[uA.fluidContainer]:n,[uA.miniContainer]:t===`mini`,[uA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in lA?lA[t]:V(t)}})}),fA={placeholder:wO,getYearControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`month`)&&{"current-month":!0}}})},pA={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`},mA=fO.extend({classNames:pA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,Q.default)(e),n=(0,Q.default)().isSame(t,`day`);return(0,U.jsx)(Xf,{span:!0,className:Tn({[pA.dayToday]:n}),children:t.format(`D`)})},...fA}}),hA=CO.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:{...fA,valueFormat:wO}}),gA=Jm.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),_A={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},vA=mh.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:_A.xl,blur:6}}}),yA=Oh.extend({defaultProps:{columnGap:24,rowGap:16}}),bA=Eu.extend({defaultProps:{gap:0,align:`flex-start`}}),xA={wrapper:`_wrapper_4biwb_1`,input:`_input_4biwb_9`,section:`_section_4biwb_42`},SA={placeholder:`_placeholder_1o876_1`},CA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},wA=bf.extend({classNames:xA}),TA=bf.Wrapper.extend({classNames:CA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),EA=bf.Placeholder.extend({classNames:SA}),DA=cu.extend({defaultProps:{size:`xs`}}),OA=eg.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),kA=gg.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:_A.xl,blur:6},scrollAreaComponent:sl.Autosize}}),AA=cO.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:{...fA}}),jA=xO.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:{...fA}}),MA=Pg.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)(Eu,{gap:8,children:[(0,U.jsx)(tm,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,U.jsx)(Xf,{span:!0,children:t.label})]}),searchable:!0}}),NA=Lg.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),PA=Vg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),FA=Q_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),IA=xv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:eA,previousIcon:$k,size:`lg`}}),LA=gl.extend({defaultProps:{shadow:`none`}});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:`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 zA({...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 BA=Ev.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,U.jsx)(RA,{}):(0,U.jsx)(zA,{})}}),VA=wg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),HA=eu.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),UA=Fv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),WA=Zv.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`}}),GA=Zv.Card.extend({classNames:{card:`_card_11cie_1`}}),KA=Zv.Indicator.extend({classNames:{indicator:`_indicator_yh8fo_1`,icon:`_icon_yh8fo_17`}}),qA=Cy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function JA({...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 YA=({checked:e,option:t})=>(0,U.jsxs)(Eu,{gap:8,children:[e&&(0,U.jsx)(JA,{width:16,height:16}),(0,U.jsx)(Xf,{span:!0,children:t.label})]}),XA=Ty.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:YA}}),ZA=Vy.extend({defaultProps:{gap:0}}),QA=Zy.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}}),$A=ib.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}}),ej=Cb.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}}),tj=Nb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),nj=Rb.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),rj=Xf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),ij=Lh.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),aj=Yb.extend({classNames:{root:`_root_6pd11_1`}}),oj=dy.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),sj=iO.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:{...fA}}),cj=yO.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:{...fA}}),lj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],uj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],dj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],fj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],pj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],mj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],hj={xs:V(10),sm:V(12),md:V(14),lg:V(16),xl:V(20)},gj={xs:V(12),sm:V(16),md:V(20),lg:V(24),xl:V(28)},_j={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)}}},vj=Object.entries(cA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:We(n)}),{});function yj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function bj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(yj(a)&&yj(i)?n[r]=bj(a,i):n[r]=i)}return n}var xj={"brand-dark-blue":lj,"brand-orange":uj,accent:uj,blue:dj,orange:fj,red:pj,green:mj},Sj={Accordion:DO,ActionIcon:OO,Alert:kO,Anchor:AO,Avatar:jO,Badge:MO,Button:NO,Carousel:nA,Checkbox:oA,ColorSwatch:sA,Container:dA,DateInput:TO,DatePicker:mA,DatePickerInput:hA,Divider:gA,Drawer:vA,Grid:yA,Group:bA,Input:wA,InputPlaceholder:EA,InputWrapper:TA,Loader:DA,Menu:OA,Modal:kA,MonthPicker:AA,MonthPickerInput:jA,MultiSelect:MA,NavLink:NA,Notification:PA,NumberInput:FA,Paper:LA,Pagination:IA,PasswordInput:BA,Pill:VA,Popover:HA,Progress:UA,Radio:WA,RadioCard:GA,RadioIndicator:KA,SegmentedControl:qA,Select:XA,Stack:ZA,Stepper:QA,Switch:$A,Table:ej,Tabs:tj,TagsInput:nj,Text:rj,Textarea:ij,Title:aj,Tooltip:oj,YearPicker:sj,YearPickerInput:cj};function Cj(e={}){let t={...hj,...e.fontSizes},n={...gj,...e.lineHeights},r=bj(_j,e.headings??{}),i={...vj,...e.breakpoints},a={...xj,...e.colors};return Vr({components:Sj,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})}Cj();var wj={"border-025":`1px`,"border-050":`2px`},Tj={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Ej={"primary-lighter":`#F8F8FB`,"primary-light":`#EFEFF6`,"primary-default":`#414275`,"primary-dark":`#35355F`,"primary-darker":`#18182B`},Dj={"secondary-lighter":`#FFF7F0`,"secondary-light":`#FFA34D`,"secondary-default":`#FF7A00`,"secondary-dark":`#A85100`,"secondary-darker":`#7A3B00`},Oj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},kj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},Aj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},jj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},Mj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Nj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Pj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Fj={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Ij={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Lj={"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%`},Rj={"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)`},zj={...Tj,...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj,...Fj},Bj=_A;function Vj(e={}){let{tokens:t={},theme:n={}}=e;return Hr(Cj(n),Vr({other:{border:{...wj,...t.border},color:{...zj,...t.color},iconSize:{...Ij,...t.iconSize},opacity:{...Bj,...t.opacity},radius:{...Lj,...t.radius},space:{...tA,...t.space},shadow:{...Rj,...t.shadow}}}))}Vj();function Hj(){return wr()}var Uj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Wj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Gj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},Kj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},qj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},Jj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Yj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Xj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Zj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},Qj={...Gj,...Kj,...qj,...Jj,...Yj,...Xj,...Zj},$j={"icon-xs":Ij[`icon-xs`],"icon-sm":Ij[`icon-sm`],"icon-md":Ij[`icon-md`],"icon-lg":Ij[`icon-lg`],"icon-xl":Ij[`icon-xl`]},eM={"radius-150":Lj[`radius-150`],"radius-300":Lj[`radius-300`],"radius-400":Lj[`radius-400`],"radius-500":Lj[`radius-500`]},tM={"space-150":tA[`space-150`],"space-200":tA[`space-200`],"space-300":tA[`space-300`],"space-400":tA[`space-400`],"space-500":tA[`space-500`],"space-600":tA[`space-600`]},nM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(12),md:V(14),lg:V(16)}},brand:{darkBlue:Uj,orange:Wj},tokens:{color:Qj,radius:eM,space:tM,iconSize:$j}},rM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],iM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],aM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},oM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},sM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},cM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},lM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},uM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},dM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},fM={...aM,...oM,...sM,...cM,...lM,...uM,...dM},pM={"icon-sm":Ij[`icon-sm`],"icon-md":Ij[`icon-md`],"icon-lg":Ij[`icon-lg`],"icon-xl":Ij[`icon-xl`]},mM={"radius-300":Lj[`radius-300`],"radius-400":Lj[`radius-400`],"radius-500":Lj[`radius-500`]},hM={"space-300":tA[`space-300`],"space-400":tA[`space-400`],"space-500":tA[`space-500`],"space-600":tA[`space-600`],"space-700":tA[`space-700`],"space-800":tA[`space-800`],"space-900":tA[`space-900`]},gM={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`accent`,fontSizes:{sm:V(13),md:V(15),lg:V(17)}},brand:{darkBlue:rM,orange:iM},tokens:{color:fM,radius:mM,space:hM,iconSize:pM}},_M={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`accent`},brand:{darkBlue:lj,orange:uj},tokens:{color:{...Tj,...Ej,...Dj,...Mj,...Nj,...Pj,...Fj},radius:Lj,space:tA,iconSize:Ij,border:wj,shadow:Rj,opacity:_A}},ocean:gM,forest:nM},vM=[`foundations`,`ocean`,`forest`],yM=`foundations`;function bM(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 xM={foundations:bM(_M.foundations),ocean:bM(_M.ocean),forest:bM(_M.forest)};function SM(e){return typeof e==`string`&&vM.includes(e)}function CM(e){return xM[SM(e)?e:yM]}function wM({themeName:e}={}){return Vj(CM(e).options)}var TM=(0,H.createContext)(null),EM=e=>{let t=(0,H.useContext)(TM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function DM(){return EM()}var OM=({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)(TM.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)},kM=(0,H.createContext)(null),AM=(0,H.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function jM({runtime:e,children:t}){return(0,U.jsx)(AM.Provider,{value:e,children:t})}function MM({config:e,children:t}){return(0,U.jsx)(kM.Provider,{value:e,children:t})}var NM=(0,H.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),PM=({children:e,config:t})=>(0,U.jsx)(NM.Provider,{value:t,children:e});function FM({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)(OM,{i18n:Fe,children:(0,U.jsx)(zr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,U.jsx)(eS,{client:bE,children:(0,U.jsx)(PM,{config:t,children:(0,U.jsx)(MM,{config:n,children:(0,U.jsx)(jM,{runtime:r,children:e})})})})})})}function IM(){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 LM=4;function RM(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}=IM();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>=LM&&(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 zM(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 BM={root:`_root_677yy_1`,button:`_button_677yy_5`,buttonInner:`_buttonInner_677yy_30`,iconSection:`_iconSection_677yy_35`,label:`_label_677yy_39`};function VM({onClick:e,zIndex:t,position:n,label:r}){let i=Hj(),{handlePointerDown:a,style:o}=RM({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:BM.root,style:d,children:(0,U.jsx)(jm,{onClick:e,onPointerDown:a,style:f,classNames:{root:BM.button,inner:BM.buttonInner,section:BM.iconSection,label:BM.label},leftSection:(0,U.jsx)(zM,{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 HM({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 UM({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}=HM({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,U.jsxs)(Eu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,U.jsx)(Xf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,U.jsx)(cu,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,U.jsx)(Xf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var{entries:WM,setPrototypeOf:GM,isFrozen:KM,getPrototypeOf:qM,getOwnPropertyDescriptor:JM}=Object,{freeze:YM,seal:XM,create:ZM}=Object,{apply:QM,construct:$M}=typeof Reflect<`u`&&Reflect;YM||=function(e){return e},XM||=function(e){return e},QM||=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)},$M||=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 eN=mN(Array.prototype.forEach),tN=mN(Array.prototype.lastIndexOf),nN=mN(Array.prototype.pop),rN=mN(Array.prototype.push),iN=mN(Array.prototype.splice),aN=mN(String.prototype.toLowerCase),oN=mN(String.prototype.toString),sN=mN(String.prototype.match),cN=mN(String.prototype.replace),lN=mN(String.prototype.indexOf),uN=mN(String.prototype.trim),dN=mN(Object.prototype.hasOwnProperty),fN=mN(RegExp.prototype.test),pN=hN(TypeError);function mN(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 QM(e,t,r)}}function hN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return $M(e,n)}}function gN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:aN;GM&&GM(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(KM(t)||(t[r]=e),i=e)}e[i]=!0}return e}function _N(e){for(let t=0;t<e.length;t++)dN(e,t)||(e[t]=null);return e}function vN(e){let t=ZM(null);for(let[n,r]of WM(e))dN(e,n)&&(Array.isArray(r)?t[n]=_N(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=vN(r):t[n]=r);return t}function yN(e,t){for(;e!==null;){let n=JM(e,t);if(n){if(n.get)return mN(n.get);if(typeof n.value==`function`)return mN(n.value)}e=qM(e)}function n(){return null}return n}var bN=YM(`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(`.`)),xN=YM(`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(`.`)),SN=YM([`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`]),CN=YM([`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`]),wN=YM(`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(`.`)),TN=YM([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),EN=YM([`#text`]),DN=YM(`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(`.`)),ON=YM(`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(`.`)),kN=YM(`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(`.`)),AN=YM([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),jN=XM(/\{\{[\w\W]*|[\w\W]*\}\}/gm),MN=XM(/<%[\w\W]*|[\w\W]*%>/gm),NN=XM(/\$\{[\w\W]*/gm),PN=XM(/^data-[\-\w.\u00B7-\uFFFF]+$/),FN=XM(/^aria-[\-\w]+$/),IN=XM(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),LN=XM(/^(?:\w+script|data):/i),RN=XM(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zN=XM(/^html$/i),BN=XM(/^[a-z][.\w]*(-[.\w]+)+$/i),VN=Object.freeze({__proto__:null,ARIA_ATTR:FN,ATTR_WHITESPACE:RN,CUSTOM_ELEMENT:BN,DATA_ATTR:PN,DOCTYPE_NAME:zN,ERB_EXPR:MN,IS_ALLOWED_URI:IN,IS_SCRIPT_OR_DATA:LN,MUSTACHE_EXPR:jN,TMPLIT_EXPR:NN}),HN={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},UN=function(){return typeof window>`u`?null:window},WN=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}},GN=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function KN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UN(),t=e=>KN(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==HN.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=yN(m,`cloneNode`),g=yN(m,`remove`),_=yN(m,`nextSibling`),v=yN(m,`childNodes`),y=yN(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=GN();t.isSupported=typeof WM==`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}=VN,{IS_ALLOWED_URI:F}=VN,I=null,te=gN({},[...bN,...xN,...SN,...wN,...EN]),ne=null,re=gN({},[...DN,...ON,...kN,...AN]),ie=Object.seal(ZM(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(ZM(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=gN({},[`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=gN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Te=null,Ee=gN({},[`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=gN({},[De,Oe,ke],oN),Pe=gN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Fe=gN({},[`annotation-xml`]),Ie=gN({},[`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},Ue=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===e)){if((!e||typeof e!=`object`)&&(e={}),e=vN(e),Le=Re.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,ze=Le===`application/xhtml+xml`?oN:aN,I=dN(e,`ALLOWED_TAGS`)?gN({},e.ALLOWED_TAGS,ze):te,ne=dN(e,`ALLOWED_ATTR`)?gN({},e.ALLOWED_ATTR,ze):re,Me=dN(e,`ALLOWED_NAMESPACES`)?gN({},e.ALLOWED_NAMESPACES,oN):Ne,Te=dN(e,`ADD_URI_SAFE_ATTR`)?gN(vN(Ee),e.ADD_URI_SAFE_ATTR,ze):Ee,Ce=dN(e,`ADD_DATA_URI_TAGS`)?gN(vN(we),e.ADD_DATA_URI_TAGS,ze):we,xe=dN(e,`FORBID_CONTENTS`)?gN({},e.FORBID_CONTENTS,ze):Se,L=dN(e,`FORBID_TAGS`)?gN({},e.FORBID_TAGS,ze):vN({}),ae=dN(e,`FORBID_ATTR`)?gN({},e.FORBID_ATTR,ze):vN({}),be=dN(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||IN,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=gN({},EN),ne=ZM(null),be.html===!0&&(gN(I,bN),gN(ne,DN)),be.svg===!0&&(gN(I,xN),gN(ne,ON),gN(ne,AN)),be.svgFilters===!0&&(gN(I,SN),gN(ne,ON),gN(ne,AN)),be.mathMl===!0&&(gN(I,wN),gN(ne,kN),gN(ne,AN))),dN(e,`ADD_TAGS`)||(oe.tagCheck=null),dN(e,`ADD_ATTR`)||(oe.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?oe.tagCheck=e.ADD_TAGS:(I===te&&(I=vN(I)),gN(I,e.ADD_TAGS,ze))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?oe.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=vN(ne)),gN(ne,e.ADD_ATTR,ze))),e.ADD_URI_SAFE_ATTR&&gN(Te,e.ADD_URI_SAFE_ATTR,ze),e.FORBID_CONTENTS&&(xe===Se&&(xe=vN(xe)),gN(xe,e.FORBID_CONTENTS,ze)),e.ADD_FORBID_CONTENTS&&(xe===Se&&(xe=vN(xe)),gN(xe,e.ADD_FORBID_CONTENTS,ze)),B&&(I[`#text`]=!0),R&&gN(I,[`html`,`head`,`body`]),I.table&&(gN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw pN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw pN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=WN(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));YM&&YM(e),Be=e}},V=gN({},[...xN,...SN,...CN]),We=gN({},[...wN,...TN]),Ge=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:Ae,tagName:`template`});let n=aN(e.tagName),r=aN(t.tagName);return Me[e.namespaceURI]?e.namespaceURI===Oe?t.namespaceURI===ke?n===`svg`:t.namespaceURI===De?n===`svg`&&(r===`annotation-xml`||Pe[r]):!!V[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]||!V[n]):!!(Le===`application/xhtml+xml`&&Me[e.namespaceURI]):!1},Ke=function(e){rN(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},H=function(e,n){try{rN(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{rN(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(he||ge)try{Ke(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=sN(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){eN(e,e=>{e.call(t,n,r,Be)})}let Qe=function(e){let n=null;if(Ze(D.beforeSanitizeElements,e,null),Ye(e))return Ke(e),!0;let r=ze(e.nodeName);if(Ze(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),fe&&e.hasChildNodes()&&!Xe(e.firstElementChild)&&fN(/<[/\w!]/g,e.innerHTML)&&fN(/<[/\w!]/g,e.textContent)||e.nodeType===HN.progressingInstruction||fe&&e.nodeType===HN.comment&&fN(/<[/\w]/g,e.data))return Ke(e),!0;if(!(oe.tagCheck instanceof Function&&oe.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&et(r)&&(ie.tagNameCheck instanceof RegExp&&fN(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 Ke(e),!0}return e instanceof c&&!Ge(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&fN(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ke(e),!0):(de&&e.nodeType===HN.text&&(n=e.textContent,eN([O,k,A],e=>{n=cN(n,e,` `)}),e.textContent!==n&&(rN(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]&&fN(j,t))&&!(se&&fN(M,t))&&!(oe.attributeCheck instanceof Function&&oe.attributeCheck(t,e))){if(!ne[t]||ae[t]){if(!(et(e)&&(ie.tagNameCheck instanceof RegExp&&fN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&fN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&fN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!Te[t]&&!fN(F,cN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&lN(r,`data:`)===0&&Ce[e])&&!(le&&!fN(N,cN(r,P,``)))&&r)return!1}return!0},et=function(e){return e!==`annotation-xml`&&sN(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:uN(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`)&&(H(a,e),u=`user-content-`+u),fe&&fN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){H(a,e);continue}if(c===`attributename`&&sN(u,`href`)){H(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){H(a,e);continue}if(!ue&&fN(/\/>/i,u)){H(a,e);continue}de&&eN([O,k,A],e=>{u=cN(u,e,` `)});let d=ze(e.nodeName);if(!$e(d,c,u)){H(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)?Ke(e):nN(t.removed)}catch{H(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 pN(`dirty is not a string, aborting`)}else throw pN(`toString is not a function`);if(!t.isSupported)return e;if(pe||Ue(n),t.removed=[],typeof e==`string`&&(ye=!1),ye){if(e.nodeName){let t=ze(e.nodeName);if(!I[t]||L[t])throw pN(`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===HN.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&&Ke(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&&fN(zN,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
320
320
|
`+d),de&&eN([O,k,A],e=>{d=cN(d,e,` `)}),b&&z?b.createHTML(d):d},t.setConfig=function(){Ue(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||Ue({}),$e(ze(e),ze(t),n)},t.addHook=function(e,t){typeof t==`function`&&rN(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=tN(D[e],t);return n===-1?void 0:iN(D[e],n,1)[0]}return nN(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=GN()},t}var qN=KN(),JN=[`script`,`style`,`iframe`,`object`,`embed`,`link`,`meta`,`base`,`form`,`input`,`button`,`textarea`,`select`],YN=[`style`,`srcdoc`];function XN(e){return e?qN.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:JN,FORBID_ATTR:YN,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1}):``}function ZN({html:e,fallback:t=null,...n}){let r=(0,H.useMemo)(()=>XN(e??``),[e]);return r?(0,U.jsx)(q,{...n,dangerouslySetInnerHTML:{__html:r}}):(0,U.jsx)(U.Fragment,{children:t})}function QN(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $N=QN();function eP(e){$N=e}var tP={exec:()=>null};function nP(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(iP.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var rP=(()=>{try{return!0}catch{return!1}})(),iP={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)}}>`)},aP=/^(?:[ \t]*(?:\n|$))+/,oP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cP=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,lP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,uP=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,dP=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,fP=nP(dP).replace(/bull/g,uP).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(),pP=nP(dP).replace(/bull/g,uP).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(),mP=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,hP=/^[^\n]+/,gP=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_P=nP(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,gP).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vP=nP(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,uP).getRegex(),yP=`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`,bP=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xP=nP(`^ {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`,bP).replace(`tag`,yP).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),SP=nP(mP).replace(`hr`,cP).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`,yP).getRegex(),CP={blockquote:nP(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,SP).getRegex(),code:oP,def:_P,fences:sP,heading:lP,hr:cP,html:xP,lheading:fP,list:vP,newline:aP,paragraph:SP,table:tP,text:hP},wP=nP(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,cP).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`,yP).getRegex(),TP={...CP,lheading:pP,table:wP,paragraph:nP(mP).replace(`hr`,cP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,wP).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`,yP).getRegex()},EP={...CP,html:nP(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,bP).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:tP,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:nP(mP).replace(`hr`,cP).replace(`heading`,` *#{1,6} *[^
|
|
321
321
|
]`).replace(`lheading`,fP).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},DP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kP=/^( {2,}|\\)\n(?!\s*$)/,AP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,jP=/[\p{P}\p{S}]/u,MP=/[\s\p{P}\p{S}]/u,NP=/[^\s\p{P}\p{S}]/u,PP=nP(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,MP).getRegex(),FP=/(?!~)[\p{P}\p{S}]/u,IP=/(?!~)[\s\p{P}\p{S}]/u,LP=/(?:[^\s\p{P}\p{S}]|~)/u,RP=/(?![*_])[\p{P}\p{S}]/u,zP=/(?![*_])[\s\p{P}\p{S}]/u,BP=/(?:[^\s\p{P}\p{S}]|[*_])/u,VP=nP(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,rP?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),HP=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,UP=nP(HP,`u`).replace(/punct/g,jP).getRegex(),WP=nP(HP,`u`).replace(/punct/g,FP).getRegex(),GP=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,KP=nP(GP,`gu`).replace(/notPunctSpace/g,NP).replace(/punctSpace/g,MP).replace(/punct/g,jP).getRegex(),qP=nP(GP,`gu`).replace(/notPunctSpace/g,LP).replace(/punctSpace/g,IP).replace(/punct/g,FP).getRegex(),JP=nP(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,NP).replace(/punctSpace/g,MP).replace(/punct/g,jP).getRegex(),YP=nP(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,RP).getRegex(),XP=nP(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,BP).replace(/punctSpace/g,zP).replace(/punct/g,RP).getRegex(),ZP=nP(/\\(punct)/,`gu`).replace(/punct/g,jP).getRegex(),QP=nP(/^<(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(),$P=nP(bP).replace(`(?:-->|$)`,`-->`).getRegex(),eF=nP(`^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`,$P).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),tF=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,nF=nP(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,tF).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rF=nP(/^!?\[(label)\]\[(ref)\]/).replace(`label`,tF).replace(`ref`,gP).getRegex(),iF=nP(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,gP).getRegex(),aF=nP(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,rF).replace(`nolink`,iF).getRegex(),oF=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sF={_backpedal:tP,anyPunctuation:ZP,autolink:QP,blockSkip:VP,br:kP,code:OP,del:tP,delLDelim:tP,delRDelim:tP,emStrongLDelim:UP,emStrongRDelimAst:KP,emStrongRDelimUnd:JP,escape:DP,link:nF,nolink:iF,punctuation:PP,reflink:rF,reflinkSearch:aF,tag:eF,text:AP,url:tP},cF={...sF,link:nP(/^!?\[(label)\]\((.*?)\)/).replace(`label`,tF).getRegex(),reflink:nP(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,tF).getRegex()},lF={...sF,emStrongRDelimAst:qP,emStrongLDelim:WP,delLDelim:YP,delRDelim:XP,url:nP(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,oF).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:nP(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,oF).getRegex()},uF={...lF,br:nP(kP).replace(`{2,}`,`*`).getRegex(),text:nP(lF.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},dF={normal:CP,gfm:TP,pedantic:EP},fF={normal:sF,gfm:lF,breaks:uF,pedantic:cF},pF={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},mF=e=>pF[e];function hF(e,t){if(t){if(iP.escapeTest.test(e))return e.replace(iP.escapeReplace,mF)}else if(iP.escapeTestNoEncode.test(e))return e.replace(iP.escapeReplaceNoEncode,mF);return e}function gF(e){try{e=encodeURI(e).replace(iP.percentDecode,`%`)}catch{return null}return e}function _F(e,t){let n=e.replace(iP.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(iP.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(iP.slashPipe,`|`);return n}function vF(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 yF(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 bF(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 xF(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 SF(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 nH(e){let t=e.indexOf(`{`),n=e.indexOf(`[`);return t===-1?n:n===-1?t:Math.min(t,n)}function rH(e){return e===`{`||e===`[`}function iH(e){return e===`}`||e===`]`}function aH(e){return e===`}`?`{`:`[`}function oH(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(rH(t)){n.push(t);continue}if(iH(t)&&(n[n.length-1]===aH(t)&&n.pop(),n.length===0))return{end:a+1,openStack:[],inString:!1}}}return{end:null,openStack:n,inString:r}}function sH(e){let t=nH(e);if(t<0)return e;let{end:n,openStack:r,inString:i}=oH(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 cH(e,t){return oH(e,t).end}var lH=l(tH());function uH(e){try{return JSON.parse(e)}catch{return null}}function dH(e){return uH(e)??(()=>{try{return lH.default.parse(e)}catch{return null}})()}function fH(e){return e.replace(/\\r\\n/g,`
|
|
400
400
|
`).replace(/\\n/g,`
|
|
401
401
|
`).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\//g,`/`).replace(/\\\\/g,`\\`)}function pH(e){return e&&e.replace(/([{\s,])([A-Za-z0-9_@$-]+)\s*:/g,(e,t,n)=>`${t}"${n}":`)}function mH(e){let t=e.trim();t=t.replace(/[""]/g,`"`).replace(/['']/g,`'`),t=t.replace(/,\s*([}\]])/g,`$1`);try{t=pH(t)}catch{}return t=sH(t),dH(t)}function hH(e){if(!e||typeof e!=`string`)return null;let t=uH(e);if(t!=null)return t;try{let t=lH.default.parse(e);if(t!=null)return t}catch{}if(e.includes(`\\"`)||e.includes(`\\n`)||e.includes(`\\r`)||e.includes(`\\\\`)){let t=dH(fH(e));if(t!=null)return t}try{return mH(e)}catch{return null}}function gH(e){let t=nH(e);if(t<0)return null;let n=cH(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:sH(r).trim(),consumed:r.length}}var _H=`"structuredData":`,vH=`\\"structuredData\\":`;function yH(e){let t=e.indexOf(_H);if(t<0&&(t=e.indexOf(vH)),t<0)return null;let n=t+17,r=e.indexOf(`{`,n);if(r<0||r>n+10)return null;let i=cH(e,r),a,o;i===null?(a=e.slice(t,r).trim()+sH(e.slice(r)).trim(),o=e.length-t):(a=e.slice(t,i).trim(),o=i-t),t===e.indexOf(vH)&&(a=a.replace(/\\"/g,`"`));let s=`{`+a+`}`;return{start:t,fullJson:s,consumed:o}}function bH(e){let t=e.trim();if(!t||t.length<10)return!1;let n=nH(t);return n>=0&&cH(t,n)===null&&t.length-n>10}function xH(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 SH(e){return/^\s*(?:[\]}]+\s*)+/.exec(e)?.[0].length??0}function CH(e){return e&&typeof e==`object`?e:null}function wH(e){return Array.isArray(e)?e:[]}function TH(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 EH(e,t,n){let r=TH(e.used)??TH(e.currentValueRaw)??0,i=TH(e.allowance),a=TH(e.remaining),o=i??TH(e.total)??(r!=null&&a!=null?r+a:null)??TH(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?TH(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 DH(e){let t=[],n=wH(e?.responseList);for(let e of n){let n=EH(e,typeof e.type==`string`?e.type:`usage`,!0);n&&t.push(n)}return t.length>0?t:null}function OH(e){let t=e.items;if(Array.isArray(t)&&t.length>0){let e=CH(t[0]);if(e)return e}return e}function kH(e){let t=CH(e),n=CH(CH(t?.structuredData)?.data??t?.data);if(!n)return null;let r=DH(n);if(r)return r;let i=wH(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=OH(e);if(!n)continue;let r=EH(n,t);r&&a.push(r)}return a.length>0?a:null}function AH(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function jH(e){if(!e||typeof e!=`object`)return null;let t=e,n=AH(t.buttonText);if(!n)return null;let r=AH(t.targetAgent)??void 0;return{buttonText:n,agentMessage:AH(t.agentMessage)??r??n,...r?{targetAgent:r}:{}}}function MH(e){if(!e||typeof e!=`object`)return null;let t=e;if(!Array.isArray(t.actions))return null;let n=t.actions.map(jH).filter(e=>e!==null);return n.length===0?null:{actions:n}}function NH(e){return e&&typeof e==`object`?e:null}function PH(e){if(typeof e!=`string`)return null;switch(e){case`card`:case`link`:case`chart`:case`highlightBox`:return e;default:return null}}function FH(e){let t=NH(e);if(!t)return null;let n=NH(t.structuredData),r=[NH(n?.visualization)?.type,NH(n?.visualizationConfig)?.visualizationType,n?.visualizationType,NH(t.visualization)?.type,NH(t.visualizationConfig)?.visualizationType,t.visualizationType];for(let e of r)if(typeof e==`string`)return PH(e)??e;return null}function IH(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 LH(e){let t=NH(e);if(!t)return null;let n=NH(t.structuredData),r=n?.data??t.data,i=NH(n?.visualization),a=NH(t.visualization);return{data:r,visualizationConfig:i?.config??a?.config??t.visualizationConfig,responseType:IH(n?.responseType??t.responseType)}}function RH(e){let t=NH(e);return!t||NH(t.structuredData)?e:typeof t.responseType==`string`||NH(t.visualization)||NH(t.visualizationConfig)||typeof t.visualizationType==`string`||t.data!==void 0?{structuredData:t}:e}function zH(e){let t=NH(e);return t?NH(t.structuredData)||NH(t.visualization)||NH(t.visualizationConfig)||Array.isArray(t.actions)?!0:typeof t.visualizationType==`string`||typeof t.responseType==`string`:!1}var BH=new gE(`widget-config-builder`);function VH(e){let t=MH(e);if(t)return{type:`widget`,config:{type:`actions`,actions:t.actions}};let n=FH(e),r=LH(e),i={visualizationConfig:r?.visualizationConfig,responseType:r?.responseType??void 0};if(!n){let t=r?.data??e;return PV(t)?{type:`widget`,config:{type:`card`,data:t,...i}}:null}if(n===`chart`){let t=e?kH(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(!PV(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 BH.debug(`Creating widget`,{visualizationType:n,responseType:r?.responseType,widgetType:t,config:a}),{type:`widget`,config:a}}return{type:`widget`,config:{type:n}}}var HH=new gE(`useAgentMarkdownRendererElements`),UH={async:!1,breaks:!0,gfm:!0};function WH(e){return AF.parse(e,UH)}function GH(e,t,n){let r=WH(t);return r.trim()?(e.push({type:`markdown`,key:`md-${n}`,content:r}),n+1):n}function KH(e){return["```json",JSON.stringify(e,null,2),"```"].join(`
|
|
402
|
-
`)}function qH(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:hH(t)}function JH(e,t){return(0,H.useMemo)(()=>{let n=eH(e),r=qH(n);if(r)return[{type:`markdown`,key:`json-0`,content:WH(KH(r))}];let i=GV(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=GH(a,e.content,o);continue}try{let n=KV(e.dsl);if(!n){let t=qH(e.dsl);o=GH(a,t?KH(t):e.raw,o);continue}let r=MV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=GH(a,KH(r.payload),o)}catch(t){HH.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=GH(a,e.raw,o)}}return a},[e,t])}var YH={agentChatMdRenderer:`_agentChatMdRenderer_5jigp_1`},XH=(0,H.memo)(({content:e,onWidgetEvent:t})=>{let n=JH(e,t);return(0,U.jsx)(q,{className:YH.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,U.jsx)(ZN,{html:e.content},e.key):(0,U.jsx)(q,{children:e.widget},e.key))})});XH.displayName=`AgentMarkdownRenderer`;var ZH={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 QH({messages:e,isLoading:t,error:n,scrollViewportRef:r,onWidgetEvent:i}){return(0,U.jsx)(Vy,{className:ZH.body,gap:0,children:(0,U.jsx)(sl,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:r,children:(0,U.jsxs)(Vy,{className:ZH.messageList,gap:0,children:[n&&(0,U.jsx)(Gf,{color:`red`,variant:`light`,radius:`md`,children:n}),e.map(e=>(0,U.jsx)(q,{className:`${ZH.messageBubble} ${e.sentBy===`user`?ZH.messageBubbleUser:ZH.messageBubbleAssistant}`,children:e.sentBy===`assistant`?(0,U.jsx)(XH,{content:e.text,onWidgetEvent:i}):(0,U.jsx)(Xf,{className:ZH.userText,children:e.text})},e.id)),t&&(0,U.jsx)(q,{className:`${ZH.messageBubble} ${ZH.messageBubbleAssistant}`,children:(0,U.jsx)(UM,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})})]})})})}var $H={root:`_root_h7hgt_1`,input:`_input_h7hgt_6`,section:`_section_h7hgt_34`};function eU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,U.jsx)(zb,{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:$H.root,input:$H.input,section:$H.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function tU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...KF(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 nU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...KF(e),...t,children:(0,U.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function rU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Hj();return(0,U.jsx)(dy,{label:e?`Stop recording`:`Voice input`,children:(0,U.jsx)(gu,{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)(nU,{size:`sm`}):(0,U.jsx)(tU,{size:`sm`})})})}function iU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...KF(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 aU={footer:`_footer_zlzuq_1`,actionGroup:`_actionGroup_zlzuq_8`,poweredBy:`_poweredBy_zlzuq_12`,sendButton:`_sendButton_zlzuq_18`};function oU({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)(Vy,{className:aU.footer,gap:`sm`,children:[(0,U.jsx)(eU,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:c,rightSection:(0,U.jsxs)(Eu,{className:aU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,U.jsx)(rU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),(0,U.jsx)(gu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`filled`,color:`accent`,className:aU.sendButton,"aria-label":`Send message`,children:(0,U.jsx)(iU,{size:`sm`})})]})}),(0,U.jsx)(Xf,{ta:`center`,size:`xs`,c:`dimmed`,className:aU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function sU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...KF(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 cU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...KF(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 lU={header:`_header_axatc_19`,headerLeft:`_headerLeft_axatc_32`,headerInfo:`_headerInfo_axatc_37`,orbContainer:`_orbContainer_axatc_41`,orbOuter:`_orbOuter_axatc_55`,orbPulse:`_orbPulse_axatc_1`,orbMiddle:`_orbMiddle_axatc_64`,orbInner:`_orbInner_axatc_73`,orbFloat:`_orbFloat_axatc_1`,headerMeta:`_headerMeta_axatc_86`,statusDot:`_statusDot_axatc_90`,statusText:`_statusText_axatc_104`,closeButton:`_closeButton_axatc_113`,title:`_title_axatc_124`,topSubHeader:`_topSubHeader_axatc_136`,subHeaderLeft:`_subHeaderLeft_axatc_146`,subHeaderIcon:`_subHeaderIcon_axatc_152`,subHeaderTitle:`_subHeaderTitle_axatc_163`,subHeaderStatus:`_subHeaderStatus_axatc_169`};function uU({panelTitle:e,isLoading:t,isOnline:n,onClose:r}){let i=Hj();return(0,U.jsxs)(Ef,{className:lU.header,align:`center`,justify:`space-between`,children:[(0,U.jsxs)(Eu,{className:lU.headerLeft,wrap:`nowrap`,gap:10,align:`center`,children:[(0,U.jsxs)(q,{className:lU.orbContainer,"data-loading":t||void 0,children:[(0,U.jsx)(q,{className:lU.orbOuter}),(0,U.jsx)(q,{className:lU.orbMiddle}),(0,U.jsx)(q,{className:lU.orbInner,children:(0,U.jsx)(sU,{size:`sm`,color:i.other.color[`text-white`]})})]}),(0,U.jsxs)(Vy,{className:lU.headerInfo,gap:2,justify:`center`,children:[(0,U.jsx)(Xf,{className:lU.title,fw:800,children:e}),(0,U.jsxs)(Eu,{className:lU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,U.jsx)(q,{className:lU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,U.jsx)(Xf,{className:lU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,U.jsx)(gu,{variant:`subtle`,size:`md`,radius:`md`,onClick:r,className:lU.closeButton,"aria-label":`Close agent chat`,children:(0,U.jsx)(cU,{size:`sm`})})]})}var dU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function fU({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:dU.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:dU.resizeHandle,style:C.style}),(0,U.jsxs)(q,{className:dU.surface,children:[(0,U.jsx)(uU,{panelTitle:m,isLoading:a,isOnline:D,onClose:t}),(0,U.jsx)(QH,{messages:n,isLoading:a,error:o,scrollViewportRef:g,onWidgetEvent:O}),(0,U.jsx)(oU,{composerText:r,onComposerTextChange:i,isLoading:a,isListening:l,isVoiceSupported:u,canSend:s,onSubmit:c,onToggleVoice:d})]})]})}function pU(e){return(0,H.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function mU(e){return typeof e==`object`&&!!e}function hU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function gU(e){if(Array.isArray(e))return e.filter(mU);if(!mU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(mU);if(mU(n)){let e=gU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(mU);if(e.length>0)return e}return[]}function _U(e){let t=hU(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 vU(e){let t=hU(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 yU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>vU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=_U(e);return t?[t]:[]}function bU(e){return gU(e).flatMap(e=>yU(e))}var xU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},SU=fE(e=>({...xU,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:xU.runtimeInfo})}));async function CU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await EE.post(`/login`,n,{anonymous:!0,headers:{"Content-Type":`application/x-www-form-urlencoded`}});return r.data?.access_token&&(vT(r.data.access_token),ST(!1)),r.data}catch(e){throw e}}async function wU(e,t){try{let n=await EE.post(`/tenants/switch`,{tenant_id:e},{anonymous:!0,headers:{Authorization:`Bearer ${t}`}});return n.data?.data?.access_token&&vT(n.data.data.access_token),bT(n.data?.data?.tenant_id??e),ST(!0),n.data}catch(e){throw e}}async function TU(e){try{return(await EE.post(`/agent-message`,e,{anonymous:!0})).data}catch(e){throw e}}async function EU(e){try{return(await EE.post(`/agentic-app-chat`,e,{anonymous:!0})).data}catch(e){throw e}}async function DU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await EE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function OU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await EE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var kU={loginToGenai:CU,switchTenant:wU,sendAgentMessage:TU,sendAgenticAppChat:EU,fetchAssistants:DU,fetchAgenticApps:OU};function AU({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return tS({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var jU=AU({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>kU.fetchAgenticApps(e)}),MU=AU({mutationKey:[`genai`,`assistants`],mutationFn:async e=>kU.fetchAssistants(e)});function NU(e,t){let n=typeof e==`number`&&e>0;return n&&t.length===0||n&&t.includes(e)?e:t[0]}function PU(e,t,n){let{mutateAsync:r}=MU(),{mutateAsync:i}=jU(),{isMultiAgent:a}=pU(e),[o,s]=(0,H.useState)(null),c=(0,H.useRef)(null),l=(0,H.useRef)(null),u=_T(),d=yT(),f=d?Number(d):null,p=xT();(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(bU(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=NU(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function FU(){let e=(0,H.useContext)(kM),{agentType:t}=pU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=PU(e?.agentType,e?.assistantId,!!e),i=(0,H.useMemo)(()=>e?{...e,assistantId:n??e.assistantId,agentType:t,assistantLabel:r?.label,assistantInitialMessage:r?.initialMessage}:null,[e,t,r,n]);if(!i)throw Error(`AgentConfigContext is missing.`);return i}function IU(){let e=(0,H.useContext)(AM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function LU(){let e=IU();return(0,H.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var RU=AU({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e})=>kU.sendAgentMessage(e)}),zU=AU({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e})=>kU.sendAgenticAppChat(e)});function BU(){let e=RU(),t=zU();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 VU(e){return e.assistantId??null}function HU(e){return VU(e)?e.assistantInitialMessage??null:null}function UU(e){return e.customerId}function WU(e){return e.customerToken}function GU(e){return e.language??null}function KU(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 qU(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function JU(){let e=IU(),t=LU(),n=FU(),{agentType:r,isMultiAgent:i}=pU(n.agentType),{sendChatMessage:a}=BU(),[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),_=VU(n),v=i?n.assistantLabel??`Assistant`:`Assistant`,y=(0,H.useCallback)(e=>{let t={id:qU(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),b=(0,H.useCallback)((e,t)=>{let n={id:qU(),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=UU(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}p(!0),h(null);try{let e=KU(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||!VU(n))return!1;let t=UU(e),r=HU(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 YU(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=QV(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 XU(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}=IM(),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 ZU=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function QU(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):[],...ZU];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=XU({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 $U(){let e=IU(),{runtimeInfo:t,setRuntimeInfo:n}=SU(),r=(0,H.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=UU(e),r=await WU(e),i=_T();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,H.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function eW(){let e=IU();return(0,H.useMemo)(()=>e&&GU(e)||`en-US`,[e])}function tW(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 nW={bottom:24,right:24},rW=1e4;function iW(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??rW,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??nW.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??nW.right}}}}function aW({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 oW=64;function sW(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<=oW},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 cW=AU({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>kU.loginToGenai(e,t)}),lW=new gE(`useGenaiLogin`),uW=null,dW=null;function fW(e=!1){let t=(0,H.useContext)(kM),{mutateAsync:n}=cW(),[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=_T();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(uW===s&&!e){dW&&c(await dW);return}e&&(uW=null,dW=null),uW=s,i(!0),o(null),dW=(async()=>(await n({serviceAccount:a.serviceAccount,serviceKey:a.serviceKey})).access_token??null)();try{c(await dW)}catch(e){lW.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),o(`Failed to authenticate with GenAI service`)}finally{dW=null,i(!1)}})()},[t,n,e]),{isLoggingIn:r,loginError:a,loginToken:s,genaiInit:l}}var pW=AU({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>kU.switchTenant(e,t)}),mW=new gE(`useGenaiTenantSwitch`),hW=null,gW=null;function _W(e,t,n=!1){let{mutateAsync:r}=pW(),[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=_T();if(i&&i!==e&&!n){l(!0);return}if(gW===e&&!n){hW&&(await hW,l(!!_T()));return}n&&(gW=null,hW=null),gW=e,a(!0),s(null),hW=(async()=>{await r({tenant_id:t,token:e})})();try{await hW,l(!0)}catch(e){mW.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),s(`Failed to switch tenant`)}finally{hW=null,a(!1)}})()},[e,t,r,n]),{isSwitching:i,switchError:o,hasToken:c}}function vW(e=!1){let{isLoggingIn:t,loginError:n,loginToken:r,genaiInit:i}=fW(e),{isSwitching:a,switchError:o,hasToken:s}=_W(r,i?.tenantId,e);return{isAuthenticating:t||a,authError:n??o,hasToken:s}}function yW(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Gt({key:n?zT.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 bW({runtime:e,uiOptions:t}){let n=e.forceReAuth,{isAuthenticating:r,hasToken:i}=vW(n),{panelWidth:a,panelHeight:o,panelHeaderHeight:s,panelTopOffset:c,panelBorder:l,panelBorderRadius:u,zIndex:d,fabPosition:f}=iW(t),p=(0,H.useRef)(!1),m=(0,H.useRef)(!1),[h,g]=(0,H.useState)(!1),{messages:_,composerText:v,setComposerText:y,isLoading:b,error:x,sendMessage:S,sendInitialMessage:C,agentDisplayName:w,canSend:T}=JU(),{actions:E,handleActionClick:D}=YU(_,y),{runtimeInfo:O,refreshRuntimeInfo:k}=$U(),{isOpen:A,open:j,close:M}=yW({defaultOpen:!1,persist:!0,onOpen:async()=>{p.current||(p.current=!0,await k()),m.current||g(!0)}});(0,H.useEffect)(()=>{(async()=>{h&&A&&!r&&i&&await C()&&(m.current=!0,g(!1))})()},[A,r,i,C,h]);let N=sW([_.length,b]),{isListening:P,isSupported:ee,startListening:F,stopListening:I,reset:te}=tW({lang:eW(),continuous:!0,pauseOnSubmit:!0,onTextChange:y}),{panelResizableWidth:ne,actualWidth:re,shellGap:ie,floatingTop:L,floatingHeight:ae,floatingMaxHeight:oe}=QU(t,a,A,o,c),{handleSubmit:se,handleToggleVoice:ce,handleClose:le}=aW({isListening:P,stopListening:I,reset:te,sendMessage:S,composerText:v,setComposerText:y,startListening:F,close:M});return(0,U.jsxs)(U.Fragment,{children:[!A&&(0,U.jsx)(VM,{onClick:()=>void j(),zIndex:d,position:f,label:w}),A&&(0,U.jsx)(fU,{visible:!0,onClose:le,messages:_,composerText:v,onComposerTextChange:y,isLoading:b,error:x,canSend:T,onSubmit:se,actions:E,onActionClick:D,isListening:P,isVoiceSupported:ee,onToggleVoice:ce,panelTitle:w,runtimeInfo:O,scrollViewportRef:N,actualWidth:re,floatingTop:L,floatingHeight:ae,floatingMaxHeight:oe,shellGap:ie,panelHeaderHeight:s,panelResizableWidth:ne,panelBorder:l,panelBorderRadius:u,zIndex:d})]})}function xW(e){return(0,U.jsx)(bW,{...e})}function SW(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function CW(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var wW=(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=CW(n);Fe.locale||Fe.activate(`en`),DE(l,n);let u=(0,H.useMemo)(()=>wM({themeName:i?.themeName}),[i?.themeName]);return(0,U.jsx)(FM,{appConfig:l,config:n,runtime:r,theme:(0,H.useMemo)(()=>i?.theme?Hr(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,U.jsx)(`div`,{className:a,ref:e=>{c.current=e,SW(t,e)},style:o,children:(0,U.jsx)(xW,{config:n,runtime:r,uiOptions:i})})})});wW.displayName=`Widget`;var TW=`:root,
|
|
402
|
+
`)}function qH(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:hH(t)}function JH(e,t){return(0,H.useMemo)(()=>{let n=eH(e),r=qH(n);if(r)return[{type:`markdown`,key:`json-0`,content:WH(KH(r))}];let i=GV(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=GH(a,e.content,o);continue}try{let n=KV(e.dsl);if(!n){let t=qH(e.dsl);o=GH(a,t?KH(t):e.raw,o);continue}let r=MV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=GH(a,KH(r.payload),o)}catch(t){HH.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=GH(a,e.raw,o)}}return a},[e,t])}var YH={agentChatMdRenderer:`_agentChatMdRenderer_5jigp_1`},XH=(0,H.memo)(({content:e,onWidgetEvent:t})=>{let n=JH(e,t);return(0,U.jsx)(q,{className:YH.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,U.jsx)(ZN,{html:e.content},e.key):(0,U.jsx)(q,{children:e.widget},e.key))})});XH.displayName=`AgentMarkdownRenderer`;var ZH={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 QH({messages:e,isLoading:t,error:n,scrollViewportRef:r,onWidgetEvent:i}){return(0,U.jsx)(Vy,{className:ZH.body,gap:0,children:(0,U.jsx)(sl,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:r,children:(0,U.jsxs)(Vy,{className:ZH.messageList,gap:0,children:[n&&(0,U.jsx)(Gf,{color:`red`,variant:`light`,radius:`md`,children:n}),e.map(e=>(0,U.jsx)(q,{className:`${ZH.messageBubble} ${e.sentBy===`user`?ZH.messageBubbleUser:ZH.messageBubbleAssistant}`,children:e.sentBy===`assistant`?(0,U.jsx)(XH,{content:e.text,onWidgetEvent:i}):(0,U.jsx)(Xf,{className:ZH.userText,children:e.text})},e.id)),t&&(0,U.jsx)(q,{className:`${ZH.messageBubble} ${ZH.messageBubbleAssistant}`,children:(0,U.jsx)(UM,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})})]})})})}var $H={root:`_root_h7hgt_1`,input:`_input_h7hgt_6`,section:`_section_h7hgt_34`};function eU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,U.jsx)(zb,{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:$H.root,input:$H.input,section:$H.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function tU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...KF(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 nU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...KF(e),...t,children:(0,U.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function rU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Hj();return(0,U.jsx)(dy,{label:e?`Stop recording`:`Voice input`,children:(0,U.jsx)(gu,{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)(nU,{size:`sm`}):(0,U.jsx)(tU,{size:`sm`})})})}function iU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...KF(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 aU={footer:`_footer_zlzuq_1`,actionGroup:`_actionGroup_zlzuq_8`,poweredBy:`_poweredBy_zlzuq_12`,sendButton:`_sendButton_zlzuq_18`};function oU({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)(Vy,{className:aU.footer,gap:`sm`,children:[(0,U.jsx)(eU,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:c,rightSection:(0,U.jsxs)(Eu,{className:aU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,U.jsx)(rU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),(0,U.jsx)(gu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`filled`,color:`accent`,className:aU.sendButton,"aria-label":`Send message`,children:(0,U.jsx)(iU,{size:`sm`})})]})}),(0,U.jsx)(Xf,{ta:`center`,size:`xs`,c:`dimmed`,className:aU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function sU({size:e,...t}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...KF(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 cU({size:e,...t}){return(0,U.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...KF(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 lU={header:`_header_axatc_19`,headerLeft:`_headerLeft_axatc_32`,headerInfo:`_headerInfo_axatc_37`,orbContainer:`_orbContainer_axatc_41`,orbOuter:`_orbOuter_axatc_55`,orbPulse:`_orbPulse_axatc_1`,orbMiddle:`_orbMiddle_axatc_64`,orbInner:`_orbInner_axatc_73`,orbFloat:`_orbFloat_axatc_1`,headerMeta:`_headerMeta_axatc_86`,statusDot:`_statusDot_axatc_90`,statusText:`_statusText_axatc_104`,closeButton:`_closeButton_axatc_113`,title:`_title_axatc_124`,topSubHeader:`_topSubHeader_axatc_136`,subHeaderLeft:`_subHeaderLeft_axatc_146`,subHeaderIcon:`_subHeaderIcon_axatc_152`,subHeaderTitle:`_subHeaderTitle_axatc_163`,subHeaderStatus:`_subHeaderStatus_axatc_169`};function uU({panelTitle:e,isLoading:t,isOnline:n,onClose:r}){let i=Hj();return(0,U.jsxs)(Ef,{className:lU.header,align:`center`,justify:`space-between`,children:[(0,U.jsxs)(Eu,{className:lU.headerLeft,wrap:`nowrap`,gap:10,align:`center`,children:[(0,U.jsxs)(q,{className:lU.orbContainer,"data-loading":t||void 0,children:[(0,U.jsx)(q,{className:lU.orbOuter}),(0,U.jsx)(q,{className:lU.orbMiddle}),(0,U.jsx)(q,{className:lU.orbInner,children:(0,U.jsx)(sU,{size:`sm`,color:i.other.color[`text-white`]})})]}),(0,U.jsxs)(Vy,{className:lU.headerInfo,gap:2,justify:`center`,children:[(0,U.jsx)(Xf,{className:lU.title,fw:800,children:e}),(0,U.jsxs)(Eu,{className:lU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,U.jsx)(q,{className:lU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,U.jsx)(Xf,{className:lU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,U.jsx)(gu,{variant:`subtle`,size:`md`,radius:`md`,onClick:r,className:lU.closeButton,"aria-label":`Close agent chat`,children:(0,U.jsx)(cU,{size:`sm`})})]})}var dU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function fU({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:dU.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:dU.resizeHandle,style:C.style}),(0,U.jsxs)(q,{className:dU.surface,children:[(0,U.jsx)(uU,{panelTitle:m,isLoading:a,isOnline:D,onClose:t}),(0,U.jsx)(QH,{messages:n,isLoading:a,error:o,scrollViewportRef:g,onWidgetEvent:O}),(0,U.jsx)(oU,{composerText:r,onComposerTextChange:i,isLoading:a,isListening:l,isVoiceSupported:u,canSend:s,onSubmit:c,onToggleVoice:d})]})]})}function pU(e){return(0,H.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function mU(e){return typeof e==`object`&&!!e}function hU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function gU(e){if(Array.isArray(e))return e.filter(mU);if(!mU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(mU);if(mU(n)){let e=gU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(mU);if(e.length>0)return e}return[]}function _U(e){let t=hU(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 vU(e){let t=hU(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 yU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>vU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=_U(e);return t?[t]:[]}function bU(e){return gU(e).flatMap(e=>yU(e))}var xU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},SU=fE(e=>({...xU,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:xU.runtimeInfo})})),CU=24e4;async function wU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await EE.post(`/login`,n,{anonymous:!0,headers:{"Content-Type":`application/x-www-form-urlencoded`}});return r.data?.access_token&&(vT(r.data.access_token),ST(!1)),r.data}catch(e){throw e}}async function TU(e,t){try{let n=await EE.post(`/tenants/switch`,{tenant_id:e},{anonymous:!0,headers:{Authorization:`Bearer ${t}`}});return n.data?.data?.access_token&&vT(n.data.data.access_token),bT(n.data?.data?.tenant_id??e),ST(!0),n.data}catch(e){throw e}}async function EU(e){try{return(await EE.post(`/agent-message`,e,{anonymous:!0})).data}catch(e){throw e}}async function DU(e){try{return(await EE.post(`/agentic-app-chat`,e,{anonymous:!0,timeout:CU})).data}catch(e){throw e}}async function OU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await EE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function kU(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await EE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var AU={loginToGenai:wU,switchTenant:TU,sendAgentMessage:EU,sendAgenticAppChat:DU,fetchAssistants:OU,fetchAgenticApps:kU};function jU({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return tS({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var MU=jU({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>AU.fetchAgenticApps(e)}),NU=jU({mutationKey:[`genai`,`assistants`],mutationFn:async e=>AU.fetchAssistants(e)});function PU(e,t){let n=typeof e==`number`&&e>0;return n&&t.length===0||n&&t.includes(e)?e:t[0]}function FU(e,t,n){let{mutateAsync:r}=NU(),{mutateAsync:i}=MU(),{isMultiAgent:a}=pU(e),[o,s]=(0,H.useState)(null),c=(0,H.useRef)(null),l=(0,H.useRef)(null),u=_T(),d=yT(),f=d?Number(d):null,p=xT();(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(bU(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=PU(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function IU(){let e=(0,H.useContext)(kM),{agentType:t}=pU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=FU(e?.agentType,e?.assistantId,!!e),i=(0,H.useMemo)(()=>e?{...e,assistantId:n??e.assistantId,agentType:t,assistantLabel:r?.label,assistantInitialMessage:r?.initialMessage}:null,[e,t,r,n]);if(!i)throw Error(`AgentConfigContext is missing.`);return i}function LU(){let e=(0,H.useContext)(AM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function RU(){let e=LU();return(0,H.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var zU=jU({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e})=>AU.sendAgentMessage(e)}),BU=jU({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e})=>AU.sendAgenticAppChat(e)});function VU(){let e=zU(),t=BU();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 HU(e){return e.assistantId??null}function UU(e){return HU(e)?e.assistantInitialMessage??null:null}function WU(e){return e.customerId}function GU(e){return e.customerToken}function KU(e){return e.language??null}function qU(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 JU(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function YU(){let e=LU(),t=RU(),n=IU(),{agentType:r,isMultiAgent:i}=pU(n.agentType),{sendChatMessage:a}=VU(),[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),_=HU(n),v=i?n.assistantLabel??`Assistant`:`Assistant`,y=(0,H.useCallback)(e=>{let t={id:JU(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),b=(0,H.useCallback)((e,t)=>{let n={id:JU(),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=WU(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}p(!0),h(null);try{let e=qU(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||!HU(n))return!1;let t=WU(e),r=UU(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 XU(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=QV(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 ZU(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}=IM(),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 QU=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function $U(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):[],...QU];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=ZU({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 eW(){let e=LU(),{runtimeInfo:t,setRuntimeInfo:n}=SU(),r=(0,H.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=WU(e),r=await GU(e),i=_T();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,H.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function tW(){let e=LU();return(0,H.useMemo)(()=>e&&KU(e)||`en-US`,[e])}function nW(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 rW={bottom:24,right:24},iW=1e4;function aW(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??iW,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??rW.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??rW.right}}}}function oW({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 sW=64;function cW(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<=sW},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 lW=jU({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>AU.loginToGenai(e,t)}),uW=new gE(`useGenaiLogin`),dW=null,fW=null;function pW(e=!1){let t=(0,H.useContext)(kM),{mutateAsync:n}=lW(),[r,i]=(0,H.useState)(!1),[a,o]=(0,H.useState)(null),[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(null),d=t?.serviceAccount,f=t?.serviceKey,p=t?.tenantId;return(0,H.useEffect)(()=>{(async()=>{let t=_T();if(t&&!e){c(t);return}let r=d&&f&&p?{serviceAccount:d,serviceKey:f,tenantId:p}:null;if(!r)return;u(r);let a=`${r.serviceAccount}::${r.serviceKey}`;if(dW===a&&!e){fW&&c(await fW);return}e&&(dW=null,fW=null),dW=a,i(!0),o(null),fW=(async()=>(await n({serviceAccount:r.serviceAccount,serviceKey:r.serviceKey})).access_token??null)();try{c(await fW)}catch(e){uW.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),o(`Failed to authenticate with GenAI service`)}finally{fW=null,i(!1)}})()},[d,f,p,n,e]),{isLoggingIn:r,loginError:a,loginToken:s,genaiInit:l}}var mW=jU({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>AU.switchTenant(e,t)}),hW=new gE(`useGenaiTenantSwitch`),gW=null,_W=null;function vW(e,t,n=!1){let{mutateAsync:r}=mW(),[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=_T();if(i&&i!==e&&!n){l(!0);return}if(_W===e&&!n){gW&&(await gW,l(!!_T()));return}n&&(_W=null,gW=null),_W=e,a(!0),s(null),gW=(async()=>{await r({tenant_id:t,token:e})})();try{await gW,l(!0)}catch(e){hW.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),s(`Failed to switch tenant`)}finally{gW=null,a(!1)}})()},[e,t,r,n]),{isSwitching:i,switchError:o,hasToken:c}}function yW(e=!1){let{isLoggingIn:t,loginError:n,loginToken:r,genaiInit:i}=pW(e),{isSwitching:a,switchError:o,hasToken:s}=vW(r,i?.tenantId,e);return{isAuthenticating:t||a,authError:n??o,hasToken:s}}function bW(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Gt({key:n?zT.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 xW({runtime:e,uiOptions:t}){let n=e.forceReAuth,{isAuthenticating:r,hasToken:i}=yW(n),{panelWidth:a,panelHeight:o,panelHeaderHeight:s,panelTopOffset:c,panelBorder:l,panelBorderRadius:u,zIndex:d,fabPosition:f}=aW(t),p=(0,H.useRef)(!1),m=(0,H.useRef)(!1),[h,g]=(0,H.useState)(!1),{messages:_,composerText:v,setComposerText:y,isLoading:b,error:x,sendMessage:S,sendInitialMessage:C,agentDisplayName:w,canSend:T}=YU(),{actions:E,handleActionClick:D}=XU(_,y),{runtimeInfo:O,refreshRuntimeInfo:k}=eW(),{isOpen:A,open:j,close:M}=bW({defaultOpen:!1,persist:!0,onOpen:async()=>{p.current||(p.current=!0,await k()),m.current||g(!0)}});(0,H.useEffect)(()=>{(async()=>{h&&A&&!r&&i&&await C()&&(m.current=!0,g(!1))})()},[A,r,i,C,h]);let N=cW([_.length,b]),{isListening:P,isSupported:ee,startListening:F,stopListening:I,reset:te}=nW({lang:tW(),continuous:!0,pauseOnSubmit:!0,onTextChange:y}),{panelResizableWidth:ne,actualWidth:re,shellGap:ie,floatingTop:L,floatingHeight:ae,floatingMaxHeight:oe}=$U(t,a,A,o,c),{handleSubmit:se,handleToggleVoice:ce,handleClose:le}=oW({isListening:P,stopListening:I,reset:te,sendMessage:S,composerText:v,setComposerText:y,startListening:F,close:M});return(0,U.jsxs)(U.Fragment,{children:[!A&&(0,U.jsx)(VM,{onClick:()=>void j(),zIndex:d,position:f,label:w}),A&&(0,U.jsx)(fU,{visible:!0,onClose:le,messages:_,composerText:v,onComposerTextChange:y,isLoading:b,error:x,canSend:T,onSubmit:se,actions:E,onActionClick:D,isListening:P,isVoiceSupported:ee,onToggleVoice:ce,panelTitle:w,runtimeInfo:O,scrollViewportRef:N,actualWidth:re,floatingTop:L,floatingHeight:ae,floatingMaxHeight:oe,shellGap:ie,panelHeaderHeight:s,panelResizableWidth:ne,panelBorder:l,panelBorderRadius:u,zIndex:d})]})}function SW(e){return(0,U.jsx)(xW,{...e})}function CW(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function wW(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var TW=(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=wW(n);Fe.locale||Fe.activate(`en`),DE(l,n);let u=(0,H.useMemo)(()=>wM({themeName:i?.themeName}),[i?.themeName]);return(0,U.jsx)(FM,{appConfig:l,config:n,runtime:r,theme:(0,H.useMemo)(()=>i?.theme?Hr(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,U.jsx)(`div`,{className:a,ref:e=>{c.current=e,CW(t,e)},style:o,children:(0,U.jsx)(SW,{config:n,runtime:r,uiOptions:i})})})});TW.displayName=`Widget`;var EW=`:root,
|
|
403
403
|
:host {
|
|
404
404
|
color-scheme: var(--mantine-color-scheme);
|
|
405
405
|
}
|
|
@@ -8688,4 +8688,4 @@ fieldset:disabled .m_38aeed47:where(:not([data-inverted])),
|
|
|
8688
8688
|
@use '../internal/styles/font' as *;\r
|
|
8689
8689
|
@use '../internal/styles/variables' as *;\r
|
|
8690
8690
|
@use '../internal/styles/_mantine.scss' as *;\r
|
|
8691
|
-
`,
|
|
8691
|
+
`,DW=`data-widget-mount-root`,OW=`data-widget-style-root`,kW=`data-widget-adopted-style-root`;function AW(e){if(typeof e!=`string`)return e;let t=document.querySelector(e);if(!t)throw Error(`Unable to find widget mount target: ${e}`);return t}function jW(e,t){return e.shadowRoot??e.attachShadow({mode:t})}function MW(e,t){let n=e.querySelector(`style[${OW}]`);return n||(n=document.createElement(`style`),n.setAttribute(OW,`true`)),n.textContent!==t&&(n.textContent=t),e.append(n),n}function NW(e,t){if(e instanceof HTMLLinkElement)return e.href;let n=e.getAttribute(`data-vite-dev-id`);if(n)return n;let r=e.getAttribute(`nonce`);return r?`nonce:${r}:${t}`:`style-index:${t}`}function PW(e){let t=Array.from(document.querySelectorAll(`style, link[rel="stylesheet"]`)),n=new Set;t.forEach((t,r)=>{let i=NW(t,r);n.add(i);let a=`${t.tagName.toLowerCase()}[${kW}="${i}"]`,o=e.querySelector(a);if(t instanceof HTMLLinkElement){let n=o instanceof HTMLLinkElement?o:document.createElement(`link`);n.setAttribute(kW,i),n.rel=`stylesheet`,n.href=t.href,o||e.append(n);return}let s=o instanceof HTMLStyleElement?o:document.createElement(`style`);s.setAttribute(kW,i),s.textContent!==t.textContent&&(s.textContent=t.textContent),o||e.append(s)}),e.querySelectorAll(`style[${kW}], link[${kW}]`).forEach(e=>{let t=e.getAttribute(kW);(!t||!n.has(t))&&e.remove()})}function FW(e){let t=e.querySelector(`div[${DW}]`);return t||(t=document.createElement(`div`),t.setAttribute(DW,`true`),e.append(t)),t}function IW(e,t,n){let{target:r,mode:i,styles:a,...o}=n;e.render((0,U.jsx)(TW,{...o,rootElement:t}))}function LW(e){queueMicrotask(()=>{e.host.isConnected&&PW(e)})}function RW(e){let t=AW(e.target),n=jW(t,e.mode??`open`),r=FW(n),i=(0,S.createRoot)(r),a=e;return PW(n),MW(n,a.styles??EW),IW(i,t,a),LW(n),T(t,C,{runtime:a.runtime}),{host:t,shadowRoot:n,update(e){a={...a,...e},PW(n),MW(n,a.styles??EW),IW(i,t,a),LW(n)},unmount(){i.unmount(),r.remove(),T(t,w,{runtime:a.runtime})}}}var zW=`bstp-agent-widget`;function BW(e={}){return class extends HTMLElement{constructor(...t){super(...t),this.mountedWidget=null,this.propertyOptions={...e}}get options(){return this.propertyOptions}set options(e){this.propertyOptions={...this.propertyOptions,...e},this.syncWidget()}connectedCallback(){this.syncWidget()}disconnectedCallback(){this.mountedWidget?.unmount(),this.mountedWidget=null}update(e){this.propertyOptions={...this.propertyOptions,...e},this.syncWidget()}syncWidget(){if(!this.isConnected)return;let t={...e,...this.propertyOptions};if(!(!t.config||!t.runtime)){if(!this.mountedWidget){this.mountedWidget=RW({target:this,config:t.config,runtime:t.runtime,uiOptions:t.uiOptions,mode:t.mode,styles:t.styles});return}this.mountedWidget.update(t)}}}}function VW(e={}){let{tagName:t=zW,...n}=e,r=customElements.get(t);if(r)return r;let i=BW(n);return customElements.define(t,i),i}var{APP_INITIALIZER:HW,InjectionToken:UW,makeEnvironmentProviders:WW}=u,GW=new UW(`WIDGET_ELEMENT_CONFIG`);function KW(e={}){typeof customElements>`u`||VW(e)}function qW(){let e=u.provideAppInitializer;return typeof e==`function`?e(()=>{KW(u.inject(GW,{optional:!0})??{})}):{provide:HW,multi:!0,useFactory:e=>()=>{KW(e??{})},deps:[GW]}}function JW(e={}){return WW([{provide:GW,useValue:e},qW()])}function YW(e){return e?.tagName??`bstp-agent-widget`}exports.WIDGET_ELEMENT_CONFIG=GW,exports.getWidgetElementTagName=YW,exports.provideWidgetElement=JW;
|