bstp-agent-widget 0.2.129 → 0.2.131
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 +26 -26
- package/dist/angular.css +1 -1
- package/dist/angular.mjs +1840 -1830
- package/dist/element.cjs +26 -26
- package/dist/element.css +1 -1
- package/dist/element.mjs +1831 -1821
- package/dist/index.cjs +26 -26
- package/dist/index.mjs +1833 -1823
- package/dist/shadow.cjs +26 -26
- package/dist/shadow.css +1 -1
- package/dist/shadow.mjs +1824 -1814
- package/dist/styles.css +1 -1
- package/dist/styles.layer.css +1 -1
- package/package.json +1 -1
package/dist/angular.cjs
CHANGED
|
@@ -316,13 +316,13 @@ 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=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||gt();return ET(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function OT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M11.992 15H12.001`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 12V8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function kT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function AT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.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,W.jsx)(`path`,{d:`M11.992 8H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function jT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M11.992 16H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 13V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var MT={danger:(0,W.jsx)(OT,{}),info:(0,W.jsx)(AT,{}),success:(0,W.jsx)(kT,{}),warning:(0,W.jsx)(jT,{})};function NT(e,t){let n=MT[e];DT({...t,variant:e,icon:n})}function PT(e){NT(`danger`,{title:Pe._({id:`SlfejT`}),...e})}function FT(){return Pe._({id:`Qlh+W2`})}function IT(e,t){return{}[e]}function LT(e){return e?{401:Pe._({id:`9cOLBO`}),403:Pe._({id:`qriaXz`}),404:Pe._({id:`373i3G`}),500:Pe._({id:`lkE00/`}),502:Pe._({id:`9dPdtH`}),503:Pe._({id:`Vw36Gt`}),504:Pe._({id:`3R0fAs`})}[e]:``}var 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,W.jsxs)(Vy,{children:[[{label:Pe._({id:`IagCbF`}),value:e},{label:Pe._({id:`fiPesM`}),value:t},{label:Pe._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,W.jsxs)(Eu,{gap:4,children:[(0,W.jsxs)(Xf,{size:`xs`,fw:500,children:[e,`:`]}),(0,W.jsx)(Xf,{size:`xs`,children:t})]},n)),i&&(0,W.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,W.jsxs)(Vy,{gap:8,children:[(0,W.jsx)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,W.jsxs)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Pe._({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,W.jsx)(Vy,{children:XT(t)}):rE(e)}return rE(e)}function aE(){return HT()?Pe._({id:`J5ej6L`}):Pe._({id:`SlfejT`})}function oE(e){PT({title:aE(),message:iE(e),autoClose:HT()?!1:5e3})}function sE(e,t=FT()){if(e instanceof Qw){let n=e.response?.status??e.status,r=(e.message??``).toLowerCase();if(e.code===`ERR_NETWORK`||r===`network error`||r.includes(`failed to fetch`))return LT(503)||t;if(n===504||n===408||e.code===`ECONNABORTED`||r.includes(`timeout`)||r.includes(`timed out`))return LT(504)||t;let i=tE(e);if(typeof i==`string`&&i.trim())return i;let a=LT(n);if(a)return a;if(typeof e.message==`string`&&e.message.trim())return e.message}return e instanceof Error&&e.message.trim()?e.message:t}var cE=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},lE=(e=>e?cE(e):cE),uE=e=>e;function dE(e,t=uE){let n=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>t(e.getState()),[e,t]),U.useCallback(()=>t(e.getInitialState()),[e,t]));return U.useDebugValue(n),n}var fE=e=>{let t=lE(e),n=e=>dE(t,e);return Object.assign(n,t),n},pE=(e=>e?fE(e):fE),mE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function hE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var gE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:hE(),spanId:hE().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=hE().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(),_E=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=gE.getCurrentContext(this.name)??gE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:mE[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||mE[t]<mE[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(){gE.startSpan(this.name)}clearTraceContext(){gE.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 _E(`KeycloakService`);var vE=null;function yE(){return vE?.token?`Bearer ${vE.token}`:void 0}function bE(){return vE}var xE=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 SE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?CE(r):t===`private`||n?wE(r):CE(r):r}function CE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function wE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function TE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function EE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Xw.create({baseURL:TE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=bE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=SE(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=yE();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Pe.locale),!e.headers.has(`Content-Type`)&&!(e.data instanceof FormData)&&(e.headers[`Content-Type`]=`application/json`),e.method?.toLowerCase()===`get`&&(e.data={}),e},e=>Promise.reject(e)),i}var DE;function OE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;EE({baseUrl:n,prefix:r.crm}),EE({baseUrl:n,prefix:r.uiAuthz}),DE=EE({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 kE({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 AE({formatter:e,...t}){return(e||kE)(t)}function jE({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 ME({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=jE({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`)?ME({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function NE(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function PE(e){return e.current?.map(e=>e.map(e=>e.length))}function FE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=NE(i.key);a&&(i.preventDefault(),ME({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:PE(e)}))}function IE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD`)}function LE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function RE({minDate:e,maxDate:t}){let n=(0,Q.default)();return!e&&!t?IE(n):e&&(0,Q.default)(n).isBefore(e)?IE(e):t&&(0,Q.default)(n).isAfter(t)?IE(t):IE(n)}var zE=(0,U.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function BE(){let e=(0,U.use)(zE),t=(0,U.useCallback)(t=>t||e.locale,[e.locale]),n=(0,U.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,U.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,U.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function VE({value:e,type:t,withTime:n}){let r=n?LE:IE;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 HE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,W.jsx)(`input`,{type:`hidden`,value:VE({value:e,type:t,withTime:i}),name:n,form:r})}HE.displayName=`@mantine/dates/HiddenDatesInput`;var UE={day:`m_396ce5cb`},WE=Sn((e,{size:t})=>({day:{"--day-size":it(t,`day-size`)}})),GE=K(e=>{let t=G(`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,W.jsx)(dl,{...ni({name:u||`Day`,classes:UE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:WE,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()})});GE.classes=UE,GE.varsResolver=WE,GE.displayName=`@mantine/dates/Day`;function KE({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 qE={weekday:`m_18a3eca`},JE=Sn((e,{size:t})=>({weekdaysRow:{"--wr-fz":st(t),"--wr-spacing":at(t)}})),YE=K(e=>{let t=G(`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=ni({name:f||`WeekdaysRow`,classes:qE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:JE,rootSelector:`weekdaysRow`}),_=BE(),v=KE({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,W.jsx)(d,{...g(`weekday`),children:e},t));return(0,W.jsxs)(q,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,W.jsx)(d,{...g(`weekday`),children:`#`}),v]})});YE.classes=qE,YE.varsResolver=JE,YE.displayName=`@mantine/dates/WeekdaysRow`;function XE(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 ZE(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 QE({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=XE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Q.default)(ZE(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 $E(e,t){return(0,Q.default)(e).format(`YYYY-MM`)===(0,Q.default)(t).format(`YYYY-MM`)}function eD(e,t){return t?(0,Q.default)(e).isAfter((0,Q.default)(t).subtract(1,`day`),`day`):!0}function tD(e,t){return t?(0,Q.default)(e).isBefore((0,Q.default)(t).add(1,`day`),`day`):!0}function nD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>tD(e,n)&&eD(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||$E(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Q.default)().isSame(e,`date`))||s[0]}var rD=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(rD.default);function iD(e){return(0,Q.default)(e.find(e=>(0,Q.default)(e).day()===1)).isoWeek()}var aD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},oD={withCellSpacing:!0},sD=Sn((e,{size:t})=>({weekNumber:{"--wn-fz":st(t),"--wn-size":it(t,`wn-size`)}})),cD=K(e=>{let t=G(`Month`,oD,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=ni({name:c||`Month`,classes:aD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:sD,rootSelector:`month`}),I=BE(),te=QE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=nD({dates:te,minDate:IE(g),maxDate:IE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Hr({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!$E(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,W.jsx)(`td`,{...F(`monthCell`),"data-with-spacing":k||void 0,children:(0,W.jsx)(GE,{__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)||!tD(e,IE(_))||!eD(e,IE(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,W.jsxs)(`tr`,{...F(`monthRow`),children:[M&&(0,W.jsx)(`td`,{...F(`weekNumber`),children:iD(e)}),n]},t)});return(0,W.jsxs)(q,{component:`table`,...F(`month`),size:A,"data-full-width":N||void 0,...ee,children:[!b&&(0,W.jsx)(`thead`,{...F(`monthThead`),children:(0,W.jsx)(YE,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:re,styles:ie,unstyled:o,attributes:P})}),(0,W.jsx)(`tbody`,{...F(`monthTbody`),children:L})]})});cD.classes=aD,cD.varsResolver=sD,cD.displayName=`@mantine/dates/Month`;var lD={pickerControl:`m_dc6a3c71`},uD=Sn((e,{size:t})=>({pickerControl:{"--dpc-fz":st(t),"--dpc-size":it(t,`dpc-size`)}})),dD=K(e=>{let t=G(`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,W.jsx)(dl,{...ni({name:d||`PickerControl`,classes:lD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:uD,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})});dD.classes=lD,dD.varsResolver=uD,dD.displayName=`@mantine/dates/PickerControl`;function fD({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 pD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!fD({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 mD(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 hD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},gD={yearsListFormat:`YYYY`,withCellSpacing:!0},_D=K(e=>{let t=G(`YearsList`,gD,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=ni({name:m||`YearsList`,classes:hD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=BE(),O=mD(c),k=pD({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,W.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(dD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:fD({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,W.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,W.jsx)(q,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});_D.classes=hD,_D.displayName=`@mantine/dates/YearsList`;function vD({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 yD({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!vD({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 bD(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 xD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},SD={monthsListFormat:`MMM`,withCellSpacing:!0},CD=K(e=>{let t=G(`MonthsList`,SD,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=ni({name:c||`MonthsList`,classes:xD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=BE(),O=bD(l),k=yD({months:O,minDate:IE(f),maxDate:IE(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,W.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(dD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:vD({month:e,minDate:IE(f),maxDate:IE(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,W.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,W.jsx)(q,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});CD.classes=xD,CD.displayName=`@mantine/dates/MonthsList`;var wD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},TD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},ED=Sn((e,{size:t})=>({calendarHeader:{"--dch-control-size":it(t,`dch-control-size`),"--dch-fz":st(t)}})),DD=K(e=>{let t=G(`CalendarHeader`,TD,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=ni({name:w||`CalendarHeader`,classes:wD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:ED,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,U.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,W.jsx)(Pf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,U.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,U.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,W.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,W.jsx)(q,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});DD.classes=wD,DD.varsResolver=ED,DD.displayName=`@mantine/dates/CalendarHeader`;function OD(e){let t=mD(e);return[t[0][0],t[3][0]]}var kD={decadeLabelFormat:`YYYY`},AD=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}=G(`DecadeLevel`,kD,e),ee=BE(),[F,I]=OD(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,W.jsxs)(q,{"data-decade-level":!0,size:j,...P,children:[(0,W.jsx)(DD,{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,W.jsx)(_D,{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})]})});AD.classes={..._D.classes,...DD.classes},AD.displayName=`@mantine/dates/DecadeLevel`;var jD={yearLabelFormat:`YYYY`},MD=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}=G(`YearLevel`,jD,e),I=BE(),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,W.jsxs)(q,{"data-year-level":!0,size:A,...F,children:[(0,W.jsx)(DD,{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,W.jsx)(CD,{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})]})});MD.classes={...DD.classes,...CD.classes},MD.displayName=`@mantine/dates/YearLevel`;var ND={monthLabelFormat:`MMMM YYYY`},PD=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:R,fullWidth:ae,attributes:oe,...se}=G(`MonthLevel`,ND,e),ce=BE(),le={__staticSelector:ie||`MonthLevel`,classNames:te,styles:ne,unstyled:re,size:L,attributes:oe},ue=typeof A==`boolean`?A:l?!(0,Q.default)(t).endOf(`month`).isBefore(l):!1,de=typeof j==`boolean`?j:c?!(0,Q.default)(t).startOf(`month`).isAfter(c):!1;return(0,W.jsxs)(q,{"data-month-level":!0,size:L,...se,children:[(0,W.jsx)(DD,{label:typeof I==`function`?I(t):(0,Q.default)(t).locale(n||ce.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:ue,previousDisabled:de,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,fullWidth:ae,...le}),(0,W.jsx)(cD,{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:R,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:ae,...le})]})});PD.classes={...cD.classes,...DD.classes},PD.displayName=`@mantine/dates/MonthLevel`;var FD={levelsGroup:`m_30b26e33`},ID=K(e=>{let t=G(`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,W.jsx)(q,{...ni({name:c||`LevelsGroup`,classes:FD,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})});ID.classes=FD,ID.displayName=`@mantine/dates/LevelsGroup`;var LD={numberOfColumns:1},RD=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}=G(`DecadeLevelGroup`,LD,e),N=(0,U.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,W.jsx)(AD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>FE({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,W.jsx)(ID,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});RD.classes={...ID.classes,...AD.classes},RD.displayName=`@mantine/dates/DecadeLevelGroup`;var zD={numberOfColumns:1},BD=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}=G(`YearLevelGroup`,zD,e),ee=(0,U.useRef)([]),F=Array(D).fill(0).map((e,M)=>{let P=(0,Q.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,W.jsx)(MD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>FE({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,W.jsx)(ID,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});BD.classes={...MD.classes,...ID.classes},BD.displayName=`@mantine/dates/YearLevelGroup`;var VD={numberOfColumns:1},HD=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:R,...ae}=G(`MonthLevelGroup`,VD,e),oe=(0,U.useRef)([]),se=Array(P).fill(0).map((e,L)=>{let ae=(0,Q.default)(t).add(L,`months`).format(`YYYY-MM-DD`);return(0,W.jsx)(PD,{month:ae,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>FE({levelIndex:L,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:oe}),__getDayRef:(e,t,n)=>{Array.isArray(oe.current[L])||(oe.current[L]=[]),Array.isArray(oe.current[L][e])||(oe.current[L][e]=[]),oe.current[L][e][t]=n},levelControlAriaLabel:typeof ee==`function`?ee(ae):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:R},L)});return(0,W.jsx)(ID,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:R,...ae,children:se})});HD.classes={...ID.classes,...PD.classes},HD.displayName=`@mantine/dates/MonthLevelGroup`;var UD={input:`m_6fa5e2aa`},WD=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,W.jsx)(bf.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,W.jsxs)(W.Fragment,{children:[l===`modal`&&!x&&(0,W.jsx)(gg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,W.jsx)(bf.Wrapper,{...n,children:(0,W.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,W.jsx)(eu.Target,{children:(0,W.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:wn(UD.input,i?.input)},...k,children:d||(0,W.jsx)(bf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,W.jsx)(eu.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,W.jsx)(HE,{value:C,name:w,form:T,type:E,withTime:O})]})});WD.classes=UD,WD.displayName=`@mantine/dates/PickerInputBase`;var GD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,KD=(e,t)=>{let n=t?LE:IE;return Array.isArray(e)?e.map(n):n(e)};function qD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,U.useRef)(e),[o,s,c]=Jt({value:KD(t,i),defaultValue:KD(n,i),finalValue:GD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?GD(e):n,s(l))),[l,s,c]}function JD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function YD(e){return e===0?`month`:e===1?`year`:`decade`}function XD(e,t,n){return YD(ht(JD(e,0),JD(t,0),JD(n,2)))}var ZD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},QD=K(e=>{let t=G(`Calendar`,ZD,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:R,yearLabelFormat:ae,yearsListFormat:oe,getYearControlProps:se,decadeLabelFormat:ce,classNames:le,styles:ue,unstyled:de,minDate:z,maxDate:fe,locale:pe,__staticSelector:me,size:he,__preventFocus:B,__stopPropagation:ge,onNextDecade:_e,onPreviousDecade:V,onNextYear:ve,onPreviousYear:ye,onNextMonth:be,onPreviousMonth:xe,static:Se,enableKeyboardNavigation:Ce,fullWidth:we,attributes:Te,ref:Ee,...De}=t,{resolvedClassNames:Oe,resolvedStyles:ke}=Hr({classNames:le,styles:ue,props:t}),[Ae,je]=Jt({value:o?XD(o,i,r):void 0,defaultValue:a?XD(a,i,r):void 0,finalValue:XD(void 0,i,r),onChange:s}),[Me,Ne]=qD({type:`default`,value:IE(c),defaultValue:IE(l),onChange:u});(0,U.useImperativeHandle)(C,()=>e=>{Ne(e)}),(0,U.useImperativeHandle)(w,()=>e=>{je(e)});let Pe={__staticSelector:me||`Calendar`,styles:ke,classNames:Oe,unstyled:de,size:he,attributes:Te},Fe=f||d||1,Ie=(0,U.useRef)(null);if(Ie.current===null){let e=new Date;Ie.current=z&&(0,Q.default)(e).isAfter(z)?z:(0,Q.default)(e).format(`YYYY-MM-DD`)}let Le=Me||Ie.current,Re=()=>{let e=(0,Q.default)(Le).add(Fe,`month`).format(`YYYY-MM-DD`);be?.(e),Ne(e)},ze=()=>{let e=(0,Q.default)(Le).subtract(Fe,`month`).format(`YYYY-MM-DD`);xe?.(e),Ne(e)},Be=()=>{let e=(0,Q.default)(Le).add(Fe,`year`).format(`YYYY-MM-DD`);ve?.(e),Ne(e)},Ve=()=>{let e=(0,Q.default)(Le).subtract(Fe,`year`).format(`YYYY-MM-DD`);ye?.(e),Ne(e)},He=()=>{let e=(0,Q.default)(Le).add(10*Fe,`year`).format(`YYYY-MM-DD`);_e?.(e),Ne(e)},H=()=>{let e=(0,Q.default)(Le).subtract(10*Fe,`year`).format(`YYYY-MM-DD`);V?.(e),Ne(e)},Ue=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(!Ce||Se)return;let e=e=>{if(!Ue.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),H()):t&&(e.preventDefault(),Ve());break;case`ArrowDown`:t&&n?(e.preventDefault(),He()):t&&(e.preventDefault(),Be());break;case`y`:case`Y`:Ae===`month`&&(e.preventDefault(),je(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Ce,Se,Ae,Be,Ve,He,H]),(0,W.jsxs)(q,{ref:qt(Ue,Ee),size:he,"data-calendar":!0,"data-full-width":we||void 0,...De,children:[Ae===`month`&&(0,W.jsx)(HD,{month:Le,minDate:z,maxDate:fe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:Re,onPrevious:ze,hasNextLevel:r!==`month`,onLevelClick:()=>je(`year`),numberOfColumns:d,locale:pe,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:ee,previousLabel:p?.previousMonth??h,previousIcon:F,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:B,__stopPropagation:ge,static:Se,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`year`&&(0,W.jsx)(BD,{year:Le,numberOfColumns:d,minDate:z,maxDate:fe,monthsListFormat:L,getMonthControlProps:R,locale:pe,onNext:Be,onPrevious:Ve,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>je(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:ee,previousLabel:p?.previousYear??h,previousIcon:F,yearLabelFormat:ae,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Ne(t),je(XD(`month`,i,r)),_?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`decade`&&(0,W.jsx)(RD,{decade:Le,minDate:z,maxDate:fe,yearsListFormat:oe,getYearControlProps:se,locale:pe,onNext:He,onPrevious:H,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:ee,previousLabel:p?.previousDecade??h,previousIcon:F,decadeLabelFormat:ce,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Ne(t),je(XD(`year`,i,r)),g?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe})]})});QD.classes={...RD.classes,...BD.classes,...HD.classes},QD.displayName=`@mantine/dates/Calendar`;function $D(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:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me,...he}=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:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me},others:he}}function eO(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 tO({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=qD({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,U.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,U.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?eO(e,[f,u]):c[0]&&c[1]?eO(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,U.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 nO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},rO=Sn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":st(t)}})),iO={type:`default`},aO=K(e=>{let t=G(`YearPicker`,iO,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}=$D(w),D=(0,U.useRef)(null),O=(0,U.useRef)(null),k=ni({name:l||`YearPicker`,classes:nO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:rO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=tO({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Hr({classNames:n,styles:r,props:t}),I=(0,W.jsx)(QD,{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,W.jsx)(dl,{...k(`presetButton`),onClick:()=>te(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(q,{...k(`yearPickerRoot`),size:S,...E,children:[(0,W.jsx)(`div`,{...k(`presetsList`),children:ne}),I]})});aO.classes={...QD.classes,...nO},aO.varsResolver=rO,aO.displayName=`@mantine/dates/YearPicker`;var oO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},sO=Sn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":st(t)}})),cO={type:`default`},lO=K(e=>{let t=G(`MonthPicker`,cO,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}=$D(T),O=(0,U.useRef)(null),k=(0,U.useRef)(null),A=ni({name:l||`MonthPicker`,classes:oO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:sO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=tO({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Hr({classNames:n,styles:r,props:t}),te=(0,W.jsx)(QD,{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,W.jsx)(dl,{...A(`presetButton`),onClick:()=>ne(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(q,{...A(`monthPickerRoot`),size:S,...D,children:[(0,W.jsx)(`div`,{...A(`presetsList`),children:re}),te]})});lO.classes={...QD.classes,...oO},lO.varsResolver=sO,lO.displayName=`@mantine/dates/MonthPicker`;var uO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},dO=Sn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":st(t)}})),fO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},pO=K(e=>{let t=G(`DatePicker`,fO,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}=$D(S),T=(0,U.useRef)(null),E=(0,U.useRef)(null),D=ni({name:u||`DatePicker`,classes:uO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:dO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=tO({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Hr({classNames:c,styles:l,props:t}),F=(0,W.jsx)(QD,{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`?$E(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,W.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,W.jsxs)(q,{...D(`datePickerRoot`),size:y,...w,children:[(0,W.jsx)(`div`,{...D(`presetsList`),children:te}),F]})});pO.classes=QD.classes,pO.varsResolver=dO,pO.displayName=`@mantine/dates/DatePicker`;function mO(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 hO({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 gO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},_O=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`,gO,e),I=(0,U.useRef)(null),te=(0,U.useRef)(null),[ne,re]=(0,U.useState)(!1),{calendarProps:ie,others:L}=$D(F),R=BE(),ae=m||(e=>{let t=(0,Q.default)(e,f,R.getLocale(d)).toDate();return Number.isNaN(t.getTime())?mO(e):(0,Q.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),oe=k===void 0?o:k,se=e=>e?(0,Q.default)(e).locale(R.getLocale(d)).format(f):``,[ce,le,ue]=qD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[de,z]=qD({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,U.useEffect)(()=>{ue&&r!==null&&z(r)},[ue,r]);let[fe,pe]=(0,U.useState)(se(ce));(0,U.useEffect)(()=>{pe(se(ce))},[R.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),re(!0),t.trim()===``&&(k||o))le(null);else{let e=ae(t);e&&hO({date:e,minDate:h,maxDate:g})&&(le(e),z(e))}},he=e=>{y?.(e),re(!1),_&&pe(se(ce))},B=e=>{v?.(e),re(!0)},ge=e=>{b?.(e),re(!0)},_e=e=>{e.key===`Escape`&&re(!1),x?.(e)},V=e=>({...u?.(e),selected:(0,Q.default)(ce).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=oe&&(0,Q.default)(ce).isSame(e,`day`)?null:e;le(n),!ue&&n&&pe(se(n)),re(!1)}}),ve=(0,W.jsx)(bf.ClearButton,{onClick:()=>{le(null),!ue&&pe(``),re(!1)},unstyled:E,...c}),ye=o&&!!ce&&!S&&!ee;return Tt(()=>{ce!==void 0&&!ne&&pe(se(ce))},[ce]),xt(()=>re(!1),void 0,[I.current,te.current]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(bf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,W.jsxs)(eu,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,W.jsx)(eu.Target,{children:(0,W.jsx)(bf,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:fe,onChange:me,onBlur:he,onFocus:B,onClick:ge,onKeyDown:_e,readOnly:S,rightSection:T,__clearSection:ve,__clearable:ye,__clearSectionMode:s,...t,...L,disabled:ee,__staticSelector:`DateInput`})}),(0,W.jsx)(eu.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,W.jsx)(QD,{__staticSelector:`DateInput`,...ie,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:V,size:t.size,date:de,onDateChange:z,getMonthControlProps:e=>({selected:typeof ce==`string`?$E(e,ce):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof ce==`string`?(0,Q.default)(e).isSame(ce,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,W.jsx)(HE,{name:C,form:w,value:ce,type:`default`,withTime:p})]})});_O.classes={...bf.classes,...QD.classes},_O.displayName=`@mantine/dates/DateInput`;function vO({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=BE(),[d,f]=nn(!1),[p,m]=qD({type:e,value:t,defaultValue:n,onChange:r}),h=AE({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 yO={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},bO=K(e=>{let t=G(`YearPickerInput`,yO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=$D(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=vO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(WD,{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,W.jsx)(aO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||RE({maxDate:v,minDate:_}):O||RE({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})})});bO.classes={...WD.classes,...aO.classes},bO.displayName=`@mantine/dates/YearPickerInput`;var xO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},SO=K(e=>{let t=G(`MonthPickerInput`,xO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=$D(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=vO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(WD,{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,W.jsx)(lO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||RE({maxDate:v,minDate:_}):O||RE({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})})});SO.classes={...WD.classes,...lO.classes},SO.displayName=`@mantine/dates/MonthPickerInput`;var CO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},wO=K(e=>{let t=G(`DatePickerInput`,CO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,defaultDate:b,valueFormatter:x,presets:S,attributes:C,...w}=t,{resolvedClassNames:T,resolvedStyles:E}=Hr({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=$D(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=vO({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,W.jsx)(WD,{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,W.jsx)(pO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||RE({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})})});wO.classes={...WD.classes,...pO.classes},wO.displayName=`@mantine/dates/DatePickerInput`;var TO=`DD/MM/YYYY`,EO=_O.extend({defaultProps:{placeholder:TO,valueFormat:TO}});function DO({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M18 9.00005L12 15L6 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var OO=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,W.jsx)(DO,{}),variant:`separated`}}),kO=gu.extend({classNames:{root:`_root_gjf6s_1`},defaultProps:{size:`md`,variant:`primary`}}),AO=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`}}}),jO=$f.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),MO=ym.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),NO=Sm.extend({classNames:{root:`_root_4i7r9_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),PO=jm.extend({classNames:{root:`_root_1llpb_1`,section:`_section_1llpb_204`},defaultProps:{size:`md`,variant:`primary`}}),[FO,IO]=qe(`Carousel component was not found in tree`),LO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},RO=K(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=G(`CarouselSlide`,null,e),c=IO();return(0,W.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})});RO.classes=LO,RO.displayName=`@mantine/carousel/CarouselSlide`;function zO({slideGap:e,slideSize:t,selector:n}){let r=Cr(),i=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":H(pt(t))}),a=Fe(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,W.jsx)(oi,{styles:i,media:ft(Fe(a),r.breakpoints).filter(e=>Fe(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function BO(e){return typeof e==`object`&&e?Fe(e):[]}function VO(e){return e.sort((e,t)=>Be(e)-Be(t))}function HO({slideGap:e,slideSize:t}){return VO(Array.from(new Set([...BO(e),...BO(t)])))}function UO({slideGap:e,slideSize:t,selector:n}){let r=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":H(pt(t))}),i=HO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,W.jsx)(oi,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function WO({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 GO(e){return Object.prototype.toString.call(e)===`[object Object]`}function KO(e){return GO(e)||Array.isArray(e)}function qO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function JO(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}`:!KO(r)||!KO(i)?r===i:JO(r,i)})}function YO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function XO(e,t){if(e.length!==t.length)return!1;let n=YO(e),r=YO(t);return n.every((e,t)=>{let n=r[t];return JO(e,n)})}function ZO(e){return typeof e==`number`}function QO(e){return typeof e==`string`}function $O(e){return typeof e==`boolean`}function ek(e){return Object.prototype.toString.call(e)===`[object Object]`}function tk(e){return Math.abs(e)}function nk(e){return Math.sign(e)}function rk(e,t){return tk(e-t)}function ik(e,t){return e===0||t===0||tk(e)<=tk(t)?0:tk(rk(tk(e),tk(t))/e)}function ak(e){return Math.round(e*100)/100}function ok(e){return dk(e).map(Number)}function sk(e){return e[ck(e)]}function ck(e){return Math.max(0,e.length-1)}function lk(e,t){return t===ck(e)}function uk(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function dk(e){return Object.keys(e)}function fk(e,t){return[e,t].reduce((e,t)=>(dk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=ek(r)&&ek(i)?fk(r,i):i}),e),{})}function pk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function mk(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 QO(e)?n[e](r):e(t,r,i)}return{measure:o}}function hk(){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 gk(e,t,n,r){let i=hk(),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 _k(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 vk(e=0,t=0){let n=tk(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 yk(e,t,n){let{constrain:r}=vk(0,e),i=e+1,a=o(t);function o(e){return n?tk((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 yk(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function bk(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=hk(),w=hk(),T=vk(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){($O(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`,ae).add(r,`contextmenu`,ae).add(r,`click`,oe,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,R,S).add(e,`touchend`,ae).add(e,`mousemove`,R,S).add(e,`mouseup`,ae)}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(nk(e)*-1),r=u.byDistance(e,!m).distance;return m||tk(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=pk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=rk(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 R(e){if(!pk(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=rk(t,A),c=rk(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return ae(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function ae(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=ie(b(n),t),i=ik(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 oe(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function se(){return M}return{init:F,destroy:I,pointerDown:se}}function xk(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(pk(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&&tk(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function Sk(){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 Ck(e){function t(t){return t/100*e}return{measure:t}}function wk(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(tk(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{($O(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 Tk(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=nk(a),d=u,x}function p(){return tk(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 Ek(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=vk(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=tk(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&tk(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 Dk(e,t,n,r,i){let a=vk(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return rk(e,t)<=1}function u(){let e=o[0],t=sk(o);return vk(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=lk(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 Ok(e,t,n){let r=t[0];return{limit:vk(n?r-e:sk(t),r)}}function kk(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=vk(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 Ak(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function jk(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=>sk(e)[o]-e[0][a]).map(tk)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-tk(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Mk(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=lk(n,t);return r?uk(sk(n[0])+1):i?uk(ck(a)-sk(n)[0]+1,sk(n)[0]):e})}return{slideRegistry:l}}function Nk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>tk(e)-tk(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)=>tk(e.diff)-tk(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=>nk(e)===r);return a.length?c(a):sk(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 Pk(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 Fk(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));ZO(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=>{($O(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Ik(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 ZO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Lk(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=ak(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 Rk(e,t,n,r,i,a,o,s,c){let l=.5,u=ok(i),d=ok(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:Ik(-1),translate:Lk(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 zk(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||($O(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Bk(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 dk(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 Vk(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 tk(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(sk(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=lk(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(tk)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Hk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=ZO(n);function p(e,t){return ok(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ok(e).reduce((n,f,p)=>{let m=sk(n)||0,h=m===0,g=f===ck(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=tk(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 Uk(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=Sk(),w=C.measure(t),T=n.map(C.measure),E=_k(c,l),D=E.measureSize(w),O=Ck(D),k=mk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Vk(E,w,T,n,d||!!v,i),ee=Hk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=jk(E,k,w,T,ee),te=-sk(F)+sk(M),{snapsContained:ne,scrollContainLimit:re}=Dk(D,te,I,v,2),ie=A?ne:I,{limit:L}=Ok(te,ie,d),R=yk(ck(ie),u,d),ae=R.clone(),oe=ok(n),se=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ce=({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`)},le=gk(r,i,()=>se(xe),e=>ce(xe,e)),ue=.68,de=ie[R.get()],z=Ik(de),fe=Ik(de),pe=Ik(de),me=Ik(de),he=Tk(z,pe,fe,me,f,ue),B=Nk(d,ie,te,L,me),ge=Pk(le,R,ae,he,B,me,o),_e=Ak(L),V=hk(),ve=Bk(t,n,o,h),{slideRegistry:ye}=Mk(A,v,ie,re,ee,oe),be=Fk(e,n,ye,ge,he,V,o,S),xe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:le,axis:E,dragHandler:bk(E,e,r,i,me,xk(E,i),z,le,ge,he,B,R,o,O,p,m,_,ue,x),eventStore:V,percentOfView:O,index:R,indexPrevious:ae,limit:L,location:z,offsetLocation:pe,previousLocation:fe,options:a,resizeHandler:wk(t,o,i,n,E,y,C),scrollBody:he,scrollBounds:Ek(L,pe,me,he,O),scrollLooper:kk(te,L,pe,[z,pe,fe,me]),scrollProgress:_e,scrollSnapList:ie.map(_e.get),scrollSnaps:ie,scrollTarget:B,scrollTo:ge,slideLooper:Rk(E,D,te,j,M,F,ie,pe,n),slideFocus:be,slidesHandler:zk(t,o,b),slidesInView:ve,slideIndexes:oe,slideRegistry:ye,slidesToScroll:ee,target:me,translate:Lk(E,t)};return xe}function Wk(){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 Gk={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 Kk(e){function t(e,t){return fk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,dk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>dk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function qk(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 Jk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Kk(i),o=qk(a),s=hk(),c=Wk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Gk,Jk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(QO(t)?e.querySelector(t):t)||e.children[0];let r=QO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Uk(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(se),_.eventHandler.init(se),_.resizeHandler.init(se),_.slidesHandler.init(se),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(se),x=o.init(se,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 R(){return e}function ae(){return S}function oe(){return C}let se={canScrollNext:N,canScrollPrev:P,containerNode:ae,internalEngine:L,destroy:k,off:p,on:f,emit:m,plugins:ie,previousScrollSnap:te,reInit:h,rootNode:R,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:oe,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),se}Jk.globalOptions=void 0;function Yk(e={},t=[]){let n=(0,U.useRef)(e),r=(0,U.useRef)(t),[i,a]=(0,U.useState)(),[o,s]=(0,U.useState)(),c=(0,U.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,U.useEffect)(()=>{JO(n.current,e)||(n.current=e,c())},[e,c]),(0,U.useEffect)(()=>{XO(r.current,t)||(r.current=t,c())},[t,c]),(0,U.useEffect)(()=>{if(qO()&&o){Jk.globalOptions=Yk.globalOptions;let e=Jk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Yk.globalOptions=void 0;var Xk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Zk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Qk=Sn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":H(t),"--carousel-control-size":H(n),"--carousel-controls-offset":at(r)}})),$k=K(e=>{let t=G(`Carousel`,Xk,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=ni({name:`Carousel`,classes:LO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Qk}),te=Lt(ee),ne=Mi(),{dir:re}=Ki(),[ie,L]=Yk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Zk,...M},E),[R,ae]=(0,U.useState)(0),[oe,se]=(0,U.useState)(0),ce=(0,U.useCallback)(e=>L&&L.scrollTo(e),[L]),le=(0,U.useCallback)(()=>{if(!L)return;let e=L.selectedScrollSnap();ae(e),e!==R&&f?.(e)},[L,ae,f,R]),ue=(0,U.useCallback)(()=>{L?.scrollPrev(),d?.()},[L]),de=(0,U.useCallback)(()=>{L?.scrollNext(),u?.()},[L]),z=(0,U.useCallback)(e=>{k&&(e.key===`ArrowRight`&&(e.preventDefault(),de()),e.key===`ArrowLeft`&&(e.preventDefault(),ue()),e.key===`Home`&&(e.preventDefault(),L?.scrollTo(0)),e.key===`End`&&(e.preventDefault(),L?.scrollTo(L.scrollSnapList().length-1)))},[L,de,ue]);(0,U.useEffect)(()=>{if(L)return l?.(L),le(),se(L.scrollSnapList().length),L.on(`select`,le),()=>{L.off(`select`,le)}},[L,M?.slidesToScroll,le]),(0,U.useEffect)(()=>{L&&(L.reInit(),se(L.scrollSnapList().length),ae(e=>ht(e,0,U.Children.toArray(c).length-1)))},[U.Children.toArray(c).length,M?.slidesToScroll]);let fe=L?.canScrollPrev()||!1,pe=L?.canScrollNext()||!1,me=(0,U.useCallback)((e,t)=>{let n=y===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,i=n?`ArrowLeft`:`ArrowUp`;if(e.key===r){e.preventDefault();let n=t<oe-1?t+1:0;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}if(e.key===i){e.preventDefault();let n=t>0?t-1:oe-1;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}e.key===`Home`&&(e.preventDefault(),ce(0),(e.currentTarget.parentElement?.children[0])?.focus()),e.key===`End`&&(e.preventDefault(),ce(oe-1),(e.currentTarget.parentElement?.children[oe-1])?.focus())},[y,oe,ce]),he=Array(oe).fill(0).map((e,t)=>(0,U.createElement)(dl,{...I(`indicator`),key:t,role:`tab`,"aria-label":`Go to slide ${t+1}`,"aria-selected":t===R,tabIndex:t===R?0:-1,"data-active":t===R||void 0,onClick:()=>ce(t),onKeyDown:e=>me(e,t),"data-orientation":y,onMouseDown:e=>e.preventDefault(),...P?.(t)}));return(0,W.jsxs)(FO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,W.jsx)(UO,{...t,selector:`.${ne}`}):(0,W.jsx)(zO,{...t,selector:`.${ne}`}),(0,W.jsxs)(q,{role:`region`,"aria-roledescription":`carousel`,...I(`root`,{className:ne}),...F,id:te,mod:[{orientation:y,"include-gap-in-size":x},A],onKeyDownCapture:z,children:[(0,W.jsx)(pl,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:oe>0&&`Slide ${R+1} of ${oe}`}),w&&(0,W.jsxs)(`div`,{...I(`controls`),"data-orientation":y,children:[(0,W.jsx)(dl,{"aria-controls":te,"aria-label":`Previous slide`,"aria-disabled":!fe,"data-inactive":!fe||void 0,"data-type":`previous`,tabIndex:fe?0:-1,...m,...I(`control`,{className:m?.className,style:m?.style}),onClick:e=>{ue(),m?.onClick?.(e)},children:O===void 0?(0,W.jsx)(Pf,{style:{transform:`rotate(${WO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,W.jsx)(dl,{"aria-controls":te,"aria-label":`Next slide`,"aria-disabled":!pe,"data-inactive":!pe||void 0,"data-type":`next`,tabIndex:pe?0:-1,...I(`control`,{className:p?.className,style:p?.style}),...p,onClick:e=>{de(),p?.onClick?.(e)},children:D===void 0?(0,W.jsx)(Pf,{style:{transform:`rotate(${WO({dir:re,orientation:y,direction:`next`})}deg)`}}):D})]}),(0,W.jsx)(`div`,{...I(`viewport`),ref:ie,"data-type":j,children:(0,W.jsx)(`div`,{...I(`container`,{className:ne}),"data-orientation":y,children:c})}),T&&(0,W.jsx)(`div`,{...I(`indicators`),role:`tablist`,"aria-label":`Slides`,"data-orientation":y,children:he})]})]})});$k.classes=LO,$k.varsResolver=Qk,$k.displayName=`@mantine/carousel/Carousel`,$k.Slide=RO;function eA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function tA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M9.00005 6L15 12L9 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var nA={"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`},rA=$k.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,W.jsx)(tA,{height:16,width:16}),previousControlIcon:(0,W.jsx)(eA,{height:16,width:16}),slideGap:H(nA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),iA={root:`_root_sbem5_1`,input:`_input_sbem5_8`,label:`_label_sbem5_26`,icon:`_icon_sbem5_47`,inner:`_inner_sbem5_54`,error:`_error_sbem5_58`};function aA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function oA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M2.5 4L7.5 4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var sA=tm.extend({classNames:iA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,W.jsx)(oA,{...t}):(0,W.jsx)(aA,{...t})}}),cA=Bm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),lA={XS:352,SM:584,MD:800,LG:1160,XL:1160},uA=Object.entries(lA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:H(n)}),{}),dA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},fA=Wm.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:wn({[dA.fluidContainer]:n,[dA.miniContainer]:t===`mini`,[dA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in uA?uA[t]:H(t)}})}),pA={placeholder:TO,getYearControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`month`)&&{"current-month":!0}}})},mA={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`},hA=pO.extend({classNames:mA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,Q.default)(e),n=(0,Q.default)().isSame(t,`day`);return(0,W.jsx)(Xf,{span:!0,className:wn({[mA.dayToday]:n}),children:t.format(`D`)})},...pA}}),gA=wO.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:{...pA,valueFormat:TO}}),_A=Jm.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),vA={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},yA=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:vA.xl,blur:6}}}),bA=Oh.extend({defaultProps:{columnGap:24,rowGap:16}}),xA=Eu.extend({defaultProps:{gap:0,align:`flex-start`}}),SA={wrapper:`_wrapper_194dy_1`,input:`_input_194dy_9`,section:`_section_194dy_42`},CA={placeholder:`_placeholder_1o876_1`},wA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},TA=bf.extend({classNames:SA}),EA=bf.Wrapper.extend({classNames:wA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),DA=bf.Placeholder.extend({classNames:CA}),OA=cu.extend({defaultProps:{size:`xs`}}),kA=eg.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),AA=gg.extend({classNames:{root:`_root_p18vd_1`,header:`_header_p18vd_9`,title:`_title_p18vd_13`,content:`_content_p18vd_20`,body:`_body_p18vd_30`,close:`_close_p18vd_36`},defaultProps:{size:`md`,yOffset:`5vh`,transitionProps:{duration:300,transition:`fade-down`},closeButtonProps:{size:24},overlayProps:{backgroundOpacity:vA.xl,blur:6},scrollAreaComponent:sl.Autosize}}),jA=lO.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:{...pA}}),MA=SO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...pA}}),NA=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,W.jsxs)(Eu,{gap:8,children:[(0,W.jsx)(tm,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,W.jsx)(Xf,{span:!0,children:t.label})]}),searchable:!0}}),PA=Lg.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),FA=Vg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),IA=Q_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),LA=xv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:tA,previousIcon:eA,size:`lg`}}),RA=gl.extend({defaultProps:{shadow:`none`}});function zA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 8C22 8 18 14 12 14C6 14 2 8 2 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,W.jsx)(`path`,{d:`M15 13.5L16.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M20 11L22 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2 13L4 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M9 13.5L7.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function BA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.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 VA=Ev.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,W.jsx)(zA,{}):(0,W.jsx)(BA,{})}}),HA=wg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),UA=eu.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),WA=Fv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),GA=Zv.extend({classNames:{root:`_root_c4gsg_1`,radio:`_radio_c4gsg_9`,label:`_label_c4gsg_22`,icon:`_icon_c4gsg_40`,error:`_error_c4gsg_58`,inner:`_inner_c4gsg_62`}}),KA=Zv.Card.extend({classNames:{card:`_card_11cie_1`}}),qA=Zv.Indicator.extend({classNames:{indicator:`_indicator_14pfe_1`,icon:`_icon_14pfe_17`}}),JA=Cy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function YA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var XA=({checked:e,option:t})=>(0,W.jsxs)(Eu,{gap:8,children:[e&&(0,W.jsx)(YA,{width:16,height:16}),(0,W.jsx)(Xf,{span:!0,children:t.label})]}),ZA=Ty.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:XA}}),QA=Vy.extend({defaultProps:{gap:0}}),$A=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}}),ej=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}}),tj=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}}),nj=Nb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),rj=Rb.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),ij=Xf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),aj=Lh.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),oj=Yb.extend({classNames:{root:`_root_6pd11_1`}}),sj=dy.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),cj=aO.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:{...pA}}),lj=bO.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:{...pA}}),uj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],dj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],fj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],pj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],mj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],hj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],gj={xs:H(10),sm:H(12),md:H(14),lg:H(16),xl:H(20)},_j={xs:H(12),sm:H(16),md:H(20),lg:H(24),xl:H(28)},vj={fontWeight:`500`,sizes:{h1:{fontSize:H(32),lineHeight:H(36)},h2:{fontSize:H(24),lineHeight:H(28)},h3:{fontSize:H(20),lineHeight:H(24)},h4:{fontSize:H(18),lineHeight:H(20)},h5:{fontSize:H(12),lineHeight:H(16)},h6:{fontSize:H(12),lineHeight:H(16)}}},yj=Object.entries(lA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:Ue(n)}),{});function bj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(bj(a)&&bj(i)?n[r]=xj(a,i):n[r]=i)}return n}var Sj={"brand-dark-blue":uj,"brand-orange":dj,danger:mj,success:hj,info:fj,blue:fj,orange:pj,red:mj,green:hj},Cj={Accordion:OO,ActionIcon:kO,Alert:AO,Anchor:jO,Avatar:MO,Badge:NO,Button:PO,Carousel:rA,Checkbox:sA,ColorSwatch:cA,Container:fA,DateInput:EO,DatePicker:hA,DatePickerInput:gA,Divider:_A,Drawer:yA,Grid:bA,Group:xA,Input:TA,InputPlaceholder:DA,InputWrapper:EA,Loader:OA,Menu:kA,Modal:AA,MonthPicker:jA,MonthPickerInput:MA,MultiSelect:NA,NavLink:PA,Notification:FA,NumberInput:IA,Paper:RA,Pagination:LA,PasswordInput:VA,Pill:HA,Popover:UA,Progress:WA,Radio:GA,RadioCard:KA,RadioIndicator:qA,SegmentedControl:JA,Select:ZA,Stack:QA,Stepper:$A,Switch:ej,Table:tj,Tabs:nj,TagsInput:rj,Text:ij,Textarea:aj,Title:oj,Tooltip:sj,YearPicker:cj,YearPickerInput:lj};function wj(e={}){let t={...gj,...e.fontSizes},n={..._j,...e.lineHeights},r=xj(vj,e.headings??{}),i={...yj,...e.breakpoints},a={...Sj,...e.colors};return Br({components:Cj,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})}wj();var Tj={"border-025":`1px`,"border-050":`2px`},Ej={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Dj={"primary-lighter":`#FFF7F0`,"primary-light":`#FFA34D`,"primary-default":`#FF7A00`,"primary-dark":`#A85100`,"primary-darker":`#7A3B00`},Oj={"secondary-lighter":`#F8F8FB`,"secondary-light":`#EFEFF6`,"secondary-default":`#414275`,"secondary-dark":`#35355F`,"secondary-darker":`#18182B`},kj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},Aj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},jj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},Mj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},Nj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Pj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Fj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Ij={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Lj={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Rj={"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%`},zj={"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)`},Bj={...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj,...Fj,...Ij},Vj=vA;function Hj(e={}){let{tokens:t={},theme:n={}}=e;return Vr(wj(n),Br({other:{border:{...Tj,...t.border},color:{...Bj,...t.color},iconSize:{...Lj,...t.iconSize},opacity:{...Vj,...t.opacity},radius:{...Rj,...t.radius},space:{...nA,...t.space},shadow:{...zj,...t.shadow}}}))}Hj();function Uj(){return Cr()}var Wj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Gj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Kj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},qj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},Jj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},Yj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Xj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Zj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Qj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},$j={...Kj,...qj,...Jj,...Yj,...Xj,...Zj,...Qj},eM={"icon-xs":Lj[`icon-xs`],"icon-sm":Lj[`icon-sm`],"icon-md":Lj[`icon-md`],"icon-lg":Lj[`icon-lg`],"icon-xl":Lj[`icon-xl`]},tM={"radius-150":Rj[`radius-150`],"radius-300":Rj[`radius-300`],"radius-400":Rj[`radius-400`],"radius-500":Rj[`radius-500`]},nM={"space-150":nA[`space-150`],"space-200":nA[`space-200`],"space-300":nA[`space-300`],"space-400":nA[`space-400`],"space-500":nA[`space-500`],"space-600":nA[`space-600`]},rM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(12),md:H(14),lg:H(16)}},brand:{darkBlue:Wj,orange:Gj},tokens:{color:$j,radius:tM,space:nM,iconSize:eM}},iM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],aM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],oM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},sM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},cM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},lM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},uM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},dM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},fM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},pM={...oM,...sM,...cM,...lM,...uM,...dM,...fM},mM={"icon-sm":Lj[`icon-sm`],"icon-md":Lj[`icon-md`],"icon-lg":Lj[`icon-lg`],"icon-xl":Lj[`icon-xl`]},hM={"radius-300":Rj[`radius-300`],"radius-400":Rj[`radius-400`],"radius-500":Rj[`radius-500`]},gM={"space-300":nA[`space-300`],"space-400":nA[`space-400`],"space-500":nA[`space-500`],"space-600":nA[`space-600`],"space-700":nA[`space-700`],"space-800":nA[`space-800`],"space-900":nA[`space-900`]},_M={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(13),md:H(15),lg:H(17)}},brand:{darkBlue:iM,orange:aM},tokens:{color:pM,radius:hM,space:gM,iconSize:mM}},vM={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`brand-orange`},brand:{darkBlue:uj,orange:dj},tokens:{color:{...Ej,...Dj,...Oj,...Nj,...Pj,...Fj,...Ij},radius:Rj,space:nA,iconSize:Lj,border:Tj,shadow:zj,opacity:vA}},ocean:_M,forest:rM},yM=[`foundations`,`ocean`,`forest`],bM=`foundations`;function xM(e){let{theme:t,brand:n,tokens:r}=e;return{label:e.label,options:{theme:{...t,colors:{...t.colors??{},"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 SM={foundations:xM(vM.foundations),ocean:xM(vM.ocean),forest:xM(vM.forest)};function CM(e){return typeof e==`string`&&yM.includes(e)}function wM(e){return SM[CM(e)?e:bM]}function TM({themeName:e}={}){return Hj(wM(e).options)}var EM=(0,U.createContext)(null),DM=e=>{let t=(0,U.useContext)(EM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function OM(){return DM()}var kM=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,U.useRef)(e.locale),i=(0,U.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,U.useState)(i());return(0,U.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,W.jsx)(EM.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)},AM=(0,U.createContext)(null),jM=(0,U.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function MM({runtime:e,children:t}){return(0,W.jsx)(jM.Provider,{value:e,children:t})}function NM({config:e,children:t}){return(0,W.jsx)(AM.Provider,{value:e,children:t})}var PM=(0,U.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),FM=({children:e,config:t})=>(0,W.jsx)(PM.Provider,{value:t,children:e});function IM({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,U.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,W.jsx)(kM,{i18n:Pe,children:(0,W.jsx)(Rr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,W.jsx)(eS,{client:xE,children:(0,W.jsx)(FM,{config:t,children:(0,W.jsx)(NM,{config:n,children:(0,W.jsx)(MM,{runtime:r,children:e})})})})})})}function LM(){let e=(0,U.useRef)(null);return{startInteraction:(0,U.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,U.useCallback)(()=>{e.current?.()},[])}}var RM=4;function zM(e={}){let{skipSelector:t=`button, [role="button"], a, input, textarea`,onDragChange:n}=e,[r,i]=(0,U.useState)({x:0,y:0}),[a,o]=(0,U.useState)(!1),s=(0,U.useRef)({startX:0,startY:0,startOffset:{x:0,y:0}}),{startInteraction:c}=LM();return{offset:r,isDragging:a,handlePointerDown:(0,U.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>=RM&&(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 BM(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,W.jsx)(`path`,{d:`M12 8V4H8`}),(0,W.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,W.jsx)(`path`,{d:`M2 14h2`}),(0,W.jsx)(`path`,{d:`M20 14h2`}),(0,W.jsx)(`path`,{d:`M15 13v2`}),(0,W.jsx)(`path`,{d:`M9 13v2`})]})}var VM={root:`_root_74oe4_1`,button:`_button_74oe4_5`,buttonInner:`_buttonInner_74oe4_30`,iconSection:`_iconSection_74oe4_35`,label:`_label_74oe4_39`};function HM({onClick:e,zIndex:t,position:n,label:r}){let i=Uj(),{handlePointerDown:a,style:o}=zM({skipSelector:``}),s=Math.min(i.other.iconSize[`icon-sm`],16),{transform:c,cursor:l,touchAction:u}=o,d=(0,U.useMemo)(()=>({transform:c,touchAction:u,zIndex:t,...n}),[n,u,c,t]),f=(0,U.useMemo)(()=>({cursor:l??`pointer`}),[l]);return(0,W.jsx)(`div`,{className:VM.root,style:d,children:(0,W.jsx)(jm,{onClick:e,onPointerDown:a,style:f,classNames:{root:VM.button,inner:VM.buttonInner,section:VM.iconSection,label:VM.label},leftSection:(0,W.jsx)(BM,{width:s,height:s}),radius:20,variant:`primary`,"aria-label":`Open ${r??`agent widget`}`,title:`Open ${r??`agent widget`}`,children:r??`Assistant`})})}var UM=(0,U.createContext)({});function WM(){return(0,U.useContext)(UM)}function GM(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim().replace(/^./,e=>e.toUpperCase())}function KM(e){if(e==null)return`-`;if(Array.isArray(e))return e.length>0?e.join(`, `):`-`;if(typeof e==`object`){let t=Object.entries(e);return t.length===0?`-`:t.map(([e,t])=>`${GM(e)}: ${String(t??`-`)}`).join(` | `)}return String(e).trim()||`-`}function qM(e){return e.trim().toLowerCase().replace(/\s+/g,`-`)}function JM(e){if(e.header.badge?.trim())return qM(e.header.badge);let t=qM(e.columnType);return t===`ourcatalog`||t===`catalog`||t===`internal`?`catalog`:`competitor`}function YM(e){if(typeof e!=`string`)return;let t=e.trim();if(!(!t||t.toLowerCase()===`internal`)){if(/^https?:\/\//i.test(t))return t;if(/^[\w.-]+\.[a-z]{2,}(\/.*)?$/i.test(t))return`https://${t}`}}function XM(e){let t=new Set;return e.forEach(e=>{Object.keys(e.specs).forEach(e=>{e!==`priceNote`&&t.add(e)})}),Array.from(t)}function ZM(e){return{formatLabel:GM,formatValue:KM,getTone:JM,toHref:YM,specKeys:XM(e)}}var QM={surface:`_surface_1p3km_1`,scroller:`_scroller_1p3km_16`,table:`_table_1p3km_32`,stickyColumn:`_stickyColumn_1p3km_39`,cornerCell:`_cornerCell_1p3km_45`,sectionLabel:`_sectionLabel_1p3km_52`,offerHeader:`_offerHeader_1p3km_61`,offerEyebrow:`_offerEyebrow_1p3km_79`,offerTitle:`_offerTitle_1p3km_89`,offerBadge:`_offerBadge_1p3km_108`,rowLabel:`_rowLabel_1p3km_122`,dataCell:`_dataCell_1p3km_123`,footerStub:`_footerStub_1p3km_124`,footerCell:`_footerCell_1p3km_125`,rowLabelText:`_rowLabelText_1p3km_142`,cellPrimary:`_cellPrimary_1p3km_154`,cellLink:`_cellLink_1p3km_155`,cellSecondary:`_cellSecondary_1p3km_181`,footerButton:`_footerButton_1p3km_193`};function $M({comparisonModal:e,fillHeight:t=!0,isBusy:n=!1,onClose:r}){if(!e||e.columns.length===0)return null;let{sendMessage:i}=WM(),{formatLabel:a,formatValue:o,getTone:s,toHref:c,specKeys:l}=ZM(e.columns),u=e.columns.some(e=>e.selectButton?.buttonText),d=(0,U.useCallback)(e=>{r?.(),i?.(e,{showUserBubble:!1})},[r,i]);return(0,W.jsx)(q,{className:QM.surface,"data-fill-height":t,children:(0,W.jsx)(sl,{type:`auto`,offsetScrollbars:!0,scrollbarSize:10,className:QM.scroller,children:(0,W.jsxs)(q,{className:QM.table,style:{gridTemplateColumns:`180px repeat(${Math.max(e.columns.length,1)}, minmax(196px, 1fr))`},children:[(0,W.jsx)(Nm,{className:`${QM.cornerCell} ${QM.stickyColumn}`,children:(0,W.jsx)(Xf,{className:QM.sectionLabel,children:`Specifications`})}),e.columns.map((e,t)=>{let n=s(e);return(0,W.jsx)(Vy,{gap:10,className:QM.offerHeader,"data-tone":n,children:(0,W.jsxs)(Ef,{direction:`column`,align:`center`,justify:`center`,gap:4,h:`100%`,children:[(0,W.jsxs)(Vy,{gap:4,align:`center`,children:[(0,W.jsx)(Xf,{className:QM.offerEyebrow,children:o(e.header.label)}),(0,W.jsx)(Xf,{className:QM.offerTitle,children:o(e.header.offerName)})]}),e.header.badge?(0,W.jsx)(Sm,{radius:`sm`,className:QM.offerBadge,children:e.header.badge}):null]})},`${e.header.offerName}-${t}`)}),l.map(t=>(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(Nm,{className:`${QM.rowLabel} ${QM.stickyColumn}`,children:(0,W.jsx)(Xf,{className:QM.rowLabelText,children:a(t)})}),e.columns.map((e,n)=>{let r=s(e),i=e.specs[t],a=/url$/i.test(t)?c(i):void 0,l=t===`price`?o(e.specs.priceNote):void 0,u=t===`price`?r===`threat`?`accent`:`strong`:`default`;return(0,W.jsxs)(Vy,{gap:4,className:QM.dataCell,children:[a?(0,W.jsx)($f,{href:a,target:`_blank`,rel:`noreferrer`,className:QM.cellLink,children:o(i)}):(0,W.jsx)(Xf,{className:QM.cellPrimary,"data-emphasis":u,children:o(i)}),l&&l!==`-`?(0,W.jsx)(Xf,{className:QM.cellSecondary,children:l}):null]},`${t}-${e.header.offerName}-${n}`)})]},t)),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Nm,{className:`${QM.footerStub} ${QM.stickyColumn}`}),e.columns.map((e,t)=>{let r=s(e);return(0,W.jsx)(Nm,{className:QM.footerCell,children:e.selectButton?.buttonText?(0,W.jsx)(jm,{radius:`md`,className:QM.footerButton,"data-tone":r,variant:r===`catalog`?`light`:`filled`,disabled:n,onClick:()=>d(e.selectButton.buttonText),children:e.selectButton.buttonText}):null},`${e.header.offerName}-${t}-cta`)})]}):null]})})})}function eN(e){return typeof document>`u`?null:e?.trim()?document.querySelector(e)??document.body:document.body}function tN(e){return e===document.body||e===document.documentElement?null:e.getBoundingClientRect()}function nN({hostContainerSelector:e,opened:t,hasComparison:n,hasContent:r,size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l}){let[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null);return(0,U.useEffect)(()=>{let t=eN(e);if(d(t),!t){p(null);return}let n=()=>{p(tN(t))};if(n(),t===document.body||t===document.documentElement)return;let r=new ResizeObserver(n);return r.observe(t),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{r.disconnect(),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]),{portalTarget:u,resolvedSize:i??(n?`xl`:`md`),shellStyle:(0,U.useMemo)(()=>f?{top:`${f.top}px`,left:`${f.left}px`,width:`${f.width}px`,height:`${f.height}px`,zIndex:a}:{top:o,height:s,left:c,right:l,zIndex:a},[f,s,c,l,o,a]),shouldRender:t&&!!u&&r}}var rN={shell:`_shell_3gb4u_1`,modalRoot:`_modalRoot_3gb4u_6`,inner:`_inner_3gb4u_12`,overlay:`_overlay_3gb4u_19`,content:`_content_3gb4u_27`,header:`_header_3gb4u_37`,mantineTitle:`_mantineTitle_3gb4u_41`,title:`_title_3gb4u_45`,subtitle:`_subtitle_3gb4u_54`,close:`_close_3gb4u_61`,body:`_body_3gb4u_75`,bodyContent:`_bodyContent_3gb4u_82`,bodyScrollArea:`_bodyScrollArea_3gb4u_89`,popupSections:`_popupSections_3gb4u_93`,bodyText:`_bodyText_3gb4u_97`};function iN({opened:e,onClose:t,message:n,isAssistantStreaming:r=!1,size:i,zIndex:a,layoutTop:o=`var(--mantine-custom-space-150)`,layoutHeight:s=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,layoutLeftOffset:c=`var(--mantine-custom-space-150)`,layoutRightOffset:l=`0px`,hostContainerSelector:u}){let d=(0,U.useId)(),f=n?.popup,p=f?.comparisonModal,m=f?.title??p?.title,h=f?.subtitle??p?.subtitle,g=f?.body??n?.text,_=!!p,{portalTarget:v,resolvedSize:y,shellStyle:b,shouldRender:x}=nN({hostContainerSelector:u,opened:e,hasComparison:_,hasContent:!!(p||g||f),size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l});return!x||!v?null:(0,cn.createPortal)((0,W.jsx)(q,{className:rN.shell,style:b,children:(0,W.jsx)(gg,{opened:e,onClose:t,title:(0,W.jsxs)(Vy,{gap:4,children:[(0,W.jsx)(Xf,{id:d,className:rN.title,component:`span`,children:m}),h?(0,W.jsx)(Xf,{className:rN.subtitle,component:`span`,children:h}):null]}),withCloseButton:!0,withinPortal:!1,centered:!0,lockScroll:!1,closeOnClickOutside:!1,trapFocus:!1,size:y,scrollAreaComponent:sl.Autosize,classNames:{root:rN.modalRoot,inner:rN.inner,overlay:rN.overlay,content:rN.content,header:rN.header,body:rN.body,close:rN.close,title:rN.mantineTitle},overlayProps:{backgroundOpacity:.22,blur:10},children:(0,W.jsx)(q,{className:rN.bodyContent,"data-layout":_?`comparison`:`text`,children:_?(0,W.jsx)(sl.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:rN.bodyScrollArea,children:(0,W.jsx)(Vy,{gap:`md`,className:rN.popupSections,children:(0,W.jsx)($M,{comparisonModal:p,fillHeight:!0,isBusy:r,onClose:t})})}):g?(0,W.jsx)(sl.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:rN.bodyScrollArea,children:(0,W.jsx)(Xf,{className:rN.bodyText,component:`p`,children:g})}):null})})}),v)}var{entries:aN,setPrototypeOf:oN,isFrozen:sN,getPrototypeOf:cN,getOwnPropertyDescriptor:lN}=Object,{freeze:uN,seal:dN,create:fN}=Object,{apply:pN,construct:mN}=typeof Reflect<`u`&&Reflect;uN||=function(e){return e},dN||=function(e){return e},pN||=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)},mN||=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 hN=kN(Array.prototype.forEach),gN=kN(Array.prototype.lastIndexOf),_N=kN(Array.prototype.pop),vN=kN(Array.prototype.push),yN=kN(Array.prototype.splice),bN=kN(String.prototype.toLowerCase),xN=kN(String.prototype.toString),SN=kN(String.prototype.match),CN=kN(String.prototype.replace),wN=kN(String.prototype.indexOf),TN=kN(String.prototype.trim),EN=kN(Object.prototype.hasOwnProperty),DN=kN(RegExp.prototype.test),ON=AN(TypeError);function kN(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 pN(e,t,r)}}function AN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return mN(e,n)}}function jN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bN;oN&&oN(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(sN(t)||(t[r]=e),i=e)}e[i]=!0}return e}function MN(e){for(let t=0;t<e.length;t++)EN(e,t)||(e[t]=null);return e}function NN(e){let t=fN(null);for(let[n,r]of aN(e))EN(e,n)&&(Array.isArray(r)?t[n]=MN(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=NN(r):t[n]=r);return t}function PN(e,t){for(;e!==null;){let n=lN(e,t);if(n){if(n.get)return kN(n.get);if(typeof n.value==`function`)return kN(n.value)}e=cN(e)}function n(){return null}return n}var FN=uN(`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(`.`)),IN=uN(`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(`.`)),LN=uN([`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`]),RN=uN([`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`]),zN=uN(`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(`.`)),BN=uN([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),VN=uN([`#text`]),HN=uN(`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(`.`)),UN=uN(`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(`.`)),WN=uN(`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(`.`)),GN=uN([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),KN=dN(/\{\{[\w\W]*|[\w\W]*\}\}/gm),qN=dN(/<%[\w\W]*|[\w\W]*%>/gm),JN=dN(/\$\{[\w\W]*/gm),YN=dN(/^data-[\-\w.\u00B7-\uFFFF]+$/),XN=dN(/^aria-[\-\w]+$/),ZN=dN(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),QN=dN(/^(?:\w+script|data):/i),$N=dN(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eP=dN(/^html$/i),tP=dN(/^[a-z][.\w]*(-[.\w]+)+$/i),nP=Object.freeze({__proto__:null,ARIA_ATTR:XN,ATTR_WHITESPACE:$N,CUSTOM_ELEMENT:tP,DATA_ATTR:YN,DOCTYPE_NAME:eP,ERB_EXPR:qN,IS_ALLOWED_URI:ZN,IS_SCRIPT_OR_DATA:QN,MUSTACHE_EXPR:KN,TMPLIT_EXPR:JN}),rP={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},iP=function(){return typeof window>`u`?null:window},aP=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}},oP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function sP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:iP(),t=e=>sP(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==rP.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=PN(m,`cloneNode`),g=PN(m,`remove`),_=PN(m,`nextSibling`),v=PN(m,`childNodes`),y=PN(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=oP();t.isSupported=typeof aN==`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}=nP,{IS_ALLOWED_URI:F}=nP,I=null,te=jN({},[...FN,...IN,...LN,...zN,...VN]),ne=null,re=jN({},[...HN,...UN,...WN,...GN]),ie=Object.seal(fN(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,R=null,ae=Object.seal(fN(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),oe=!0,se=!0,ce=!1,le=!0,ue=!1,de=!0,z=!1,fe=!1,pe=!1,me=!1,he=!1,B=!1,ge=!0,_e=!1,V=!0,ve=!1,ye={},be=null,xe=jN({},[`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`]),Se=null,Ce=jN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=jN({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,Ae=!1,je=null,Me=jN({},[Ee,De,Oe],xN),Ne=jN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=jN({},[`annotation-xml`]),Fe=jN({},[`title`,`style`,`font`,`a`,`script`]),Ie=null,Le=[`application/xhtml+xml`,`text/html`],Re=null,ze=null,Be=n.createElement(`form`),Ve=function(e){return e instanceof RegExp||e instanceof Function},He=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ze&&ze===e)){if((!e||typeof e!=`object`)&&(e={}),e=NN(e),Ie=Le.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Re=Ie===`application/xhtml+xml`?xN:bN,I=EN(e,`ALLOWED_TAGS`)?jN({},e.ALLOWED_TAGS,Re):te,ne=EN(e,`ALLOWED_ATTR`)?jN({},e.ALLOWED_ATTR,Re):re,je=EN(e,`ALLOWED_NAMESPACES`)?jN({},e.ALLOWED_NAMESPACES,xN):Me,we=EN(e,`ADD_URI_SAFE_ATTR`)?jN(NN(Te),e.ADD_URI_SAFE_ATTR,Re):Te,Se=EN(e,`ADD_DATA_URI_TAGS`)?jN(NN(Ce),e.ADD_DATA_URI_TAGS,Re):Ce,be=EN(e,`FORBID_CONTENTS`)?jN({},e.FORBID_CONTENTS,Re):xe,L=EN(e,`FORBID_TAGS`)?jN({},e.FORBID_TAGS,Re):NN({}),R=EN(e,`FORBID_ATTR`)?jN({},e.FORBID_ATTR,Re):NN({}),ye=EN(e,`USE_PROFILES`)?e.USE_PROFILES:!1,oe=e.ALLOW_ARIA_ATTR!==!1,se=e.ALLOW_DATA_ATTR!==!1,ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=e.SAFE_FOR_TEMPLATES||!1,de=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,he=e.RETURN_DOM_FRAGMENT||!1,B=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ge=e.SANITIZE_DOM!==!1,_e=e.SANITIZE_NAMED_PROPS||!1,V=e.KEEP_CONTENT!==!1,ve=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||ZN,ke=e.NAMESPACE||Oe,Ne=e.MATHML_TEXT_INTEGRATION_POINTS||Ne,Pe=e.HTML_INTEGRATION_POINTS||Pe,ie=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ve(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ve(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),ue&&(se=!1),he&&(me=!0),ye&&(I=jN({},VN),ne=fN(null),ye.html===!0&&(jN(I,FN),jN(ne,HN)),ye.svg===!0&&(jN(I,IN),jN(ne,UN),jN(ne,GN)),ye.svgFilters===!0&&(jN(I,LN),jN(ne,UN),jN(ne,GN)),ye.mathMl===!0&&(jN(I,zN),jN(ne,WN),jN(ne,GN))),EN(e,`ADD_TAGS`)||(ae.tagCheck=null),EN(e,`ADD_ATTR`)||(ae.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ae.tagCheck=e.ADD_TAGS:(I===te&&(I=NN(I)),jN(I,e.ADD_TAGS,Re))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ae.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=NN(ne)),jN(ne,e.ADD_ATTR,Re))),e.ADD_URI_SAFE_ATTR&&jN(we,e.ADD_URI_SAFE_ATTR,Re),e.FORBID_CONTENTS&&(be===xe&&(be=NN(be)),jN(be,e.FORBID_CONTENTS,Re)),e.ADD_FORBID_CONTENTS&&(be===xe&&(be=NN(be)),jN(be,e.ADD_FORBID_CONTENTS,Re)),V&&(I[`#text`]=!0),z&&jN(I,[`html`,`head`,`body`]),I.table&&(jN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ON(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ON(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=aP(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));uN&&uN(e),ze=e}},H=jN({},[...IN,...LN,...RN]),Ue=jN({},[...zN,...BN]),We=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=bN(e.tagName),r=bN(t.tagName);return je[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Ne[r]):!!H[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Pe[r]:!!Ue[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Pe[r]||t.namespaceURI===Ee&&!Ne[r]?!1:!Ue[n]&&(Fe[n]||!H[n]):!!(Ie===`application/xhtml+xml`&&je[e.namespaceURI]):!1},Ge=function(e){vN(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},U=function(e,n){try{vN(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{vN(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(me||he)try{Ge(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ke=function(e){let t=null,r=null;if(pe)e=`<remove></remove>`+e;else{let t=SN(e,/^[\r\n\t ]+/);r=t&&t[0]}Ie===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(ke===Oe)try{t=new f().parseFromString(i,Ie)}catch{}if(!t||!t.documentElement){t=S.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=Ae?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?T.call(t,z?`html`:`body`)[0]:z?t.documentElement:a},qe=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)},Je=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`)},Ye=function(e){return typeof s==`function`&&e instanceof s};function Xe(e,n,r){hN(e,e=>{e.call(t,n,r,ze)})}let Ze=function(e){let n=null;if(Xe(D.beforeSanitizeElements,e,null),Je(e))return Ge(e),!0;let r=Re(e.nodeName);if(Xe(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),de&&e.hasChildNodes()&&!Ye(e.firstElementChild)&&DN(/<[/\w!]/g,e.innerHTML)&&DN(/<[/\w!]/g,e.textContent)||e.nodeType===rP.progressingInstruction||de&&e.nodeType===rP.comment&&DN(/<[/\w]/g,e.data))return Ge(e),!0;if(!(ae.tagCheck instanceof Function&&ae.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&$e(r)&&(ie.tagNameCheck instanceof RegExp&&DN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r)))return!1;if(V&&!be[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 Ge(e),!0}return e instanceof c&&!We(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&DN(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ge(e),!0):(ue&&e.nodeType===rP.text&&(n=e.textContent,hN([O,k,A],e=>{n=CN(n,e,` `)}),e.textContent!==n&&(vN(t.removed,{element:e.cloneNode()}),e.textContent=n)),Xe(D.afterSanitizeElements,e,null),!1)},Qe=function(e,t,r){if(R[t]||ge&&(t===`id`||t===`name`)&&(r in n||r in Be))return!1;if(!(se&&!R[t]&&DN(j,t))&&!(oe&&DN(M,t))&&!(ae.attributeCheck instanceof Function&&ae.attributeCheck(t,e))){if(!ne[t]||R[t]){if(!($e(e)&&(ie.tagNameCheck instanceof RegExp&&DN(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&DN(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&DN(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!we[t]&&!DN(F,CN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&wN(r,`data:`)===0&&Se[e])&&!(ce&&!DN(N,CN(r,P,``)))&&r)return!1}return!0},$e=function(e){return e!==`annotation-xml`&&SN(e,ee)},et=function(e){Xe(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Je(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=Re(a),l=s,u=a===`value`?l:TN(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Xe(D.uponSanitizeAttribute,e,r),u=r.attrValue,_e&&(c===`id`||c===`name`)&&(U(a,e),u=`user-content-`+u),de&&DN(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){U(a,e);continue}if(c===`attributename`&&SN(u,`href`)){U(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){U(a,e);continue}if(!le&&DN(/\/>/i,u)){U(a,e);continue}ue&&hN([O,k,A],e=>{u=CN(u,e,` `)});let d=Re(e.nodeName);if(!Qe(d,c,u)){U(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),Je(e)?Ge(e):_N(t.removed)}catch{U(a,e)}}Xe(D.afterSanitizeAttributes,e,null)},tt=function e(t){let n=null,r=qe(t);for(Xe(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Xe(D.uponSanitizeShadowNode,n,null),Ze(n),et(n),n.content instanceof a&&e(n.content);Xe(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(Ae=!e,Ae&&(e=`<!-->`),typeof e!=`string`&&!Ye(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw ON(`dirty is not a string, aborting`)}else throw ON(`toString is not a function`);if(!t.isSupported)return e;if(fe||He(n),t.removed=[],typeof e==`string`&&(ve=!1),ve){if(e.nodeName){let t=Re(e.nodeName);if(!I[t]||L[t])throw ON(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Ke(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===rP.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!me&&!ue&&!z&&e.indexOf(`<`)===-1)return b&&B?b.createHTML(e):e;if(i=Ke(e),!i)return me?null:B?x:``}i&&pe&&Ge(i.firstChild);let u=qe(ve?e:i);for(;c=u.nextNode();)Ze(c),et(c),c.content instanceof a&&tt(c.content);if(ve)return e;if(me){if(he)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=z?i.outerHTML:i.innerHTML;return z&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&DN(eP,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
320
|
-
`+d),ue&&
|
|
321
|
-
]`).replace(`lheading`,
|
|
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||gt();return ET(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function OT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M11.992 15H12.001`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 12V8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function kT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M8 12.5L10.5 15L16 9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function AT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.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,W.jsx)(`path`,{d:`M11.992 8H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function jT({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M11.992 16H12.001`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 13V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var MT={danger:(0,W.jsx)(OT,{}),info:(0,W.jsx)(AT,{}),success:(0,W.jsx)(kT,{}),warning:(0,W.jsx)(jT,{})};function NT(e,t){let n=MT[e];DT({...t,variant:e,icon:n})}function PT(e){NT(`danger`,{title:Pe._({id:`SlfejT`}),...e})}function FT(){return Pe._({id:`Qlh+W2`})}function IT(e,t){return{}[e]}function LT(e){return e?{401:Pe._({id:`9cOLBO`}),403:Pe._({id:`qriaXz`}),404:Pe._({id:`373i3G`}),500:Pe._({id:`lkE00/`}),502:Pe._({id:`9dPdtH`}),503:Pe._({id:`Vw36Gt`}),504:Pe._({id:`3R0fAs`})}[e]:``}var 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,W.jsxs)(Vy,{children:[[{label:Pe._({id:`IagCbF`}),value:e},{label:Pe._({id:`fiPesM`}),value:t},{label:Pe._({id:`uAQUqI`}),value:n}].filter(e=>!!e.value).map(({label:e,value:t},n)=>(0,W.jsxs)(Eu,{gap:4,children:[(0,W.jsxs)(Xf,{size:`xs`,fw:500,children:[e,`:`]}),(0,W.jsx)(Xf,{size:`xs`,children:t})]},n)),i&&(0,W.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,W.jsxs)(Vy,{gap:8,children:[(0,W.jsx)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:t}),(0,W.jsxs)(Xf,{c:`var(--mantine-custom-color-danger-dark)`,size:`sm`,children:[Pe._({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,W.jsx)(Vy,{children:XT(t)}):rE(e)}return rE(e)}function aE(){return HT()?Pe._({id:`J5ej6L`}):Pe._({id:`SlfejT`})}function oE(e){PT({title:aE(),message:iE(e),autoClose:HT()?!1:5e3})}function sE(e,t=FT()){if(e instanceof Qw){let n=e.response?.status??e.status,r=(e.message??``).toLowerCase();if(e.code===`ERR_NETWORK`||r===`network error`||r.includes(`failed to fetch`))return LT(503)||t;if(n===504||n===408||e.code===`ECONNABORTED`||r.includes(`timeout`)||r.includes(`timed out`))return LT(504)||t;let i=tE(e);if(typeof i==`string`&&i.trim())return i;let a=LT(n);if(a)return a;if(typeof e.message==`string`&&e.message.trim())return e.message}return e instanceof Error&&e.message.trim()?e.message:t}var cE=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},lE=(e=>e?cE(e):cE),uE=e=>e;function dE(e,t=uE){let n=U.useSyncExternalStore(e.subscribe,U.useCallback(()=>t(e.getState()),[e,t]),U.useCallback(()=>t(e.getInitialState()),[e,t]));return U.useDebugValue(n),n}var fE=e=>{let t=lE(e),n=e=>dE(t,e);return Object.assign(n,t),n},pE=(e=>e?fE(e):fE),mE={DEBUG:1e4,INFO:2e4,WARN:3e4,ERROR:4e4};function hE(){let e=crypto.getRandomValues(new Uint8Array(16));return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var gE=class e{constructor(){this.contextMap=new Map}static getInstance(){return e.instance||=new e,e.instance}startTrace(e){let t={traceId:hE(),spanId:hE().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=hE().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(),_E=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=gE.getCurrentContext(this.name)??gE.startTrace(this.name);return{"@timestamp":new Date().toISOString(),message:n,logger_name:this.name,level:t,level_value:mE[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||mE[t]<mE[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(){gE.startSpan(this.name)}clearTraceContext(){gE.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 _E(`KeycloakService`);var vE=null;function yE(){return vE?.token?`Bearer ${vE.token}`:void 0}function bE(){return vE}var xE=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 SE(e,t,n){let r=e.startsWith(`/`)?e:`/${e}`;return t?t===`public`?CE(r):t===`private`||n?wE(r):CE(r):r}function CE(e){return e.startsWith(`/public/`)?e:`/public${e}`}function wE(e){return e.startsWith(`/public/`)?e.replace(/^\/public/,``):e}function TE(e,t=``){return`${e.replace(/\/+$/,``)}${t?`/${t.replace(/^\/+/,``)}`:``}`}function EE({baseUrl:e,prefix:t=``,withCollation:n=!0,timeoutMs:r}){let i=Xw.create({baseURL:TE(e,t),...typeof r==`number`?{timeout:r}:{},paramsSerializer:{indexes:null}});return i.interceptors.request.use(e=>{let t=bE()?.authenticated??!1,r=e.anonymous??!1;e.accessScope&&(e.url=SE(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=yE();return o&&!r&&(e.headers.Authorization=o),n&&(e.headers.Collation=Pe.locale),!e.headers.has(`Content-Type`)&&!(e.data instanceof FormData)&&(e.headers[`Content-Type`]=`application/json`),e.method?.toLowerCase()===`get`&&(e.data={}),e},e=>Promise.reject(e)),i}var DE;function OE(e,t){let n=e.url.api,r=e.url.apiPaths,i=t?.api??n;EE({baseUrl:n,prefix:r.crm}),EE({baseUrl:n,prefix:r.uiAuthz}),DE=EE({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 kE({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 AE({formatter:e,...t}){return(e||kE)(t)}function jE({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 ME({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:i,size:a}){let o=jE({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`)?ME({controlsRef:e,direction:t,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):s.focus())}function NE(e){switch(e){case`ArrowDown`:return`down`;case`ArrowUp`:return`up`;case`ArrowRight`:return`right`;case`ArrowLeft`:return`left`;default:return null}}function PE(e){return e.current?.map(e=>e.map(e=>e.length))}function FE({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:i}){let a=NE(i.key);a&&(i.preventDefault(),ME({controlsRef:e,direction:a,levelIndex:t,rowIndex:n,cellIndex:r,size:PE(e)}))}function IE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD`)}function LE(e){return e==null||e===``?e:(0,Q.default)(e).format(`YYYY-MM-DD HH:mm:ss`)}function RE({minDate:e,maxDate:t}){let n=(0,Q.default)();return!e&&!t?IE(n):e&&(0,Q.default)(n).isBefore(e)?IE(e):t&&(0,Q.default)(n).isAfter(t)?IE(t):IE(n)}var zE=(0,U.createContext)({locale:`en`,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:`–`,consistentWeeks:!1});function BE(){let e=(0,U.use)(zE),t=(0,U.useCallback)(t=>t||e.locale,[e.locale]),n=(0,U.useCallback)(t=>typeof t==`number`?t:e.firstDayOfWeek,[e.firstDayOfWeek]),r=(0,U.useCallback)(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=(0,U.useCallback)(t=>typeof t==`string`?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i}}function VE({value:e,type:t,withTime:n}){let r=n?LE:IE;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 HE({value:e,type:t,name:n,form:r,withTime:i=!1}){return(0,W.jsx)(`input`,{type:`hidden`,value:VE({value:e,type:t,withTime:i}),name:n,form:r})}HE.displayName=`@mantine/dates/HiddenDatesInput`;var UE={day:`m_396ce5cb`},WE=Sn((e,{size:t})=>({day:{"--day-size":it(t,`day-size`)}})),GE=K(e=>{let t=G(`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,W.jsx)(dl,{...ni({name:u||`Day`,classes:UE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:WE,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()})});GE.classes=UE,GE.varsResolver=WE,GE.displayName=`@mantine/dates/Day`;function KE({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 qE={weekday:`m_18a3eca`},JE=Sn((e,{size:t})=>({weekdaysRow:{"--wr-fz":st(t),"--wr-spacing":at(t)}})),YE=K(e=>{let t=G(`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=ni({name:f||`WeekdaysRow`,classes:qE,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:s,varsResolver:JE,rootSelector:`weekdaysRow`}),_=BE(),v=KE({locale:_.getLocale(c),format:u,firstDayOfWeek:_.getFirstDayOfWeek(l)}).map((e,t)=>(0,W.jsx)(d,{...g(`weekday`),children:e},t));return(0,W.jsxs)(q,{component:`tr`,...g(`weekdaysRow`),...h,children:[p&&(0,W.jsx)(d,{...g(`weekday`),children:`#`}),v]})});YE.classes=qE,YE.varsResolver=JE,YE.displayName=`@mantine/dates/WeekdaysRow`;function XE(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 ZE(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 QE({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=XE(r.add(r.daysInMonth()-1,`day`).format(`YYYY-MM-DD`),t),o=[],s=(0,Q.default)(ZE(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 $E(e,t){return(0,Q.default)(e).format(`YYYY-MM`)===(0,Q.default)(t).format(`YYYY-MM`)}function eD(e,t){return t?(0,Q.default)(e).isAfter((0,Q.default)(t).subtract(1,`day`),`day`):!0}function tD(e,t){return t?(0,Q.default)(e).isBefore((0,Q.default)(t).add(1,`day`),`day`):!0}function nD({dates:e,minDate:t,maxDate:n,getDayProps:r,excludeDate:i,hideOutsideDates:a,month:o}){let s=e.flat().filter(e=>tD(e,n)&&eD(e,t)&&!i?.(e)&&!r?.(e)?.disabled&&(!a||$E(e,o)));return s.find(e=>r?.(e)?.selected)||s.find(e=>(0,Q.default)().isSame(e,`date`))||s[0]}var rD=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(rD.default);function iD(e){return(0,Q.default)(e.find(e=>(0,Q.default)(e).day()===1)).isoWeek()}var aD={month:`m_cc9820d3`,monthCell:`m_8f457cd5`,weekNumber:`m_6cff9dea`},oD={withCellSpacing:!0},sD=Sn((e,{size:t})=>({weekNumber:{"--wn-fz":st(t),"--wn-size":it(t,`wn-size`)}})),cD=K(e=>{let t=G(`Month`,oD,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=ni({name:c||`Month`,classes:aD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:P,vars:s,varsResolver:sD,rootSelector:`month`}),I=BE(),te=QE({month:f,firstDayOfWeek:I.getFirstDayOfWeek(u),consistentWeeks:I.consistentWeeks}),ne=nD({dates:te,minDate:IE(g),maxDate:IE(_),getDayProps:m,excludeDate:h,hideOutsideDates:y,month:f}),{resolvedClassNames:re,resolvedStyles:ie}=Hr({classNames:n,styles:a,props:t}),L=te.map((e,t)=>{let n=e.map((e,n)=>{let r=!$E(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,W.jsx)(`td`,{...F(`monthCell`),"data-with-spacing":k||void 0,children:(0,W.jsx)(GE,{__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)||!tD(e,IE(_))||!eD(e,IE(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,W.jsxs)(`tr`,{...F(`monthRow`),children:[M&&(0,W.jsx)(`td`,{...F(`weekNumber`),children:iD(e)}),n]},t)});return(0,W.jsxs)(q,{component:`table`,...F(`month`),size:A,"data-full-width":N||void 0,...ee,children:[!b&&(0,W.jsx)(`thead`,{...F(`monthThead`),children:(0,W.jsx)(YE,{__staticSelector:c||`Month`,locale:l,firstDayOfWeek:u,weekdayFormat:d,withWeekNumbers:M,size:A,classNames:re,styles:ie,unstyled:o,attributes:P})}),(0,W.jsx)(`tbody`,{...F(`monthTbody`),children:L})]})});cD.classes=aD,cD.varsResolver=sD,cD.displayName=`@mantine/dates/Month`;var lD={pickerControl:`m_dc6a3c71`},uD=Sn((e,{size:t})=>({pickerControl:{"--dpc-fz":st(t),"--dpc-size":it(t,`dpc-size`)}})),dD=K(e=>{let t=G(`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,W.jsx)(dl,{...ni({name:d||`PickerControl`,classes:lD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:uD,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})});dD.classes=lD,dD.varsResolver=uD,dD.displayName=`@mantine/dates/PickerControl`;function fD({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 pD({years:e,minDate:t,maxDate:n,getYearControlProps:r}){let i=e.flat().filter(e=>!fD({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 mD(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 hD={yearsList:`m_9206547b`,yearsListCell:`m_c5a19c7d`},gD={yearsListFormat:`YYYY`,withCellSpacing:!0},_D=K(e=>{let t=G(`YearsList`,gD,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=ni({name:m||`YearsList`,classes:hD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`yearsList`}),D=BE(),O=mD(c),k=pD({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,W.jsx)(`td`,{...E(`yearsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(dD,{...E(`yearsListControl`),size:C,unstyled:o,fullWidth:S,"data-mantine-stop-propagation":b||void 0,disabled:fD({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,W.jsx)(`tr`,{...E(`yearsListRow`),children:n},t)});return(0,W.jsx)(q,{component:`table`,size:C,...E(`yearsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});_D.classes=hD,_D.displayName=`@mantine/dates/YearsList`;function vD({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 yD({months:e,minDate:t,maxDate:n,getMonthControlProps:r}){let i=e.flat().filter(e=>!vD({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 bD(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 xD={monthsList:`m_2a6c32d`,monthsListCell:`m_fe27622f`},SD={monthsListFormat:`MMM`,withCellSpacing:!0},CD=K(e=>{let t=G(`MonthsList`,SD,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=ni({name:c||`MonthsList`,classes:xD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:s,rootSelector:`monthsList`}),D=BE(),O=bD(l),k=yD({months:O,minDate:IE(f),maxDate:IE(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,W.jsx)(`td`,{...E(`monthsListCell`),"data-with-spacing":x||void 0,children:(0,W.jsx)(dD,{...E(`monthsListControl`),size:C,unstyled:o,fullWidth:S,__staticSelector:c||`MonthsList`,"data-mantine-stop-propagation":b||void 0,disabled:vD({month:e,minDate:IE(f),maxDate:IE(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,W.jsx)(`tr`,{...E(`monthsListRow`),children:n},t)});return(0,W.jsx)(q,{component:`table`,size:C,...E(`monthsList`),"data-full-width":S||void 0,...T,children:(0,W.jsx)(`tbody`,{children:A})})});CD.classes=xD,CD.displayName=`@mantine/dates/MonthsList`;var wD={calendarHeader:`m_730a79ed`,calendarHeaderLevel:`m_f6645d97`,calendarHeaderControl:`m_2351eeb0`,calendarHeaderControlIcon:`m_367dc749`},TD={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:[`previous`,`level`,`next`]},ED=Sn((e,{size:t})=>({calendarHeader:{"--dch-control-size":it(t,`dch-control-size`),"--dch-fz":st(t)}})),DD=K(e=>{let t=G(`CalendarHeader`,TD,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=ni({name:w||`CalendarHeader`,classes:wD,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:ED,rootSelector:`calendarHeader`}),A=T?e=>e.preventDefault():void 0,j=x&&(0,U.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,W.jsx)(Pf,{...k(`calendarHeaderControlIcon`),"data-direction":`previous`,size:`45%`})),M=(0,U.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,U.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,W.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,W.jsx)(q,{...k(`calendarHeader`),"data-full-width":C||void 0,...O,children:P})});DD.classes=wD,DD.varsResolver=ED,DD.displayName=`@mantine/dates/CalendarHeader`;function OD(e){let t=mD(e);return[t[0][0],t[3][0]]}var kD={decadeLabelFormat:`YYYY`},AD=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}=G(`DecadeLevel`,kD,e),ee=BE(),[F,I]=OD(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,W.jsxs)(q,{"data-decade-level":!0,size:j,...P,children:[(0,W.jsx)(DD,{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,W.jsx)(_D,{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})]})});AD.classes={..._D.classes,...DD.classes},AD.displayName=`@mantine/dates/DecadeLevel`;var jD={yearLabelFormat:`YYYY`},MD=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}=G(`YearLevel`,jD,e),I=BE(),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,W.jsxs)(q,{"data-year-level":!0,size:A,...F,children:[(0,W.jsx)(DD,{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,W.jsx)(CD,{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})]})});MD.classes={...DD.classes,...CD.classes},MD.displayName=`@mantine/dates/YearLevel`;var ND={monthLabelFormat:`MMMM YYYY`},PD=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:R,fullWidth:ae,attributes:oe,...se}=G(`MonthLevel`,ND,e),ce=BE(),le={__staticSelector:ie||`MonthLevel`,classNames:te,styles:ne,unstyled:re,size:L,attributes:oe},ue=typeof A==`boolean`?A:l?!(0,Q.default)(t).endOf(`month`).isBefore(l):!1,de=typeof j==`boolean`?j:c?!(0,Q.default)(t).startOf(`month`).isAfter(c):!1;return(0,W.jsxs)(q,{"data-month-level":!0,size:L,...se,children:[(0,W.jsx)(DD,{label:typeof I==`function`?I(t):(0,Q.default)(t).locale(n||ce.locale).format(I),__preventFocus:x,__stopPropagation:S,nextIcon:C,previousIcon:w,nextLabel:T,previousLabel:E,onNext:D,onPrevious:O,onLevelClick:k,nextDisabled:ue,previousDisabled:de,hasNextLevel:M,levelControlAriaLabel:N,withNext:P,withPrevious:ee,headerControlsOrder:F,fullWidth:ae,...le}),(0,W.jsx)(cD,{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:R,withCellSpacing:v,highlightToday:y,withWeekNumbers:b,fullWidth:ae,...le})]})});PD.classes={...cD.classes,...DD.classes},PD.displayName=`@mantine/dates/MonthLevel`;var FD={levelsGroup:`m_30b26e33`},ID=K(e=>{let t=G(`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,W.jsx)(q,{...ni({name:c||`LevelsGroup`,classes:FD,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})});ID.classes=FD,ID.displayName=`@mantine/dates/LevelsGroup`;var LD={numberOfColumns:1},RD=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}=G(`DecadeLevelGroup`,LD,e),N=(0,U.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,W.jsx)(AD,{size:O,yearsListFormat:a,decade:M,withNext:A===T-1,withPrevious:A===0,decadeLabelFormat:D,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>FE({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,W.jsx)(ID,{classNames:b,styles:x,__staticSelector:C||`DecadeLevelGroup`,size:O,unstyled:S,fullWidth:k,attributes:j,...M,children:P})});RD.classes={...ID.classes,...AD.classes},RD.displayName=`@mantine/dates/DecadeLevelGroup`;var zD={numberOfColumns:1},BD=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}=G(`YearLevelGroup`,zD,e),ee=(0,U.useRef)([]),F=Array(D).fill(0).map((e,M)=>{let P=(0,Q.default)(t).add(M,`years`).format(`YYYY-MM-DD`);return(0,W.jsx)(MD,{size:A,monthsListFormat:a,year:P,withNext:M===D-1,withPrevious:M===0,yearLabelFormat:k,__stopPropagation:E,__onControlClick:s,__onControlMouseEnter:c,__onControlKeyDown:(e,t)=>FE({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,W.jsx)(ID,{classNames:S,styles:C,__staticSelector:T||`YearLevelGroup`,size:A,unstyled:w,fullWidth:j,attributes:N,...P,children:F})});BD.classes={...MD.classes,...ID.classes},BD.displayName=`@mantine/dates/YearLevelGroup`;var VD={numberOfColumns:1},HD=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:R,...ae}=G(`MonthLevelGroup`,VD,e),oe=(0,U.useRef)([]),se=Array(P).fill(0).map((e,L)=>{let ae=(0,Q.default)(t).add(L,`months`).format(`YYYY-MM-DD`);return(0,W.jsx)(PD,{month:ae,withNext:L===P-1,withPrevious:L===0,monthLabelFormat:F,__stopPropagation:te,__onDayClick:m,__onDayMouseEnter:h,__onDayKeyDown:(e,t)=>FE({levelIndex:L,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:oe}),__getDayRef:(e,t,n)=>{Array.isArray(oe.current[L])||(oe.current[L]=[]),Array.isArray(oe.current[L][e])||(oe.current[L][e]=[]),oe.current[L][e][t]=n},levelControlAriaLabel:typeof ee==`function`?ee(ae):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:R},L)});return(0,W.jsx)(ID,{classNames:j,styles:M,__staticSelector:I||`MonthLevelGroup`,size:ne,fullWidth:ie,attributes:R,...ae,children:se})});HD.classes={...ID.classes,...PD.classes},HD.displayName=`@mantine/dates/MonthLevelGroup`;var UD={input:`m_6fa5e2aa`},WD=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,W.jsx)(bf.ClearButton,{onClick:_,unstyled:o,...v}),j=()=>{E===`range`&&Array.isArray(C)&&C[0]&&!C[1]&&_(),f.close()};return(0,W.jsxs)(W.Fragment,{children:[l===`modal`&&!x&&(0,W.jsx)(gg,{opened:p,onClose:j,withCloseButton:!1,size:`auto`,"data-dates-modal":!0,unstyled:o,...c,children:u}),(0,W.jsx)(bf.Wrapper,{...n,children:(0,W.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,W.jsx)(eu.Target,{children:(0,W.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:wn(UD.input,i?.input)},...k,children:d||(0,W.jsx)(bf.Placeholder,{error:t.error,unstyled:o,classNames:i,styles:a,__staticSelector:t.__staticSelector,children:r})})}),(0,W.jsx)(eu.Dropdown,{"data-dates-dropdown":!0,children:u})]})}),(0,W.jsx)(HE,{value:C,name:w,form:T,type:E,withTime:O})]})});WD.classes=UD,WD.displayName=`@mantine/dates/PickerInputBase`;var GD=e=>e===`range`?[null,null]:e===`multiple`?[]:null,KD=(e,t)=>{let n=t?LE:IE;return Array.isArray(e)?e.map(n):n(e)};function qD({type:e,value:t,defaultValue:n,onChange:r,withTime:i=!1}){let a=(0,U.useRef)(e),[o,s,c]=Jt({value:KD(t,i),defaultValue:KD(n,i),finalValue:GD(e),onChange:r}),l=o;return a.current!==e&&(a.current=e,t===void 0&&(l=n===void 0?GD(e):n,s(l))),[l,s,c]}function JD(e,t){return e?e===`month`?0:e===`year`?1:2:t||0}function YD(e){return e===0?`month`:e===1?`year`:`decade`}function XD(e,t,n){return YD(ht(JD(e,0),JD(t,0),JD(n,2)))}var ZD={maxLevel:`decade`,minLevel:`month`,__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},QD=K(e=>{let t=G(`Calendar`,ZD,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:R,yearLabelFormat:ae,yearsListFormat:oe,getYearControlProps:se,decadeLabelFormat:ce,classNames:le,styles:ue,unstyled:de,minDate:z,maxDate:fe,locale:pe,__staticSelector:me,size:he,__preventFocus:B,__stopPropagation:ge,onNextDecade:_e,onPreviousDecade:V,onNextYear:ve,onPreviousYear:ye,onNextMonth:be,onPreviousMonth:xe,static:Se,enableKeyboardNavigation:Ce,fullWidth:we,attributes:Te,ref:Ee,...De}=t,{resolvedClassNames:Oe,resolvedStyles:ke}=Hr({classNames:le,styles:ue,props:t}),[Ae,je]=Jt({value:o?XD(o,i,r):void 0,defaultValue:a?XD(a,i,r):void 0,finalValue:XD(void 0,i,r),onChange:s}),[Me,Ne]=qD({type:`default`,value:IE(c),defaultValue:IE(l),onChange:u});(0,U.useImperativeHandle)(C,()=>e=>{Ne(e)}),(0,U.useImperativeHandle)(w,()=>e=>{je(e)});let Pe={__staticSelector:me||`Calendar`,styles:ke,classNames:Oe,unstyled:de,size:he,attributes:Te},Fe=f||d||1,Ie=(0,U.useRef)(null);if(Ie.current===null){let e=new Date;Ie.current=z&&(0,Q.default)(e).isAfter(z)?z:(0,Q.default)(e).format(`YYYY-MM-DD`)}let Le=Me||Ie.current,Re=()=>{let e=(0,Q.default)(Le).add(Fe,`month`).format(`YYYY-MM-DD`);be?.(e),Ne(e)},ze=()=>{let e=(0,Q.default)(Le).subtract(Fe,`month`).format(`YYYY-MM-DD`);xe?.(e),Ne(e)},Be=()=>{let e=(0,Q.default)(Le).add(Fe,`year`).format(`YYYY-MM-DD`);ve?.(e),Ne(e)},Ve=()=>{let e=(0,Q.default)(Le).subtract(Fe,`year`).format(`YYYY-MM-DD`);ye?.(e),Ne(e)},He=()=>{let e=(0,Q.default)(Le).add(10*Fe,`year`).format(`YYYY-MM-DD`);_e?.(e),Ne(e)},H=()=>{let e=(0,Q.default)(Le).subtract(10*Fe,`year`).format(`YYYY-MM-DD`);V?.(e),Ne(e)},Ue=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(!Ce||Se)return;let e=e=>{if(!Ue.current?.contains(document.activeElement))return;let t=e.ctrlKey||e.metaKey,n=e.shiftKey;switch(e.key){case`ArrowUp`:t&&n?(e.preventDefault(),H()):t&&(e.preventDefault(),Ve());break;case`ArrowDown`:t&&n?(e.preventDefault(),He()):t&&(e.preventDefault(),Be());break;case`y`:case`Y`:Ae===`month`&&(e.preventDefault(),je(`year`));break}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[Ce,Se,Ae,Be,Ve,He,H]),(0,W.jsxs)(q,{ref:qt(Ue,Ee),size:he,"data-calendar":!0,"data-full-width":we||void 0,...De,children:[Ae===`month`&&(0,W.jsx)(HD,{month:Le,minDate:z,maxDate:fe,firstDayOfWeek:T,weekdayFormat:E,weekendDays:D,getDayProps:O,excludeDate:k,renderDay:A,hideOutsideDates:j,hideWeekdays:M,getDayAriaLabel:N,onNext:Re,onPrevious:ze,hasNextLevel:r!==`month`,onLevelClick:()=>je(`year`),numberOfColumns:d,locale:pe,levelControlAriaLabel:p?.monthLevelControl,nextLabel:p?.nextMonth??m,nextIcon:ee,previousLabel:p?.previousMonth??h,previousIcon:F,monthLabelFormat:P,__onDayClick:I,__onDayMouseEnter:te,__preventFocus:B,__stopPropagation:ge,static:Se,withCellSpacing:ne,highlightToday:re,withWeekNumbers:ie,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`year`&&(0,W.jsx)(BD,{year:Le,numberOfColumns:d,minDate:z,maxDate:fe,monthsListFormat:L,getMonthControlProps:R,locale:pe,onNext:Be,onPrevious:Ve,hasNextLevel:r!==`month`&&r!==`year`,onLevelClick:()=>je(`decade`),levelControlAriaLabel:p?.yearLevelControl,nextLabel:p?.nextYear??m,nextIcon:ee,previousLabel:p?.previousYear??h,previousIcon:F,yearLabelFormat:ae,__onControlMouseEnter:y,__onControlClick:(e,t)=>{S&&Ne(t),je(XD(`month`,i,r)),_?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe}),Ae===`decade`&&(0,W.jsx)(RD,{decade:Le,minDate:z,maxDate:fe,yearsListFormat:oe,getYearControlProps:se,locale:pe,onNext:He,onPrevious:H,numberOfColumns:d,nextLabel:p?.nextDecade??m,nextIcon:ee,previousLabel:p?.previousDecade??h,previousIcon:F,decadeLabelFormat:ce,__onControlMouseEnter:v,__onControlClick:(e,t)=>{x&&Ne(t),je(XD(`year`,i,r)),g?.(t)},__preventFocus:B,__stopPropagation:ge,withCellSpacing:ne,headerControlsOrder:b,fullWidth:we,...Pe})]})});QD.classes={...RD.classes,...BD.classes,...HD.classes},QD.displayName=`@mantine/dates/Calendar`;function $D(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:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me,...he}=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:R,monthsListFormat:ae,getMonthControlProps:oe,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:le,decadeLabelFormat:ue,allowSingleDateInRange:de,allowDeselect:z,minDate:fe,maxDate:pe,locale:me},others:he}}function eO(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 tO({type:e,level:t,value:n,defaultValue:r,onChange:i,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:s}){let[c,l]=qD({type:e,value:n,defaultValue:r,onChange:i}),[u,d]=(0,U.useState)(e===`range`&&c[0]&&!c[1]?c[0]:null),[f,p]=(0,U.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?eO(e,[f,u]):c[0]&&c[1]?eO(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,U.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 nO={yearPickerRoot:`m_d01e596f`,presetsList:`m_52a6b4b0`,presetButton:`m_b0d93233`},rO=Sn((e,{size:t})=>({yearPickerRoot:{"--preset-font-size":st(t)}})),iO={type:`default`},aO=K(e=>{let t=G(`YearPicker`,iO,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}=$D(w),D=(0,U.useRef)(null),O=(0,U.useRef)(null),k=ni({name:l||`YearPicker`,classes:nO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`yearPickerRoot`:void 0,varsResolver:rO,vars:i}),{onDateChange:A,onRootMouseLeave:j,onHoveredDateChange:M,getControlProps:N,setValue:P}=tO({type:a,level:`year`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:ee,resolvedStyles:F}=Hr({classNames:n,styles:r,props:t}),I=(0,W.jsx)(QD,{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,W.jsx)(dl,{...k(`presetButton`),onClick:()=>te(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(q,{...k(`yearPickerRoot`),size:S,...E,children:[(0,W.jsx)(`div`,{...k(`presetsList`),children:ne}),I]})});aO.classes={...QD.classes,...nO},aO.varsResolver=rO,aO.displayName=`@mantine/dates/YearPicker`;var oO={monthPickerRoot:`m_53c9e871`,presetsList:`m_cccb8ff3`,presetButton:`m_7b4fbf50`},sO=Sn((e,{size:t})=>({monthPickerRoot:{"--preset-font-size":st(t)}})),cO={type:`default`},lO=K(e=>{let t=G(`MonthPicker`,cO,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}=$D(T),O=(0,U.useRef)(null),k=(0,U.useRef)(null),A=ni({name:l||`MonthPicker`,classes:oO,props:t,className:y,style:b,classNames:n,styles:r,unstyled:x,attributes:C,rootSelector:v?`monthPickerRoot`:void 0,varsResolver:sO,vars:i}),{onDateChange:j,onRootMouseLeave:M,onHoveredDateChange:N,getControlProps:P,setValue:ee}=tO({type:a,level:`month`,allowDeselect:f,allowSingleDateInRange:d,value:s,defaultValue:o,onChange:c,onMouseLeave:p}),{resolvedClassNames:F,resolvedStyles:I}=Hr({classNames:n,styles:r,props:t}),te=(0,W.jsx)(QD,{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,W.jsx)(dl,{...A(`presetButton`),onClick:()=>ne(e.value),onMouseDown:e=>e.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:e.label},t));return(0,W.jsxs)(q,{...A(`monthPickerRoot`),size:S,...D,children:[(0,W.jsx)(`div`,{...A(`presetsList`),children:re}),te]})});lO.classes={...QD.classes,...oO},lO.varsResolver=sO,lO.displayName=`@mantine/dates/MonthPicker`;var uO={datePickerRoot:`m_765a40cf`,presetsList:`m_d6a681e1`,presetButton:`m_acd30b22`},dO=Sn((e,{size:t})=>({datePickerRoot:{"--preset-font-size":st(t)}})),fO={type:`default`,defaultLevel:`month`,numberOfColumns:1,size:`sm`},pO=K(e=>{let t=G(`DatePicker`,fO,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}=$D(S),T=(0,U.useRef)(null),E=(0,U.useRef)(null),D=ni({name:u||`DatePicker`,classes:uO,props:t,className:g,style:_,classNames:c,styles:l,unstyled:v,attributes:x,rootSelector:h?`datePickerRoot`:void 0,varsResolver:dO,vars:b}),{onDateChange:O,onRootMouseLeave:k,onHoveredDateChange:A,getControlProps:j,_value:M,setValue:N}=tO({type:w.type,level:`day`,allowDeselect:n,allowSingleDateInRange:r,value:i,defaultValue:a,onChange:o,onMouseLeave:s}),{resolvedClassNames:P,resolvedStyles:ee}=Hr({classNames:c,styles:l,props:t}),F=(0,W.jsx)(QD,{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`?$E(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,W.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,W.jsxs)(q,{...D(`datePickerRoot`),size:y,...w,children:[(0,W.jsx)(`div`,{...D(`presetsList`),children:te}),F]})});pO.classes=QD.classes,pO.varsResolver=dO,pO.displayName=`@mantine/dates/DatePicker`;function mO(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 hO({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 gO={valueFormat:`MMMM D, YYYY`,fixOnBlur:!0,size:`sm`},_O=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`,gO,e),I=(0,U.useRef)(null),te=(0,U.useRef)(null),[ne,re]=(0,U.useState)(!1),{calendarProps:ie,others:L}=$D(F),R=BE(),ae=m||(e=>{let t=(0,Q.default)(e,f,R.getLocale(d)).toDate();return Number.isNaN(t.getTime())?mO(e):(0,Q.default)(t).format(p?`YYYY-MM-DD HH:mm:ss`:`YYYY-MM-DD`)}),oe=k===void 0?o:k,se=e=>e?(0,Q.default)(e).locale(R.getLocale(d)).format(f):``,[ce,le,ue]=qD({type:`default`,value:r,defaultValue:i,onChange:a,withTime:p}),[de,z]=qD({type:`default`,value:A,defaultValue:i||j,onChange:M});(0,U.useEffect)(()=>{ue&&r!==null&&z(r)},[ue,r]);let[fe,pe]=(0,U.useState)(se(ce));(0,U.useEffect)(()=>{pe(se(ce))},[R.getLocale(d)]);let me=e=>{let t=e.currentTarget.value;if(pe(t),re(!0),t.trim()===``&&(k||o))le(null);else{let e=ae(t);e&&hO({date:e,minDate:h,maxDate:g})&&(le(e),z(e))}},he=e=>{y?.(e),re(!1),_&&pe(se(ce))},B=e=>{v?.(e),re(!0)},ge=e=>{b?.(e),re(!0)},_e=e=>{e.key===`Escape`&&re(!1),x?.(e)},V=e=>({...u?.(e),selected:(0,Q.default)(ce).isSame(e,`day`),onClick:t=>{u?.(e).onClick?.(t);let n=oe&&(0,Q.default)(ce).isSame(e,`day`)?null:e;le(n),!ue&&n&&pe(se(n)),re(!1)}}),ve=(0,W.jsx)(bf.ClearButton,{onClick:()=>{le(null),!ue&&pe(``),re(!1)},unstyled:E,...c}),ye=o&&!!ce&&!S&&!ee;return Tt(()=>{ce!==void 0&&!ne&&pe(se(ce))},[ce]),xt(()=>re(!1),void 0,[I.current,te.current]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(bf.Wrapper,{...n,__staticSelector:`DateInput`,ref:I,children:(0,W.jsxs)(eu,{opened:ne,trapFocus:!1,position:`bottom-start`,disabled:S||ee,withRoles:!1,unstyled:E,...l,children:[(0,W.jsx)(eu.Target,{children:(0,W.jsx)(bf,{"data-dates-input":!0,"data-read-only":S||void 0,autoComplete:`off`,value:fe,onChange:me,onBlur:he,onFocus:B,onClick:ge,onKeyDown:_e,readOnly:S,rightSection:T,__clearSection:ve,__clearable:ye,__clearSectionMode:s,...t,...L,disabled:ee,__staticSelector:`DateInput`})}),(0,W.jsx)(eu.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,ref:te,children:(0,W.jsx)(QD,{__staticSelector:`DateInput`,...ie,classNames:D,styles:O,unstyled:E,__preventFocus:!0,minDate:h,maxDate:g,locale:d,getDayProps:V,size:t.size,date:de,onDateChange:z,getMonthControlProps:e=>({selected:typeof ce==`string`?$E(e,ce):!1,...N?.(e)}),getYearControlProps:e=>({selected:typeof ce==`string`?(0,Q.default)(e).isSame(ce,`year`):!1,...P?.(e)}),attributes:n.attributes})})]})}),(0,W.jsx)(HE,{name:C,form:w,value:ce,type:`default`,withTime:p})]})});_O.classes={...bf.classes,...QD.classes},_O.displayName=`@mantine/dates/DateInput`;function vO({type:e,value:t,defaultValue:n,onChange:r,locale:i,format:a,closeOnChange:o,sortDates:s,labelSeparator:c,valueFormatter:l}){let u=BE(),[d,f]=nn(!1),[p,m]=qD({type:e,value:t,defaultValue:n,onChange:r}),h=AE({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 yO={type:`default`,size:`sm`,valueFormat:`YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},bO=K(e=>{let t=G(`YearPickerInput`,yO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=$D(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=vO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(WD,{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,W.jsx)(aO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||RE({maxDate:v,minDate:_}):O||RE({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})})});bO.classes={...WD.classes,...aO.classes},bO.displayName=`@mantine/dates/YearPickerInput`;var xO={type:`default`,size:`sm`,valueFormat:`MMMM YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},SO=K(e=>{let t=G(`MonthPickerInput`,xO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,valueFormatter:b,presets:x,attributes:S,...C}=t,{resolvedClassNames:w,resolvedStyles:T}=Hr({classNames:l,styles:u,props:t}),{calendarProps:E,others:D}=$D(C),{_value:O,setValue:k,formattedValue:A,dropdownHandlers:j,dropdownOpened:M,onClear:N,shouldClear:P}=vO({type:n,value:r,defaultValue:i,onChange:a,locale:c,format:o,labelSeparator:s,closeOnChange:f,sortDates:g,valueFormatter:b});return(0,W.jsx)(WD,{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,W.jsx)(lO,{...E,size:p,variant:m,type:n,value:O,defaultDate:E.defaultDate||(Array.isArray(O)?O[0]||RE({maxDate:v,minDate:_}):O||RE({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})})});SO.classes={...WD.classes,...lO.classes},SO.displayName=`@mantine/dates/MonthPickerInput`;var CO={type:`default`,size:`sm`,valueFormat:`MMMM D, YYYY`,closeOnChange:!0,sortDates:!0,dropdownType:`popover`},wO=K(e=>{let t=G(`DatePickerInput`,CO,e),{type:n,value:r,defaultValue:i,onChange:a,valueFormat:o,labelSeparator:s,locale:c,classNames:l,styles:u,unstyled:d,closeOnChange:f,size:p,variant:m,dropdownType:h,sortDates:g,minDate:_,maxDate:v,vars:y,defaultDate:b,valueFormatter:x,presets:S,attributes:C,...w}=t,{resolvedClassNames:T,resolvedStyles:E}=Hr({classNames:l,styles:u,props:t}),{calendarProps:D,others:O}=$D(w),{_value:k,setValue:A,formattedValue:j,dropdownHandlers:M,dropdownOpened:N,onClear:P,shouldClear:ee}=vO({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,W.jsx)(WD,{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,W.jsx)(pO,{...D,size:p,variant:m,type:n,value:k,defaultDate:F||RE({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})})});wO.classes={...WD.classes,...pO.classes},wO.displayName=`@mantine/dates/DatePickerInput`;var TO=`DD/MM/YYYY`,EO=_O.extend({defaultProps:{placeholder:TO,valueFormat:TO}});function DO({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M18 9.00005L12 15L6 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var OO=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,W.jsx)(DO,{}),variant:`separated`}}),kO=gu.extend({classNames:{root:`_root_gjf6s_1`},defaultProps:{size:`md`,variant:`primary`}}),AO=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`}}}),jO=$f.extend({classNames:{root:`_root_1q1iz_1`},defaultProps:{underline:`never`}}),MO=ym.extend({classNames:{root:`_root_ja0yt_1`,placeholder:`_placeholder_ja0yt_5`},defaultProps:{radius:`xl`}}),NO=Sm.extend({classNames:{root:`_root_4i7r9_1`},defaultProps:{size:`md`,radius:`md`,variant:`default`}}),PO=jm.extend({classNames:{root:`_root_1llpb_1`,section:`_section_1llpb_204`},defaultProps:{size:`md`,variant:`primary`}}),[FO,IO]=qe(`Carousel component was not found in tree`),LO={root:`m_17884d0f`,viewport:`m_a2dae653`,container:`m_fcd81474`,controls:`m_39bc3463`,control:`m_64f58e10`,indicators:`m_71ea3ab1`,indicator:`m_eae68602`,slide:`m_d98df724`},RO=K(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,mod:o,...s}=G(`CarouselSlide`,null,e),c=IO();return(0,W.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})});RO.classes=LO,RO.displayName=`@mantine/carousel/CarouselSlide`;function zO({slideGap:e,slideSize:t,selector:n}){let r=Cr(),i=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":H(pt(t))}),a=Fe(r.breakpoints).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,W.jsx)(oi,{styles:i,media:ft(Fe(a),r.breakpoints).filter(e=>Fe(a[e.value]).length>0).map(e=>({query:`(min-width: ${r.breakpoints[e.value]})`,styles:a[e.value]})),selector:n})}function BO(e){return typeof e==`object`&&e?Fe(e):[]}function VO(e){return e.sort((e,t)=>Be(e)-Be(t))}function HO({slideGap:e,slideSize:t}){return VO(Array.from(new Set([...BO(e),...BO(t)])))}function UO({slideGap:e,slideSize:t,selector:n}){let r=We({"--carousel-slide-gap":at(pt(e)),"--carousel-slide-size":H(pt(t))}),i=HO({slideGap:e,slideSize:t}).reduce((n,r)=>(n[r]||(n[r]={}),typeof e==`object`&&e[r]!==void 0&&(n[r][`--carousel-slide-gap`]=at(e[r])),typeof t==`object`&&t[r]!==void 0&&(n[r][`--carousel-slide-size`]=at(t[r])),n),{});return(0,W.jsx)(oi,{styles:r,container:Object.keys(i).map(e=>({query:`carousel (min-width: ${e})`,styles:i[e]})),selector:n})}function WO({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 GO(e){return Object.prototype.toString.call(e)===`[object Object]`}function KO(e){return GO(e)||Array.isArray(e)}function qO(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function JO(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}`:!KO(r)||!KO(i)?r===i:JO(r,i)})}function YO(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function XO(e,t){if(e.length!==t.length)return!1;let n=YO(e),r=YO(t);return n.every((e,t)=>{let n=r[t];return JO(e,n)})}function ZO(e){return typeof e==`number`}function QO(e){return typeof e==`string`}function $O(e){return typeof e==`boolean`}function ek(e){return Object.prototype.toString.call(e)===`[object Object]`}function tk(e){return Math.abs(e)}function nk(e){return Math.sign(e)}function rk(e,t){return tk(e-t)}function ik(e,t){return e===0||t===0||tk(e)<=tk(t)?0:tk(rk(tk(e),tk(t))/e)}function ak(e){return Math.round(e*100)/100}function ok(e){return dk(e).map(Number)}function sk(e){return e[ck(e)]}function ck(e){return Math.max(0,e.length-1)}function lk(e,t){return t===ck(e)}function uk(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function dk(e){return Object.keys(e)}function fk(e,t){return[e,t].reduce((e,t)=>(dk(t).forEach(n=>{let r=e[n],i=t[n];e[n]=ek(r)&&ek(i)?fk(r,i):i}),e),{})}function pk(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function mk(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 QO(e)?n[e](r):e(t,r,i)}return{measure:o}}function hk(){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 gk(e,t,n,r){let i=hk(),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 _k(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 vk(e=0,t=0){let n=tk(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 yk(e,t,n){let{constrain:r}=vk(0,e),i=e+1,a=o(t);function o(e){return n?tk((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 yk(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function bk(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=hk(),w=hk(),T=vk(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){($O(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`,ae).add(r,`contextmenu`,ae).add(r,`click`,oe,!0)}function I(){C.clear(),w.clear()}function te(){let e=ee?n:t;w.add(e,`touchmove`,R,S).add(e,`touchend`,ae).add(e,`mousemove`,R,S).add(e,`mouseup`,ae)}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(nk(e)*-1),r=u.byDistance(e,!m).distance;return m||tk(e)<T?r:g&&t?r*.5:u.byIndex(n.get(),0).distance}function L(e){let t=pk(e,r);ee=t,P=m&&t&&!e.buttons&&k,k=rk(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 R(e){if(!pk(e,r)&&e.touches.length>=2)return ae(e);let t=a.readPoint(e),n=a.readPoint(e,y),o=rk(t,A),c=rk(n,j);if(!N&&!ee&&(!e.cancelable||(N=o>c,!N)))return ae(e);let u=a.pointerMove(e);o>h&&(P=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(b(u)),e.preventDefault()}function ae(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*re(),r=ie(b(n),t),i=ik(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 oe(e){P&&=(e.stopPropagation(),e.preventDefault(),!1)}function se(){return M}return{init:F,destroy:I,pointerDown:se}}function xk(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(pk(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&&tk(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function Sk(){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 Ck(e){function t(t){return t/100*e}return{measure:t}}function wk(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(tk(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{($O(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 Tk(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=nk(a),d=u,x}function p(){return tk(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 Ek(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=vk(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=tk(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&tk(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 Dk(e,t,n,r,i){let a=vk(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return rk(e,t)<=1}function u(){let e=o[0],t=sk(o);return vk(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=lk(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 Ok(e,t,n){let r=t[0];return{limit:vk(n?r-e:sk(t),r)}}function kk(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=vk(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 Ak(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function jk(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=>sk(e)[o]-e[0][a]).map(tk)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-tk(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function Mk(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=lk(n,t);return r?uk(sk(n[0])+1):i?uk(ck(a)-sk(n)[0]+1,sk(n)[0]):e})}return{slideRegistry:l}}function Nk(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>tk(e)-tk(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)=>tk(e.diff)-tk(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=>nk(e)===r);return a.length?c(a):sk(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 Pk(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 Fk(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));ZO(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=>{($O(s)||s(u,e))&&f(t)},c)})}function d(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function Ik(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 ZO(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function Lk(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=ak(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 Rk(e,t,n,r,i,a,o,s,c){let l=.5,u=ok(i),d=ok(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:Ik(-1),translate:Lk(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 zk(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||($O(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function Bk(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 dk(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 Vk(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 tk(t[s]-e[s])}function h(){if(!l)return 0;let e=a.getComputedStyle(sk(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function g(){return n.map((e,t,n)=>{let r=!t,i=lk(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(tk)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Hk(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:d}=e,f=ZO(n);function p(e,t){return ok(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function m(e){return e.length?ok(e).reduce((n,f,p)=>{let m=sk(n)||0,h=m===0,g=f===ck(e),_=i[l]-a[m][l],v=i[l]-a[f][u],y=!r&&h?d(o):0,b=tk(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 Uk(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=Sk(),w=C.measure(t),T=n.map(C.measure),E=_k(c,l),D=E.measureSize(w),O=Ck(D),k=mk(s,D),A=!d&&!!v,{slideSizes:j,slideSizesWithGaps:M,startGap:N,endGap:P}=Vk(E,w,T,n,d||!!v,i),ee=Hk(E,D,g,d,w,T,N,P,2),{snaps:F,snapsAligned:I}=jk(E,k,w,T,ee),te=-sk(F)+sk(M),{snapsContained:ne,scrollContainLimit:re}=Dk(D,te,I,v,2),ie=A?ne:I,{limit:L}=Ok(te,ie,d),R=yk(ck(ie),u,d),ae=R.clone(),oe=ok(n),se=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},ce=({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`)},le=gk(r,i,()=>se(xe),e=>ce(xe,e)),ue=.68,de=ie[R.get()],z=Ik(de),fe=Ik(de),pe=Ik(de),me=Ik(de),he=Tk(z,pe,fe,me,f,ue),B=Nk(d,ie,te,L,me),ge=Pk(le,R,ae,he,B,me,o),_e=Ak(L),V=hk(),ve=Bk(t,n,o,h),{slideRegistry:ye}=Mk(A,v,ie,re,ee,oe),be=Fk(e,n,ye,ge,he,V,o,S),xe={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:w,slideRects:T,animation:le,axis:E,dragHandler:bk(E,e,r,i,me,xk(E,i),z,le,ge,he,B,R,o,O,p,m,_,ue,x),eventStore:V,percentOfView:O,index:R,indexPrevious:ae,limit:L,location:z,offsetLocation:pe,previousLocation:fe,options:a,resizeHandler:wk(t,o,i,n,E,y,C),scrollBody:he,scrollBounds:Ek(L,pe,me,he,O),scrollLooper:kk(te,L,pe,[z,pe,fe,me]),scrollProgress:_e,scrollSnapList:ie.map(_e.get),scrollSnaps:ie,scrollTarget:B,scrollTo:ge,slideLooper:Rk(E,D,te,j,M,F,ie,pe,n),slideFocus:be,slidesHandler:zk(t,o,b),slidesInView:ve,slideIndexes:oe,slideRegistry:ye,slidesToScroll:ee,target:me,translate:Lk(E,t)};return xe}function Wk(){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 Gk={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 Kk(e){function t(e,t){return fk(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,dk(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>dk(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function qk(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 Jk(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=Kk(i),o=qk(a),s=hk(),c=Wk(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:f,off:p,emit:m}=c,h=D,g=!1,_,v=l(Gk,Jk.globalOptions),y=l(v),b=[],x,S,C;function w(){let{container:t,slides:n}=y;S=(QO(t)?e.querySelector(t):t)||e.children[0];let r=QO(n)?S.querySelectorAll(n):n;C=[].slice.call(r||S.children)}function T(t){let n=Uk(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(se),_.eventHandler.init(se),_.resizeHandler.init(se),_.slidesHandler.init(se),_.options.loop&&_.slideLooper.loop(),S.offsetParent&&C.length&&_.dragHandler.init(se),x=o.init(se,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 R(){return e}function ae(){return S}function oe(){return C}let se={canScrollNext:N,canScrollPrev:P,containerNode:ae,internalEngine:L,destroy:k,off:p,on:f,emit:m,plugins:ie,previousScrollSnap:te,reInit:h,rootNode:R,scrollNext:j,scrollPrev:M,scrollProgress:F,scrollSnapList:ee,scrollTo:A,selectedScrollSnap:I,slideNodes:oe,slidesInView:ne,slidesNotInView:re};return E(t,n),setTimeout(()=>c.emit(`init`),0),se}Jk.globalOptions=void 0;function Yk(e={},t=[]){let n=(0,U.useRef)(e),r=(0,U.useRef)(t),[i,a]=(0,U.useState)(),[o,s]=(0,U.useState)(),c=(0,U.useCallback)(()=>{i&&i.reInit(n.current,r.current)},[i]);return(0,U.useEffect)(()=>{JO(n.current,e)||(n.current=e,c())},[e,c]),(0,U.useEffect)(()=>{XO(r.current,t)||(r.current=t,c())},[t,c]),(0,U.useEffect)(()=>{if(qO()&&o){Jk.globalOptions=Yk.globalOptions;let e=Jk(o,n.current,r.current);return a(e),()=>e.destroy()}else a(void 0)},[o,a]),[s,i]}Yk.globalOptions=void 0;var Xk={controlSize:26,controlsOffset:`sm`,slideSize:`100%`,slideGap:0,orientation:`horizontal`,includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:`media`},Zk={align:`center`,loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:`trimSnaps`},Qk=Sn((e,{height:t,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":H(t),"--carousel-control-size":H(n),"--carousel-controls-offset":at(r)}})),$k=K(e=>{let t=G(`Carousel`,Xk,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=ni({name:`Carousel`,classes:LO,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,vars:s,varsResolver:Qk}),te=Lt(ee),ne=Mi(),{dir:re}=Ki(),[ie,L]=Yk({axis:y===`horizontal`?`x`:`y`,direction:y===`horizontal`?re:void 0,startIndex:C,...Zk,...M},E),[R,ae]=(0,U.useState)(0),[oe,se]=(0,U.useState)(0),ce=(0,U.useCallback)(e=>L&&L.scrollTo(e),[L]),le=(0,U.useCallback)(()=>{if(!L)return;let e=L.selectedScrollSnap();ae(e),e!==R&&f?.(e)},[L,ae,f,R]),ue=(0,U.useCallback)(()=>{L?.scrollPrev(),d?.()},[L]),de=(0,U.useCallback)(()=>{L?.scrollNext(),u?.()},[L]),z=(0,U.useCallback)(e=>{k&&(e.key===`ArrowRight`&&(e.preventDefault(),de()),e.key===`ArrowLeft`&&(e.preventDefault(),ue()),e.key===`Home`&&(e.preventDefault(),L?.scrollTo(0)),e.key===`End`&&(e.preventDefault(),L?.scrollTo(L.scrollSnapList().length-1)))},[L,de,ue]);(0,U.useEffect)(()=>{if(L)return l?.(L),le(),se(L.scrollSnapList().length),L.on(`select`,le),()=>{L.off(`select`,le)}},[L,M?.slidesToScroll,le]),(0,U.useEffect)(()=>{L&&(L.reInit(),se(L.scrollSnapList().length),ae(e=>ht(e,0,U.Children.toArray(c).length-1)))},[U.Children.toArray(c).length,M?.slidesToScroll]);let fe=L?.canScrollPrev()||!1,pe=L?.canScrollNext()||!1,me=(0,U.useCallback)((e,t)=>{let n=y===`horizontal`,r=n?`ArrowRight`:`ArrowDown`,i=n?`ArrowLeft`:`ArrowUp`;if(e.key===r){e.preventDefault();let n=t<oe-1?t+1:0;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}if(e.key===i){e.preventDefault();let n=t>0?t-1:oe-1;ce(n),(e.currentTarget.parentElement?.children[n])?.focus()}e.key===`Home`&&(e.preventDefault(),ce(0),(e.currentTarget.parentElement?.children[0])?.focus()),e.key===`End`&&(e.preventDefault(),ce(oe-1),(e.currentTarget.parentElement?.children[oe-1])?.focus())},[y,oe,ce]),he=Array(oe).fill(0).map((e,t)=>(0,U.createElement)(dl,{...I(`indicator`),key:t,role:`tab`,"aria-label":`Go to slide ${t+1}`,"aria-selected":t===R,tabIndex:t===R?0:-1,"data-active":t===R||void 0,onClick:()=>ce(t),onKeyDown:e=>me(e,t),"data-orientation":y,onMouseDown:e=>e.preventDefault(),...P?.(t)}));return(0,W.jsxs)(FO,{value:{getStyles:I,orientation:y},children:[j===`container`?(0,W.jsx)(UO,{...t,selector:`.${ne}`}):(0,W.jsx)(zO,{...t,selector:`.${ne}`}),(0,W.jsxs)(q,{role:`region`,"aria-roledescription":`carousel`,...I(`root`,{className:ne}),...F,id:te,mod:[{orientation:y,"include-gap-in-size":x},A],onKeyDownCapture:z,children:[(0,W.jsx)(pl,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:oe>0&&`Slide ${R+1} of ${oe}`}),w&&(0,W.jsxs)(`div`,{...I(`controls`),"data-orientation":y,children:[(0,W.jsx)(dl,{"aria-controls":te,"aria-label":`Previous slide`,"aria-disabled":!fe,"data-inactive":!fe||void 0,"data-type":`previous`,tabIndex:fe?0:-1,...m,...I(`control`,{className:m?.className,style:m?.style}),onClick:e=>{ue(),m?.onClick?.(e)},children:O===void 0?(0,W.jsx)(Pf,{style:{transform:`rotate(${WO({dir:re,orientation:y,direction:`previous`})}deg)`}}):O}),(0,W.jsx)(dl,{"aria-controls":te,"aria-label":`Next slide`,"aria-disabled":!pe,"data-inactive":!pe||void 0,"data-type":`next`,tabIndex:pe?0:-1,...I(`control`,{className:p?.className,style:p?.style}),...p,onClick:e=>{de(),p?.onClick?.(e)},children:D===void 0?(0,W.jsx)(Pf,{style:{transform:`rotate(${WO({dir:re,orientation:y,direction:`next`})}deg)`}}):D})]}),(0,W.jsx)(`div`,{...I(`viewport`),ref:ie,"data-type":j,children:(0,W.jsx)(`div`,{...I(`container`,{className:ne}),"data-orientation":y,children:c})}),T&&(0,W.jsx)(`div`,{...I(`indicators`),role:`tablist`,"aria-label":`Slides`,"data-orientation":y,children:he})]})]})});$k.classes=LO,$k.varsResolver=Qk,$k.displayName=`@mantine/carousel/Carousel`,$k.Slide=RO;function eA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M15 18L9 12L15 6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function tA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M9.00005 6L15 12L9 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var nA={"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`},rA=$k.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,W.jsx)(tA,{height:16,width:16}),previousControlIcon:(0,W.jsx)(eA,{height:16,width:16}),slideGap:H(nA[`space-400`]),slideSize:{base:`90%`,sm:`47%`},withControls:!0,withIndicators:!1,emblaOptions:{align:`start`}}}),iA={root:`_root_sbem5_1`,input:`_input_sbem5_8`,label:`_label_sbem5_26`,icon:`_icon_sbem5_47`,inner:`_inner_sbem5_54`,error:`_error_sbem5_58`};function aA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M1.5 5L3.25 6.75L8.5 1.25`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function oA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`10`,height:`8`,viewBox:`0 0 10 8`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M2.5 4L7.5 4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var sA=tm.extend({classNames:iA,defaultProps:{icon:({indeterminate:e,...t})=>e?(0,W.jsx)(oA,{...t}):(0,W.jsx)(aA,{...t})}}),cA=Bm.extend({classNames:{alphaOverlay:`_alphaOverlay_1uog6_1`,shadowOverlay:`_shadowOverlay_1uog6_2`}}),lA={XS:352,SM:584,MD:800,LG:1160,XL:1160},uA=Object.entries(lA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:H(n)}),{}),dA={fluidContainer:`_fluidContainer_34o23_1`,responsiveContainer:`_responsiveContainer_34o23_5`,miniContainer:`_miniContainer_34o23_24`},fA=Wm.extend({defaultProps:{size:`responsive`},classNames:(e,{size:t,fluid:n})=>({root:wn({[dA.fluidContainer]:n,[dA.miniContainer]:t===`mini`,[dA.responsiveContainer]:!n&&t===`responsive`})}),vars:(e,{size:t,fluid:n})=>({root:{"--container-size":n?`100%`:t!==void 0&&t in uA?uA[t]:H(t)}})}),pA={placeholder:TO,getYearControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`year`)&&{"current-year":!0}}}),getMonthControlProps:e=>({mod:{...(0,Q.default)().isSame(e,`month`)&&{"current-month":!0}}})},mA={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`},hA=pO.extend({classNames:mA,defaultProps:{withCellSpacing:!1,weekdayFormat:`ddd`,renderDay:e=>{let t=(0,Q.default)(e),n=(0,Q.default)().isSame(t,`day`);return(0,W.jsx)(Xf,{span:!0,className:wn({[mA.dayToday]:n}),children:t.format(`D`)})},...pA}}),gA=wO.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:{...pA,valueFormat:TO}}),_A=Jm.extend({classNames:{root:`_root_uz5je_1`},defaultProps:{size:1}}),vA={xs:.08,sm:.16,md:.24,lg:.4,xl:.56},yA=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:vA.xl,blur:6}}}),bA=Oh.extend({defaultProps:{columnGap:24,rowGap:16}}),xA=Eu.extend({defaultProps:{gap:0,align:`flex-start`}}),SA={wrapper:`_wrapper_194dy_1`,input:`_input_194dy_9`,section:`_section_194dy_42`},CA={placeholder:`_placeholder_1o876_1`},wA={root:`_root_n7rgq_1`,label:`_label_n7rgq_7`,error:`_error_n7rgq_11`,description:`_description_n7rgq_18`,required:`_required_n7rgq_23`},TA=bf.extend({classNames:SA}),EA=bf.Wrapper.extend({classNames:wA,defaultProps:{inputWrapperOrder:[`label`,`input`,`description`,`error`]}}),DA=bf.Placeholder.extend({classNames:CA}),OA=cu.extend({defaultProps:{size:`xs`}}),kA=eg.extend({classNames:{dropdown:`_dropdown_wis3q_1`,item:`_item_wis3q_12`},defaultProps:{offset:4,position:`bottom-end`}}),AA=gg.extend({classNames:{root:`_root_p18vd_1`,header:`_header_p18vd_9`,title:`_title_p18vd_13`,content:`_content_p18vd_20`,body:`_body_p18vd_30`,close:`_close_p18vd_36`},defaultProps:{size:`md`,yOffset:`5vh`,transitionProps:{duration:300,transition:`fade-down`},closeButtonProps:{size:24},overlayProps:{backgroundOpacity:vA.xl,blur:6},scrollAreaComponent:sl.Autosize}}),jA=lO.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:{...pA}}),MA=SO.extend({classNames:{day:`_day_1i329_1`,dayToday:`_dayToday_1i329_30`,month:`_month_1i329_35`,calendarHeaderLevel:`_calendarHeaderLevel_1i329_40`,calendarHeaderControl:`_calendarHeaderControl_1i329_45`,weekday:`_weekday_1i329_49`,monthsListControl:`_monthsListControl_1i329_54`,yearsListControl:`_yearsListControl_1i329_55`},defaultProps:{...pA}}),NA=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,W.jsxs)(Eu,{gap:8,children:[(0,W.jsx)(tm,{checked:e,onChange:()=>{},styles:{root:{pointerEvents:`none`}},tabIndex:-1,"aria-hidden":!0}),(0,W.jsx)(Xf,{span:!0,children:t.label})]}),searchable:!0}}),PA=Lg.extend({classNames:{root:`_root_1s2hi_1`,section:`_section_1s2hi_37`},defaultProps:{rightSection:null,childrenOffset:26}}),FA=Vg.extend({classNames:{root:`_root_1xfa4_1`,icon:`_icon_1xfa4_11`,description:`_description_1xfa4_15`,title:`_title_1xfa4_18`,closeButton:`_closeButton_1xfa4_22`}}),IA=Q_.extend({defaultProps:{allowNegative:!1,thousandSeparator:`,`}}),LA=xv.extend({classNames:{root:`_root_1fw4a_1`,control:`_control_1fw4a_9`,dots:`_dots_1fw4a_22`},defaultProps:{nextIcon:tA,previousIcon:eA,size:`lg`}}),RA=gl.extend({defaultProps:{shadow:`none`}});function zA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M22 8C22 8 18 14 12 14C6 14 2 8 2 8`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,W.jsx)(`path`,{d:`M15 13.5L16.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M20 11L22 13`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2 13L4 11`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M9 13.5L7.5 16`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function BA({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.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 VA=Ev.extend({classNames:{visibilityToggle:`_visibilityToggle_rqask_1`,input:`_input_rqask_12`,innerInput:`_innerInput_rqask_12`},defaultProps:{visibilityToggleIcon:({reveal:e})=>e?(0,W.jsx)(zA,{}):(0,W.jsx)(BA,{})}}),HA=wg.extend({classNames:{root:`_root_1us9a_1`,label:`_label_1us9a_21`,remove:`_remove_1us9a_42`}}),UA=eu.extend({classNames:{dropdown:`_dropdown_145m5_1`}}),WA=Fv.extend({classNames:{root:`_root_1lid3_1`},defaultProps:{color:`brand-orange.5`,size:4}}),GA=Zv.extend({classNames:{root:`_root_c4gsg_1`,radio:`_radio_c4gsg_9`,label:`_label_c4gsg_22`,icon:`_icon_c4gsg_40`,error:`_error_c4gsg_58`,inner:`_inner_c4gsg_62`}}),KA=Zv.Card.extend({classNames:{card:`_card_11cie_1`}}),qA=Zv.Indicator.extend({classNames:{indicator:`_indicator_14pfe_1`,icon:`_icon_14pfe_17`}}),JA=Cy.extend({classNames:{root:`_root_nz2l8_1`,indicator:`_indicator_nz2l8_5`},defaultProps:{withItemsBorders:!1,radius:`md`}});function YA({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M5 14L8.5 17.5L19 6.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var XA=({checked:e,option:t})=>(0,W.jsxs)(Eu,{gap:8,children:[e&&(0,W.jsx)(YA,{width:16,height:16}),(0,W.jsx)(Xf,{span:!0,children:t.label})]}),ZA=Ty.extend({classNames:{input:`_input_xmuz2_1`,section:`_section_xmuz2_6`,dropdown:`_dropdown_xmuz2_35`,option:`_option_xmuz2_41`},defaultProps:{allowDeselect:!1,renderOption:XA}}),QA=Vy.extend({defaultProps:{gap:0}}),$A=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}}),ej=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}}),tj=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}}),nj=Nb.extend({classNames:{root:`_root_1x595_1`,list:`_list_1x595_1`,tab:`_tab_1x595_11`,tabLabel:`_tabLabel_1x595_18`,tabSection:`_tabSection_1x595_44`}}),rj=Rb.extend({classNames:{input:`_input_1lws5_1`,pill:`_pill_1lws5_6`},defaultProps:{splitChars:[`,`,` `,`|`]}}),ij=Xf.extend({classNames:{root:`_root_15h2k_1`},defaultProps:{size:`md`}}),aj=Lh.extend({classNames:{input:`_input_11t2a_1`},defaultProps:{autosize:!0,maxRows:5,minRows:2,resize:`vertical`}}),oj=Yb.extend({classNames:{root:`_root_6pd11_1`}}),sj=dy.extend({classNames:{tooltip:`_tooltip_17xpf_1`},defaultProps:{multiline:!0,maw:300}}),cj=aO.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:{...pA}}),lj=bO.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:{...pA}}),uj=[`#F8F8FB`,`#EFEFF6`,`#DEDEED`,`#CACAE2`,`#B3B3D5`,`#9696C5`,`#7575B3`,`#414275`,`#35355F`,`#242442`,`#18182B`],dj=[`#FFF7F0`,`#FFEDDB`,`#FFDAB8`,`#FFC085`,`#FFA34D`,`#FF7A00`,`#E66F00`,`#C76000`,`#A85100`,`#7A3B00`,`#5C2C00`],fj=[`#EAF3FE`,`#DFEEFD`,`#BEDBFB`,`#2C8BF3`,`#287DDB`,`#236FC2`,`#2168B6`,`#1A5392`,`#143F6D`,`#0F3155`],pj=[`#FEF3E9`,`#FEEDDE`,`#FCD9BB`,`#F68623`,`#DD7920`,`#C56B1C`,`#B9651A`,`#C76000`,`#6F3C10`,`#562F0C`],mj=[`#FDEBEA`,`#FCE1DF`,`#F8C1BD`,`#EA3829`,`#D33225`,`#BB2D21`,`#B02A1F`,`#8C2219`,`#691912`,`#52140E`],hj=[`#E8F5EF`,`#DDF0E7`,`#B9E1CD`,`#1C9E5D`,`#198E54`,`#167E4A`,`#157746`,`#115F38`,`#0D472A`,`#0A3721`],gj={xs:H(10),sm:H(12),md:H(14),lg:H(16),xl:H(20)},_j={xs:H(12),sm:H(16),md:H(20),lg:H(24),xl:H(28)},vj={fontWeight:`500`,sizes:{h1:{fontSize:H(32),lineHeight:H(36)},h2:{fontSize:H(24),lineHeight:H(28)},h3:{fontSize:H(20),lineHeight:H(24)},h4:{fontSize:H(18),lineHeight:H(20)},h5:{fontSize:H(12),lineHeight:H(16)},h6:{fontSize:H(12),lineHeight:H(16)}}},yj=Object.entries(lA).reduce((e,[t,n])=>({...e,[t.toLowerCase()]:Ue(n)}),{});function bj(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xj(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(bj(a)&&bj(i)?n[r]=xj(a,i):n[r]=i)}return n}var Sj={"brand-dark-blue":uj,"brand-orange":dj,danger:mj,success:hj,info:fj,blue:fj,orange:pj,red:mj,green:hj},Cj={Accordion:OO,ActionIcon:kO,Alert:AO,Anchor:jO,Avatar:MO,Badge:NO,Button:PO,Carousel:rA,Checkbox:sA,ColorSwatch:cA,Container:fA,DateInput:EO,DatePicker:hA,DatePickerInput:gA,Divider:_A,Drawer:yA,Grid:bA,Group:xA,Input:TA,InputPlaceholder:DA,InputWrapper:EA,Loader:OA,Menu:kA,Modal:AA,MonthPicker:jA,MonthPickerInput:MA,MultiSelect:NA,NavLink:PA,Notification:FA,NumberInput:IA,Paper:RA,Pagination:LA,PasswordInput:VA,Pill:HA,Popover:UA,Progress:WA,Radio:GA,RadioCard:KA,RadioIndicator:qA,SegmentedControl:JA,Select:ZA,Stack:QA,Stepper:$A,Switch:ej,Table:tj,Tabs:nj,TagsInput:rj,Text:ij,Textarea:aj,Title:oj,Tooltip:sj,YearPicker:cj,YearPickerInput:lj};function wj(e={}){let t={...gj,...e.fontSizes},n={..._j,...e.lineHeights},r=xj(vj,e.headings??{}),i={...yj,...e.breakpoints},a={...Sj,...e.colors};return Br({components:Cj,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})}wj();var Tj={"border-025":`1px`,"border-050":`2px`},Ej={"surface-body-bg":`#F8F8FB`,"surface-default":`#FFFFFF`,"surface-disable":`#EFEFF6`,"surface-level-1":`#F8F8FB`,"surface-level-2":`#EFEFF6`},Dj={"primary-lighter":`#FFF7F0`,"primary-light":`#FFA34D`,"primary-default":`#FF7A00`,"primary-dark":`#A85100`,"primary-darker":`#7A3B00`},Oj={"secondary-lighter":`#F8F8FB`,"secondary-light":`#EFEFF6`,"secondary-default":`#414275`,"secondary-dark":`#35355F`,"secondary-darker":`#18182B`},kj={"success-lighter":`#E8F5EF`,"success-light":`#B9E1CD`,"success-default":`#167E4A`,"success-dark":`#115F38`,"success-darker":`#0A3721`},Aj={"danger-lighter":`#FDEBEA`,"danger-light":`#F8C1BD`,"danger-default":`#BB2D21`,"danger-dark":`#8C2219`,"danger-darker":`#52140E`,"danger-contrast":`#FF6F61`},jj={"info-lighter":`#EAF3FE`,"info-light":`#BEDBFB`,"info-default":`#2C8BF3`,"info-dark":`#236FC2`,"info-darker":`#0F3155`},Mj={"warning-lighter":`#FEF3E9`,"warning-light":`#FCD9BB`,"warning-default":`#C56B1C`,"warning-dark":`#B9651A`,"warning-darker":`#562F0C`},Nj={"text-white":`#FFFFFF`,"text-light":`#B3B3D5`,"text-default":`#414275`,"text-dark":`#242442`,"text-disable":`#B3B3D5`},Pj={"border-light":`#EFEFF6`,"border-default":`#DEDEED`,"border-dark":`#CACAE2`},Fj={"icon-white":`#FFFFFF`,"icon-light":`#B3B3D5`,"icon-default":`#414275`,"icon-dark":`#242442`,"icon-disable":`#B3B3D5`},Ij={"header-bg":`#F8F8FB`,"header-font":`#242442`,"header-icon":`#242442`,"header-border-color":`#DEDEED`},Lj={"icon-xs":12,"icon-sm":16,"icon-md":18,"icon-lg":20,"icon-xl":24},Rj={"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%`},zj={"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)`},Bj={...Ej,...Dj,...Oj,...kj,...Aj,...jj,...Mj,...Nj,...Pj,...Fj,...Ij},Vj=vA;function Hj(e={}){let{tokens:t={},theme:n={}}=e;return Vr(wj(n),Br({other:{border:{...Tj,...t.border},color:{...Bj,...t.color},iconSize:{...Lj,...t.iconSize},opacity:{...Vj,...t.opacity},radius:{...Rj,...t.radius},space:{...nA,...t.space},shadow:{...zj,...t.shadow}}}))}Hj();function Uj(){return Cr()}var Wj=[`#EDF7ED`,`#EDF7ED`,`#BBDABD`,`#BBDABD`,`#3C6E47`,`#3C6E47`,`#2E5637`,`#2E5637`,`#1F3824`,`#1F3824`,`#1F3824`],Gj=[`#F3FAEE`,`#F3FAEE`,`#C5E2AE`,`#C5E2AE`,`#7BAA4A`,`#7BAA4A`,`#5F8438`,`#5F8438`,`#3E5725`,`#3E5725`,`#3E5725`],Kj={"surface-body-bg":`#F4F8F3`,"surface-default":`#FFFFFF`,"surface-level-1":`#E8F0E5`,"surface-level-2":`#D8E6D2`},qj={"primary-lighter":`#EDF7ED`,"primary-light":`#BBDABD`,"primary-default":`#3C6E47`,"primary-dark":`#2E5637`,"primary-darker":`#1F3824`},Jj={"secondary-lighter":`#F3FAEE`,"secondary-light":`#C5E2AE`,"secondary-default":`#7BAA4A`,"secondary-dark":`#5F8438`,"secondary-darker":`#3E5725`},Yj={"text-light":`#6D8770`,"text-default":`#36553A`,"text-dark":`#243726`},Xj={"border-light":`#DDE8DB`,"border-default":`#BDD0BB`,"border-dark":`#9EB59D`},Zj={"icon-light":`#6D8770`,"icon-default":`#36553A`,"icon-dark":`#243726`},Qj={"header-bg":`#F7FBF6`,"header-font":`#243726`,"header-icon":`#2E5637`,"header-border-color":`#DDE8DB`},$j={...Kj,...qj,...Jj,...Yj,...Xj,...Zj,...Qj},eM={"icon-xs":Lj[`icon-xs`],"icon-sm":Lj[`icon-sm`],"icon-md":Lj[`icon-md`],"icon-lg":Lj[`icon-lg`],"icon-xl":Lj[`icon-xl`]},tM={"radius-150":Rj[`radius-150`],"radius-300":Rj[`radius-300`],"radius-400":Rj[`radius-400`],"radius-500":Rj[`radius-500`]},nM={"space-150":nA[`space-150`],"space-200":nA[`space-200`],"space-300":nA[`space-300`],"space-400":nA[`space-400`],"space-500":nA[`space-500`],"space-600":nA[`space-600`]},rM={label:`Forest`,theme:{fontFamily:`"Trebuchet MS", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(12),md:H(14),lg:H(16)}},brand:{darkBlue:Wj,orange:Gj},tokens:{color:$j,radius:tM,space:nM,iconSize:eM}},iM=[`#EAF5FE`,`#EAF5FE`,`#BFDFFF`,`#BFDFFF`,`#2A6F97`,`#2A6F97`,`#205A7B`,`#205A7B`,`#163F56`,`#163F56`,`#163F56`],aM=[`#E8FBFB`,`#E8FBFB`,`#7FD8DA`,`#7FD8DA`,`#1BA6A6`,`#1BA6A6`,`#137979`,`#137979`,`#0D5656`,`#0D5656`,`#0D5656`],oM={"surface-body-bg":`#F1F7FB`,"surface-default":`#FFFFFF`,"surface-level-1":`#E7F0F8`,"surface-level-2":`#D9E8F4`},sM={"primary-lighter":`#EAF5FE`,"primary-light":`#BFDFFF`,"primary-default":`#2A6F97`,"primary-dark":`#205A7B`,"primary-darker":`#163F56`},cM={"secondary-lighter":`#E8FBFB`,"secondary-light":`#7FD8DA`,"secondary-default":`#1BA6A6`,"secondary-dark":`#137979`,"secondary-darker":`#0D5656`},lM={"text-light":`#6F8CA6`,"text-default":`#23425D`,"text-dark":`#183043`},uM={"border-light":`#DCEAF3`,"border-default":`#BDD3E3`,"border-dark":`#98B8CF`},dM={"icon-light":`#6F8CA6`,"icon-default":`#23425D`,"icon-dark":`#183043`},fM={"header-bg":`#F6FBFE`,"header-font":`#183043`,"header-icon":`#205A7B`,"header-border-color":`#DCEAF3`},pM={...oM,...sM,...cM,...lM,...uM,...dM,...fM},mM={"icon-sm":Lj[`icon-sm`],"icon-md":Lj[`icon-md`],"icon-lg":Lj[`icon-lg`],"icon-xl":Lj[`icon-xl`]},hM={"radius-300":Rj[`radius-300`],"radius-400":Rj[`radius-400`],"radius-500":Rj[`radius-500`]},gM={"space-300":nA[`space-300`],"space-400":nA[`space-400`],"space-500":nA[`space-500`],"space-600":nA[`space-600`],"space-700":nA[`space-700`],"space-800":nA[`space-800`],"space-900":nA[`space-900`]},_M={label:`Ocean`,theme:{fontFamily:`"Avenir Next", "Segoe UI", sans-serif`,primaryColor:`brand-dark-blue`,fontSizes:{sm:H(13),md:H(15),lg:H(17)}},brand:{darkBlue:iM,orange:aM},tokens:{color:pM,radius:hM,space:gM,iconSize:mM}},vM={foundations:{label:`Foundations`,theme:{fontFamily:`Geist`,primaryColor:`brand-orange`},brand:{darkBlue:uj,orange:dj},tokens:{color:{...Ej,...Dj,...Oj,...Nj,...Pj,...Fj,...Ij},radius:Rj,space:nA,iconSize:Lj,border:Tj,shadow:zj,opacity:vA}},ocean:_M,forest:rM},yM=[`foundations`,`ocean`,`forest`],bM=`foundations`;function xM(e){let{theme:t,brand:n,tokens:r}=e;return{label:e.label,options:{theme:{...t,colors:{...t.colors??{},"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 SM={foundations:xM(vM.foundations),ocean:xM(vM.ocean),forest:xM(vM.forest)};function CM(e){return typeof e==`string`&&yM.includes(e)}function wM(e){return SM[CM(e)?e:bM]}function TM({themeName:e}={}){return Hj(wM(e).options)}var EM=(0,U.createContext)(null),DM=e=>{let t=(0,U.useContext)(EM);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(e??`useLingui hook was used without I18nProvider.`);return t};function OM(){return DM()}var kM=({i18n:e,defaultComponent:t,children:n})=>{let r=(0,U.useRef)(e.locale),i=(0,U.useCallback)(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[a,o]=(0,U.useState)(i());return(0,U.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,W.jsx)(EM.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)},AM=(0,U.createContext)(null),jM=(0,U.createContext)({customerId:``,customerToken:``,language:`en`,forceReAuth:!1});function MM({runtime:e,children:t}){return(0,W.jsx)(jM.Provider,{value:e,children:t})}function NM({config:e,children:t}){return(0,W.jsx)(AM.Provider,{value:e,children:t})}var PM=(0,U.createContext)({keycloak:{url:``,realm:``,clientId:``},url:{app:``,api:``,apiPaths:{crm:``,uiAuthz:``}},features:{enableThemeManager:!0},growthBook:{apiHost:``,clientKey:``,enabled:!1}}),FM=({children:e,config:t})=>(0,W.jsx)(PM.Provider,{value:t,children:e});function IM(e){return e.replace(/(-?\d*\.?\d+)rem/g,(e,t)=>`${Number.parseFloat(t)*16}px`)}function LM({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,U.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}`,IM(String(n)))}),Object.entries(s).forEach(([t,n])=>{e.setProperty(`--mantine-line-height-${t}`,IM(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,W.jsx)(kM,{i18n:Pe,children:(0,W.jsx)(Rr,{theme:i,cssVariablesSelector:c,getRootElement:()=>l,defaultColorScheme:`auto`,children:(0,W.jsx)(eS,{client:xE,children:(0,W.jsx)(FM,{config:t,children:(0,W.jsx)(NM,{config:n,children:(0,W.jsx)(MM,{runtime:r,children:e})})})})})})}function RM(){let e=(0,U.useRef)(null);return{startInteraction:(0,U.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,U.useCallback)(()=>{e.current?.()},[])}}var zM=4;function BM(e={}){let{skipSelector:t=`button, [role="button"], a, input, textarea`,onDragChange:n}=e,[r,i]=(0,U.useState)({x:0,y:0}),[a,o]=(0,U.useState)(!1),s=(0,U.useRef)({startX:0,startY:0,startOffset:{x:0,y:0}}),{startInteraction:c}=RM();return{offset:r,isDragging:a,handlePointerDown:(0,U.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>=zM&&(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 VM(e){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,W.jsx)(`path`,{d:`M12 8V4H8`}),(0,W.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,W.jsx)(`path`,{d:`M2 14h2`}),(0,W.jsx)(`path`,{d:`M20 14h2`}),(0,W.jsx)(`path`,{d:`M15 13v2`}),(0,W.jsx)(`path`,{d:`M9 13v2`})]})}var HM={root:`_root_74oe4_1`,button:`_button_74oe4_5`,buttonInner:`_buttonInner_74oe4_30`,iconSection:`_iconSection_74oe4_35`,label:`_label_74oe4_39`};function UM({onClick:e,zIndex:t,position:n,label:r}){let i=Uj(),{handlePointerDown:a,style:o}=BM({skipSelector:``}),s=Math.min(i.other.iconSize[`icon-sm`],16),{transform:c,cursor:l,touchAction:u}=o,d=(0,U.useMemo)(()=>({transform:c,touchAction:u,zIndex:t,...n}),[n,u,c,t]),f=(0,U.useMemo)(()=>({cursor:l??`pointer`}),[l]);return(0,W.jsx)(`div`,{className:HM.root,style:d,children:(0,W.jsx)(jm,{onClick:e,onPointerDown:a,style:f,classNames:{root:HM.button,inner:HM.buttonInner,section:HM.iconSection,label:HM.label},leftSection:(0,W.jsx)(VM,{width:s,height:s}),radius:20,variant:`primary`,"aria-label":`Open ${r??`agent widget`}`,title:`Open ${r??`agent widget`}`,children:r??`Assistant`})})}var WM=(0,U.createContext)({});function GM(){return(0,U.useContext)(WM)}function KM(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim().replace(/^./,e=>e.toUpperCase())}function qM(e){if(e==null)return`-`;if(Array.isArray(e))return e.length>0?e.join(`, `):`-`;if(typeof e==`object`){let t=Object.entries(e);return t.length===0?`-`:t.map(([e,t])=>`${KM(e)}: ${String(t??`-`)}`).join(` | `)}return String(e).trim()||`-`}function JM(e){return e.trim().toLowerCase().replace(/\s+/g,`-`)}function YM(e){if(e.header.badge?.trim())return JM(e.header.badge);let t=JM(e.columnType);return t===`ourcatalog`||t===`catalog`||t===`internal`?`catalog`:`competitor`}function XM(e){if(typeof e!=`string`)return;let t=e.trim();if(!(!t||t.toLowerCase()===`internal`)){if(/^https?:\/\//i.test(t))return t;if(/^[\w.-]+\.[a-z]{2,}(\/.*)?$/i.test(t))return`https://${t}`}}function ZM(e){let t=new Set;return e.forEach(e=>{Object.keys(e.specs).forEach(e=>{e!==`priceNote`&&t.add(e)})}),Array.from(t)}function QM(e){return{formatLabel:KM,formatValue:qM,getTone:YM,toHref:XM,specKeys:ZM(e)}}var $M={surface:`_surface_1p3km_1`,scroller:`_scroller_1p3km_16`,table:`_table_1p3km_32`,stickyColumn:`_stickyColumn_1p3km_39`,cornerCell:`_cornerCell_1p3km_45`,sectionLabel:`_sectionLabel_1p3km_52`,offerHeader:`_offerHeader_1p3km_61`,offerEyebrow:`_offerEyebrow_1p3km_79`,offerTitle:`_offerTitle_1p3km_89`,offerBadge:`_offerBadge_1p3km_108`,rowLabel:`_rowLabel_1p3km_122`,dataCell:`_dataCell_1p3km_123`,footerStub:`_footerStub_1p3km_124`,footerCell:`_footerCell_1p3km_125`,rowLabelText:`_rowLabelText_1p3km_142`,cellPrimary:`_cellPrimary_1p3km_154`,cellLink:`_cellLink_1p3km_155`,cellSecondary:`_cellSecondary_1p3km_181`,footerButton:`_footerButton_1p3km_193`};function eN({comparisonModal:e,fillHeight:t=!0,isBusy:n=!1,onClose:r}){if(!e||e.columns.length===0)return null;let{sendMessage:i}=GM(),{formatLabel:a,formatValue:o,getTone:s,toHref:c,specKeys:l}=QM(e.columns),u=e.columns.some(e=>e.selectButton?.buttonText),d=(0,U.useCallback)(e=>{r?.(),i?.(e,{showUserBubble:!1})},[r,i]);return(0,W.jsx)(q,{className:$M.surface,"data-fill-height":t,children:(0,W.jsx)(sl,{type:`auto`,offsetScrollbars:!0,scrollbarSize:10,className:$M.scroller,children:(0,W.jsxs)(q,{className:$M.table,style:{gridTemplateColumns:`180px repeat(${Math.max(e.columns.length,1)}, minmax(196px, 1fr))`},children:[(0,W.jsx)(Nm,{className:`${$M.cornerCell} ${$M.stickyColumn}`,children:(0,W.jsx)(Xf,{className:$M.sectionLabel,children:`Specifications`})}),e.columns.map((e,t)=>{let n=s(e);return(0,W.jsx)(Vy,{gap:10,className:$M.offerHeader,"data-tone":n,children:(0,W.jsxs)(Ef,{direction:`column`,align:`center`,justify:`center`,gap:4,h:`100%`,children:[(0,W.jsxs)(Vy,{gap:4,align:`center`,children:[(0,W.jsx)(Xf,{className:$M.offerEyebrow,children:o(e.header.label)}),(0,W.jsx)(Xf,{className:$M.offerTitle,children:o(e.header.offerName)})]}),e.header.badge?(0,W.jsx)(Sm,{radius:`sm`,className:$M.offerBadge,children:e.header.badge}):null]})},`${e.header.offerName}-${t}`)}),l.map(t=>(0,W.jsxs)(U.Fragment,{children:[(0,W.jsx)(Nm,{className:`${$M.rowLabel} ${$M.stickyColumn}`,children:(0,W.jsx)(Xf,{className:$M.rowLabelText,children:a(t)})}),e.columns.map((e,n)=>{let r=s(e),i=e.specs[t],a=/url$/i.test(t)?c(i):void 0,l=t===`price`?o(e.specs.priceNote):void 0,u=t===`price`?r===`threat`?`accent`:`strong`:`default`;return(0,W.jsxs)(Vy,{gap:4,className:$M.dataCell,children:[a?(0,W.jsx)($f,{href:a,target:`_blank`,rel:`noreferrer`,className:$M.cellLink,children:o(i)}):(0,W.jsx)(Xf,{className:$M.cellPrimary,"data-emphasis":u,children:o(i)}),l&&l!==`-`?(0,W.jsx)(Xf,{className:$M.cellSecondary,children:l}):null]},`${t}-${e.header.offerName}-${n}`)})]},t)),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Nm,{className:`${$M.footerStub} ${$M.stickyColumn}`}),e.columns.map((e,t)=>{let r=s(e);return(0,W.jsx)(Nm,{className:$M.footerCell,children:e.selectButton?.buttonText?(0,W.jsx)(jm,{radius:`md`,className:$M.footerButton,"data-tone":r,variant:r===`catalog`?`light`:`filled`,disabled:n,onClick:()=>d(e.selectButton.buttonText),children:e.selectButton.buttonText}):null},`${e.header.offerName}-${t}-cta`)})]}):null]})})})}function tN(e){return typeof document>`u`?null:e?.trim()?document.querySelector(e)??document.body:document.body}function nN(e){if(e===document.body||e===document.documentElement)return null;let t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=Number.parseFloat(n.paddingTop||`0`)||0,i=Number.parseFloat(n.paddingRight||`0`)||0,a=Number.parseFloat(n.paddingBottom||`0`)||0,o=Number.parseFloat(n.paddingLeft||`0`)||0;return{top:t.top+r,left:t.left+o,width:Math.max(0,t.width-o-i),height:Math.max(0,t.height-r-a)}}function rN({hostContainerSelector:e,opened:t,hasComparison:n,hasContent:r,size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l}){let[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(null);return(0,U.useEffect)(()=>{let t=tN(e);if(d(t),!t){p(null);return}let n=()=>{p(nN(t))};if(n(),t===document.body||t===document.documentElement)return;let r=new ResizeObserver(n);return r.observe(t),window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{r.disconnect(),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]),{portalTarget:u,resolvedSize:i??(n?`xl`:`md`),shellStyle:(0,U.useMemo)(()=>f?{top:`${f.top}px`,left:`${f.left}px`,width:`${f.width}px`,height:`${f.height}px`,zIndex:a}:{top:o,height:s,left:c,right:l,zIndex:a},[f,s,c,l,o,a]),shouldRender:t&&!!u&&r}}var iN={shell:`_shell_fjxge_1`,modalRoot:`_modalRoot_fjxge_6`,inner:`_inner_fjxge_12`,overlay:`_overlay_fjxge_19`,content:`_content_fjxge_26`,header:`_header_fjxge_36`,mantineTitle:`_mantineTitle_fjxge_40`,title:`_title_fjxge_44`,subtitle:`_subtitle_fjxge_53`,close:`_close_fjxge_60`,body:`_body_fjxge_74`,bodyContent:`_bodyContent_fjxge_81`,bodyScrollArea:`_bodyScrollArea_fjxge_88`,popupSections:`_popupSections_fjxge_92`,bodyText:`_bodyText_fjxge_96`};function aN({opened:e,onClose:t,message:n,isAssistantStreaming:r=!1,size:i,zIndex:a,layoutTop:o=`var(--mantine-custom-space-150)`,layoutHeight:s=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,layoutLeftOffset:c=`var(--mantine-custom-space-150)`,layoutRightOffset:l=`0px`,hostContainerSelector:u}){let d=(0,U.useId)(),f=n?.popup,p=f?.comparisonModal,m=f?.title??p?.title,h=f?.subtitle??p?.subtitle,g=f?.body??n?.text,_=!!p,{portalTarget:v,resolvedSize:y,shellStyle:b,shouldRender:x}=rN({hostContainerSelector:u,opened:e,hasComparison:_,hasContent:!!(p||g||f),size:i,zIndex:a,layoutTop:o,layoutHeight:s,layoutLeftOffset:c,layoutRightOffset:l});return!x||!v?null:(0,cn.createPortal)((0,W.jsx)(q,{className:iN.shell,style:b,children:(0,W.jsx)(gg,{opened:e,onClose:t,title:(0,W.jsxs)(Vy,{gap:4,children:[(0,W.jsx)(Xf,{id:d,className:iN.title,component:`span`,children:m}),h?(0,W.jsx)(Xf,{className:iN.subtitle,component:`span`,children:h}):null]}),withCloseButton:!0,withinPortal:!1,centered:!0,lockScroll:!1,closeOnClickOutside:!1,trapFocus:!1,size:y,scrollAreaComponent:sl.Autosize,classNames:{root:iN.modalRoot,inner:iN.inner,overlay:iN.overlay,content:iN.content,header:iN.header,body:iN.body,close:iN.close,title:iN.mantineTitle},overlayProps:{backgroundOpacity:vA.lg,blur:6},children:(0,W.jsx)(q,{className:iN.bodyContent,"data-layout":_?`comparison`:`text`,children:_?(0,W.jsx)(sl.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:iN.bodyScrollArea,children:(0,W.jsx)(Vy,{gap:`md`,className:iN.popupSections,children:(0,W.jsx)(eN,{comparisonModal:p,fillHeight:!0,isBusy:r,onClose:t})})}):g?(0,W.jsx)(sl.Autosize,{mah:`100%`,offsetScrollbars:!0,scrollbarSize:8,className:iN.bodyScrollArea,children:(0,W.jsx)(Xf,{className:iN.bodyText,component:`p`,children:g})}):null})})}),v)}var{entries:oN,setPrototypeOf:sN,isFrozen:cN,getPrototypeOf:lN,getOwnPropertyDescriptor:uN}=Object,{freeze:dN,seal:fN,create:pN}=Object,{apply:mN,construct:hN}=typeof Reflect<`u`&&Reflect;dN||=function(e){return e},fN||=function(e){return e},mN||=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)},hN||=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 gN=AN(Array.prototype.forEach),_N=AN(Array.prototype.lastIndexOf),vN=AN(Array.prototype.pop),yN=AN(Array.prototype.push),bN=AN(Array.prototype.splice),xN=AN(String.prototype.toLowerCase),SN=AN(String.prototype.toString),CN=AN(String.prototype.match),wN=AN(String.prototype.replace),TN=AN(String.prototype.indexOf),EN=AN(String.prototype.trim),DN=AN(Object.prototype.hasOwnProperty),ON=AN(RegExp.prototype.test),kN=jN(TypeError);function AN(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 mN(e,t,r)}}function jN(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return hN(e,n)}}function MN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xN;sN&&sN(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(cN(t)||(t[r]=e),i=e)}e[i]=!0}return e}function NN(e){for(let t=0;t<e.length;t++)DN(e,t)||(e[t]=null);return e}function PN(e){let t=pN(null);for(let[n,r]of oN(e))DN(e,n)&&(Array.isArray(r)?t[n]=NN(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=PN(r):t[n]=r);return t}function FN(e,t){for(;e!==null;){let n=uN(e,t);if(n){if(n.get)return AN(n.get);if(typeof n.value==`function`)return AN(n.value)}e=lN(e)}function n(){return null}return n}var IN=dN(`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(`.`)),LN=dN(`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(`.`)),RN=dN([`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`]),zN=dN([`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`]),BN=dN(`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(`.`)),VN=dN([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),HN=dN([`#text`]),UN=dN(`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(`.`)),WN=dN(`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(`.`)),GN=dN(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),KN=dN([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),qN=fN(/\{\{[\w\W]*|[\w\W]*\}\}/gm),JN=fN(/<%[\w\W]*|[\w\W]*%>/gm),YN=fN(/\$\{[\w\W]*/gm),XN=fN(/^data-[\-\w.\u00B7-\uFFFF]+$/),ZN=fN(/^aria-[\-\w]+$/),QN=fN(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$N=fN(/^(?:\w+script|data):/i),eP=fN(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tP=fN(/^html$/i),nP=fN(/^[a-z][.\w]*(-[.\w]+)+$/i),rP=Object.freeze({__proto__:null,ARIA_ATTR:ZN,ATTR_WHITESPACE:eP,CUSTOM_ELEMENT:nP,DATA_ATTR:XN,DOCTYPE_NAME:tP,ERB_EXPR:JN,IS_ALLOWED_URI:QN,IS_SCRIPT_OR_DATA:$N,MUSTACHE_EXPR:qN,TMPLIT_EXPR:YN}),iP={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},aP=function(){return typeof window>`u`?null:window},oP=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}},sP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function cP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:aP(),t=e=>cP(e);if(t.version=`3.3.3`,t.removed=[],!e||!e.document||e.document.nodeType!==iP.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=FN(m,`cloneNode`),g=FN(m,`remove`),_=FN(m,`nextSibling`),v=FN(m,`childNodes`),y=FN(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=sP();t.isSupported=typeof oN==`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}=rP,{IS_ALLOWED_URI:F}=rP,I=null,te=MN({},[...IN,...LN,...RN,...BN,...HN]),ne=null,re=MN({},[...UN,...WN,...GN,...KN]),ie=Object.seal(pN(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,R=null,ae=Object.seal(pN(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),oe=!0,se=!0,ce=!1,le=!0,ue=!1,de=!0,z=!1,fe=!1,pe=!1,me=!1,he=!1,B=!1,ge=!0,_e=!1,V=!0,ve=!1,ye={},be=null,xe=MN({},[`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`]),Se=null,Ce=MN({},[`audio`,`video`,`img`,`source`,`image`,`track`]),we=null,Te=MN({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ee=`http://www.w3.org/1998/Math/MathML`,De=`http://www.w3.org/2000/svg`,Oe=`http://www.w3.org/1999/xhtml`,ke=Oe,Ae=!1,je=null,Me=MN({},[Ee,De,Oe],SN),Ne=MN({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Pe=MN({},[`annotation-xml`]),Fe=MN({},[`title`,`style`,`font`,`a`,`script`]),Ie=null,Le=[`application/xhtml+xml`,`text/html`],Re=null,ze=null,Be=n.createElement(`form`),Ve=function(e){return e instanceof RegExp||e instanceof Function},He=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ze&&ze===e)){if((!e||typeof e!=`object`)&&(e={}),e=PN(e),Ie=Le.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Re=Ie===`application/xhtml+xml`?SN:xN,I=DN(e,`ALLOWED_TAGS`)?MN({},e.ALLOWED_TAGS,Re):te,ne=DN(e,`ALLOWED_ATTR`)?MN({},e.ALLOWED_ATTR,Re):re,je=DN(e,`ALLOWED_NAMESPACES`)?MN({},e.ALLOWED_NAMESPACES,SN):Me,we=DN(e,`ADD_URI_SAFE_ATTR`)?MN(PN(Te),e.ADD_URI_SAFE_ATTR,Re):Te,Se=DN(e,`ADD_DATA_URI_TAGS`)?MN(PN(Ce),e.ADD_DATA_URI_TAGS,Re):Ce,be=DN(e,`FORBID_CONTENTS`)?MN({},e.FORBID_CONTENTS,Re):xe,L=DN(e,`FORBID_TAGS`)?MN({},e.FORBID_TAGS,Re):PN({}),R=DN(e,`FORBID_ATTR`)?MN({},e.FORBID_ATTR,Re):PN({}),ye=DN(e,`USE_PROFILES`)?e.USE_PROFILES:!1,oe=e.ALLOW_ARIA_ATTR!==!1,se=e.ALLOW_DATA_ATTR!==!1,ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,le=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=e.SAFE_FOR_TEMPLATES||!1,de=e.SAFE_FOR_XML!==!1,z=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,he=e.RETURN_DOM_FRAGMENT||!1,B=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ge=e.SANITIZE_DOM!==!1,_e=e.SANITIZE_NAMED_PROPS||!1,V=e.KEEP_CONTENT!==!1,ve=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||QN,ke=e.NAMESPACE||Oe,Ne=e.MATHML_TEXT_INTEGRATION_POINTS||Ne,Pe=e.HTML_INTEGRATION_POINTS||Pe,ie=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ve(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ie.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ve(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),ue&&(se=!1),he&&(me=!0),ye&&(I=MN({},HN),ne=pN(null),ye.html===!0&&(MN(I,IN),MN(ne,UN)),ye.svg===!0&&(MN(I,LN),MN(ne,WN),MN(ne,KN)),ye.svgFilters===!0&&(MN(I,RN),MN(ne,WN),MN(ne,KN)),ye.mathMl===!0&&(MN(I,BN),MN(ne,GN),MN(ne,KN))),DN(e,`ADD_TAGS`)||(ae.tagCheck=null),DN(e,`ADD_ATTR`)||(ae.attributeCheck=null),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?ae.tagCheck=e.ADD_TAGS:(I===te&&(I=PN(I)),MN(I,e.ADD_TAGS,Re))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?ae.attributeCheck=e.ADD_ATTR:(ne===re&&(ne=PN(ne)),MN(ne,e.ADD_ATTR,Re))),e.ADD_URI_SAFE_ATTR&&MN(we,e.ADD_URI_SAFE_ATTR,Re),e.FORBID_CONTENTS&&(be===xe&&(be=PN(be)),MN(be,e.FORBID_CONTENTS,Re)),e.ADD_FORBID_CONTENTS&&(be===xe&&(be=PN(be)),MN(be,e.ADD_FORBID_CONTENTS,Re)),V&&(I[`#text`]=!0),z&&MN(I,[`html`,`head`,`body`]),I.table&&(MN(I,[`tbody`]),delete L.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw kN(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw kN(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);b=e.TRUSTED_TYPES_POLICY,x=b.createHTML(``)}else b===void 0&&(b=oP(p,i)),b!==null&&typeof x==`string`&&(x=b.createHTML(``));dN&&dN(e),ze=e}},H=MN({},[...LN,...RN,...zN]),Ue=MN({},[...BN,...VN]),We=function(e){let t=y(e);(!t||!t.tagName)&&(t={namespaceURI:ke,tagName:`template`});let n=xN(e.tagName),r=xN(t.tagName);return je[e.namespaceURI]?e.namespaceURI===De?t.namespaceURI===Oe?n===`svg`:t.namespaceURI===Ee?n===`svg`&&(r===`annotation-xml`||Ne[r]):!!H[n]:e.namespaceURI===Ee?t.namespaceURI===Oe?n===`math`:t.namespaceURI===De?n===`math`&&Pe[r]:!!Ue[n]:e.namespaceURI===Oe?t.namespaceURI===De&&!Pe[r]||t.namespaceURI===Ee&&!Ne[r]?!1:!Ue[n]&&(Fe[n]||!H[n]):!!(Ie===`application/xhtml+xml`&&je[e.namespaceURI]):!1},Ge=function(e){yN(t.removed,{element:e});try{y(e).removeChild(e)}catch{g(e)}},U=function(e,n){try{yN(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{yN(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(me||he)try{Ge(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Ke=function(e){let t=null,r=null;if(pe)e=`<remove></remove>`+e;else{let t=CN(e,/^[\r\n\t ]+/);r=t&&t[0]}Ie===`application/xhtml+xml`&&ke===Oe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=b?b.createHTML(e):e;if(ke===Oe)try{t=new f().parseFromString(i,Ie)}catch{}if(!t||!t.documentElement){t=S.createDocument(ke,`template`,null);try{t.documentElement.innerHTML=Ae?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ke===Oe?T.call(t,z?`html`:`body`)[0]:z?t.documentElement:a},qe=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)},Je=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`)},Ye=function(e){return typeof s==`function`&&e instanceof s};function Xe(e,n,r){gN(e,e=>{e.call(t,n,r,ze)})}let Ze=function(e){let n=null;if(Xe(D.beforeSanitizeElements,e,null),Je(e))return Ge(e),!0;let r=Re(e.nodeName);if(Xe(D.uponSanitizeElement,e,{tagName:r,allowedTags:I}),de&&e.hasChildNodes()&&!Ye(e.firstElementChild)&&ON(/<[/\w!]/g,e.innerHTML)&&ON(/<[/\w!]/g,e.textContent)||e.nodeType===iP.progressingInstruction||de&&e.nodeType===iP.comment&&ON(/<[/\w]/g,e.data))return Ge(e),!0;if(!(ae.tagCheck instanceof Function&&ae.tagCheck(r))&&(!I[r]||L[r])){if(!L[r]&&$e(r)&&(ie.tagNameCheck instanceof RegExp&&ON(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r)))return!1;if(V&&!be[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 Ge(e),!0}return e instanceof c&&!We(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&ON(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ge(e),!0):(ue&&e.nodeType===iP.text&&(n=e.textContent,gN([O,k,A],e=>{n=wN(n,e,` `)}),e.textContent!==n&&(yN(t.removed,{element:e.cloneNode()}),e.textContent=n)),Xe(D.afterSanitizeElements,e,null),!1)},Qe=function(e,t,r){if(R[t]||ge&&(t===`id`||t===`name`)&&(r in n||r in Be))return!1;if(!(se&&!R[t]&&ON(j,t))&&!(oe&&ON(M,t))&&!(ae.attributeCheck instanceof Function&&ae.attributeCheck(t,e))){if(!ne[t]||R[t]){if(!($e(e)&&(ie.tagNameCheck instanceof RegExp&&ON(ie.tagNameCheck,e)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(e))&&(ie.attributeNameCheck instanceof RegExp&&ON(ie.attributeNameCheck,t)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(t,e))||t===`is`&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&ON(ie.tagNameCheck,r)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(r))))return!1}else if(!we[t]&&!ON(F,wN(r,P,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&TN(r,`data:`)===0&&Se[e])&&!(ce&&!ON(N,wN(r,P,``)))&&r)return!1}return!0},$e=function(e){return e!==`annotation-xml`&&CN(e,ee)},et=function(e){Xe(D.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||Je(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=Re(a),l=s,u=a===`value`?l:EN(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,Xe(D.uponSanitizeAttribute,e,r),u=r.attrValue,_e&&(c===`id`||c===`name`)&&(U(a,e),u=`user-content-`+u),de&&ON(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){U(a,e);continue}if(c===`attributename`&&CN(u,`href`)){U(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){U(a,e);continue}if(!le&&ON(/\/>/i,u)){U(a,e);continue}ue&&gN([O,k,A],e=>{u=wN(u,e,` `)});let d=Re(e.nodeName);if(!Qe(d,c,u)){U(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),Je(e)?Ge(e):vN(t.removed)}catch{U(a,e)}}Xe(D.afterSanitizeAttributes,e,null)},tt=function e(t){let n=null,r=qe(t);for(Xe(D.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)Xe(D.uponSanitizeShadowNode,n,null),Ze(n),et(n),n.content instanceof a&&e(n.content);Xe(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(Ae=!e,Ae&&(e=`<!-->`),typeof e!=`string`&&!Ye(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw kN(`dirty is not a string, aborting`)}else throw kN(`toString is not a function`);if(!t.isSupported)return e;if(fe||He(n),t.removed=[],typeof e==`string`&&(ve=!1),ve){if(e.nodeName){let t=Re(e.nodeName);if(!I[t]||L[t])throw kN(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=Ke(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===iP.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!me&&!ue&&!z&&e.indexOf(`<`)===-1)return b&&B?b.createHTML(e):e;if(i=Ke(e),!i)return me?null:B?x:``}i&&pe&&Ge(i.firstChild);let u=qe(ve?e:i);for(;c=u.nextNode();)Ze(c),et(c),c.content instanceof a&&tt(c.content);if(ve)return e;if(me){if(he)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=z?i.outerHTML:i.innerHTML;return z&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ON(tP,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
320
|
+
`+d),ue&&gN([O,k,A],e=>{d=wN(d,e,` `)}),b&&B?b.createHTML(d):d},t.setConfig=function(){He(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),fe=!0},t.clearConfig=function(){ze=null,fe=!1},t.isValidAttribute=function(e,t,n){return ze||He({}),Qe(Re(e),Re(t),n)},t.addHook=function(e,t){typeof t==`function`&&yN(D[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=_N(D[e],t);return n===-1?void 0:bN(D[e],n,1)[0]}return vN(D[e])},t.removeHooks=function(e){D[e]=[]},t.removeAllHooks=function(){D=sP()},t}var lP=cP(),uP=[`script`,`style`,`iframe`,`object`,`embed`,`link`,`meta`,`base`,`form`,`input`,`button`,`textarea`,`select`],dP=[`style`,`srcdoc`];function fP(e){return e?lP.sanitize(e,{USE_PROFILES:{html:!0},FORBID_TAGS:uP,FORBID_ATTR:dP,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1}):``}function pP({html:e,fallback:t=null,...n}){let r=(0,U.useMemo)(()=>fP(e??``),[e]);return r?(0,W.jsx)(q,{...n,dangerouslySetInnerHTML:{__html:r}}):(0,W.jsx)(W.Fragment,{children:t})}function mP(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hP=mP();function gP(e){hP=e}var _P={exec:()=>null};function vP(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(bP.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var yP=(()=>{try{return!0}catch{return!1}})(),bP={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)}}>`)},xP=/^(?:[ \t]*(?:\n|$))+/,SP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,CP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,wP=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,TP=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,EP=/ {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+|$)/,OP=vP(DP).replace(/bull/g,EP).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(),kP=vP(DP).replace(/bull/g,EP).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(),AP=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jP=/^[^\n]+/,MP=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,NP=vP(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,MP).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),PP=vP(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,EP).getRegex(),FP=`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`,IP=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,LP=vP(`^ {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`,IP).replace(`tag`,FP).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),RP=vP(AP).replace(`hr`,wP).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`,FP).getRegex(),zP={blockquote:vP(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,RP).getRegex(),code:SP,def:NP,fences:CP,heading:TP,hr:wP,html:LP,lheading:OP,list:PP,newline:xP,paragraph:RP,table:_P,text:jP},BP=vP(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,wP).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`,FP).getRegex(),VP={...zP,lheading:kP,table:BP,paragraph:vP(AP).replace(`hr`,wP).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,BP).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`,FP).getRegex()},HP={...zP,html:vP(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,IP).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:_P,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vP(AP).replace(`hr`,wP).replace(`heading`,` *#{1,6} *[^
|
|
321
|
+
]`).replace(`lheading`,OP).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},UP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,WP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,GP=/^( {2,}|\\)\n(?!\s*$)/,KP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qP=/[\p{P}\p{S}]/u,JP=/[\s\p{P}\p{S}]/u,YP=/[^\s\p{P}\p{S}]/u,XP=vP(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,JP).getRegex(),ZP=/(?!~)[\p{P}\p{S}]/u,QP=/(?!~)[\s\p{P}\p{S}]/u,$P=/(?:[^\s\p{P}\p{S}]|~)/u,eF=/(?![*_])[\p{P}\p{S}]/u,tF=/(?![*_])[\s\p{P}\p{S}]/u,nF=/(?:[^\s\p{P}\p{S}]|[*_])/u,rF=vP(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,yP?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),iF=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,aF=vP(iF,`u`).replace(/punct/g,qP).getRegex(),oF=vP(iF,`u`).replace(/punct/g,ZP).getRegex(),sF=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,cF=vP(sF,`gu`).replace(/notPunctSpace/g,YP).replace(/punctSpace/g,JP).replace(/punct/g,qP).getRegex(),lF=vP(sF,`gu`).replace(/notPunctSpace/g,$P).replace(/punctSpace/g,QP).replace(/punct/g,ZP).getRegex(),uF=vP(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,YP).replace(/punctSpace/g,JP).replace(/punct/g,qP).getRegex(),dF=vP(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,eF).getRegex(),fF=vP(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,nF).replace(/punctSpace/g,tF).replace(/punct/g,eF).getRegex(),pF=vP(/\\(punct)/,`gu`).replace(/punct/g,qP).getRegex(),mF=vP(/^<(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(),hF=vP(IP).replace(`(?:-->|$)`,`-->`).getRegex(),gF=vP(`^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`,hF).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_F=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,vF=vP(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,_F).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yF=vP(/^!?\[(label)\]\[(ref)\]/).replace(`label`,_F).replace(`ref`,MP).getRegex(),bF=vP(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,MP).getRegex(),xF=vP(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,yF).replace(`nolink`,bF).getRegex(),SF=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,CF={_backpedal:_P,anyPunctuation:pF,autolink:mF,blockSkip:rF,br:GP,code:WP,del:_P,delLDelim:_P,delRDelim:_P,emStrongLDelim:aF,emStrongRDelimAst:cF,emStrongRDelimUnd:uF,escape:UP,link:vF,nolink:bF,punctuation:XP,reflink:yF,reflinkSearch:xF,tag:gF,text:KP,url:_P},wF={...CF,link:vP(/^!?\[(label)\]\((.*?)\)/).replace(`label`,_F).getRegex(),reflink:vP(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,_F).getRegex()},TF={...CF,emStrongRDelimAst:lF,emStrongLDelim:oF,delLDelim:dF,delRDelim:fF,url:vP(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,SF).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:vP(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,SF).getRegex()},EF={...TF,br:vP(GP).replace(`{2,}`,`*`).getRegex(),text:vP(TF.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},DF={normal:zP,gfm:VP,pedantic:HP},OF={normal:CF,gfm:TF,breaks:EF,pedantic:wF},kF={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},AF=e=>kF[e];function jF(e,t){if(t){if(bP.escapeTest.test(e))return e.replace(bP.escapeReplace,AF)}else if(bP.escapeTestNoEncode.test(e))return e.replace(bP.escapeReplaceNoEncode,AF);return e}function MF(e){try{e=encodeURI(e).replace(bP.percentDecode,`%`)}catch{return null}return e}function NF(e,t){let n=e.replace(bP.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(bP.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(bP.slashPipe,`|`);return n}function PF(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 FF(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 IF(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 LF(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 RF(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(`
|
|
323
|
-
`)}var
|
|
324
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=
|
|
325
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=
|
|
323
|
+
`)}var zF=class{options;rules;lexer;constructor(e){this.options=e||hP}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:PF(e,`
|
|
324
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=RF(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=PF(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:PF(t[0],`
|
|
325
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=PF(t[0],`
|
|
326
326
|
`).split(`
|
|
327
327
|
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
328
328
|
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
@@ -333,17 +333,17 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
333
333
|
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
334
334
|
`+e.join(`
|
|
335
335
|
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
336
|
-
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=
|
|
336
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=IF(t[2].split(`
|
|
337
337
|
`,1)[0],t[1].length),l=e.split(`
|
|
338
338
|
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
339
339
|
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
|
340
340
|
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
341
341
|
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
342
342
|
`+l}u=!l.trim(),r+=p+`
|
|
343
|
-
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=
|
|
344
|
-
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(
|
|
345
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=
|
|
346
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(
|
|
343
|
+
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=NF(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
344
|
+
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(NF(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
345
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=PF(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=FF(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),LF(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return LF(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},BF=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||hP,this.options.tokenizer=this.options.tokenizer||new zF,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:bP,block:DF.normal,inline:OF.normal};this.options.pedantic?(t.block=DF.pedantic,t.inline=OF.pedantic):this.options.gfm&&(t.block=DF.gfm,this.options.breaks?t.inline=OF.breaks:t.inline=OF.gfm),this.tokenizer.rules=t}static get rules(){return{block:DF,inline:OF}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(bP.carriageReturn,`
|
|
346
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(bP.tabCharGlobal,` `).replace(bP.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
347
347
|
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
348
348
|
`)?``:`
|
|
349
349
|
`)+r.raw,n.text+=`
|
|
@@ -356,9 +356,9 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
356
356
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
357
357
|
`)?``:`
|
|
358
358
|
`)+r.raw,n.text+=`
|
|
359
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},
|
|
360
|
-
`;return r?`<pre><code class="language-`+
|
|
361
|
-
`:`<pre><code>`+(n?i:
|
|
359
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},VF=class{options;parser;constructor(e){this.options=e||hP}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(bP.notSpaceStart)?.[0],i=e.replace(bP.endingNewline,``)+`
|
|
360
|
+
`;return r?`<pre><code class="language-`+jF(r)+`">`+(n?i:jF(i,!0))+`</code></pre>
|
|
361
|
+
`:`<pre><code>`+(n?i:jF(i,!0))+`</code></pre>
|
|
362
362
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
363
363
|
${this.parser.parse(e)}</blockquote>
|
|
364
364
|
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
@@ -374,16 +374,16 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
374
374
|
`}tablerow({text:e}){return`<tr>
|
|
375
375
|
${e}</tr>
|
|
376
376
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
377
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${
|
|
378
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+AF(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function GF(e,t){return WF.parse(e,t)}GF.options=GF.setOptions=function(e){return WF.setOptions(e),GF.defaults=WF.defaults,hP(GF.defaults),GF},GF.getDefaults=pP,GF.defaults=mP,GF.use=function(...e){return WF.use(...e),GF.defaults=WF.defaults,hP(GF.defaults),GF},GF.walkTokens=function(e,t){return WF.walkTokens(e,t)},GF.parseInline=WF.parseInline,GF.Parser=HF,GF.parser=HF.parse,GF.Renderer=BF,GF.TextRenderer=VF,GF.Lexer=zF,GF.lexer=zF.lex,GF.Tokenizer=RF,GF.Hooks=UF,GF.parse=GF,GF.options,GF.setOptions,GF.use,GF.walkTokens,GF.parseInline,HF.parse,zF.lex;function KF(e){let t=e.trim().toLowerCase();switch(t){case`usage-chart`:return`usage-chart`;case`chart`:return`chart`;case`offer-card`:case`addon-card`:return t;case`overview-card`:case`account-overview`:return t;case`card`:return`overview-card`;case`table`:return`table`;case`highlightbox`:case`highlight-box`:return`highlight-box`;case`info-box`:return`info-box`;case`actions`:return`actions`;default:return null}}function qF(e){let t=KF(e.type);if(!t)return null;switch(t){case`chart`:case`usage-chart`:return{type:t,config:e};case`offer-card`:case`addon-card`:return{type:t,config:e};case`overview-card`:case`account-overview`:return{type:t,config:e};case`table`:return{type:t,config:e};case`highlight-box`:case`info-box`:return{type:t,config:e};case`actions`:return{type:t,config:e};default:return null}}var JF={root:`_root_1o6c0_1`,header:`_header_1o6c0_17`};function YF({children:e,className:t,...n}){return(0,W.jsx)(q,{className:wn(JF.header,t),...n,children:e})}function XF({children:e,withBorder:t=!0,withShadow:n=!0,className:r,mod:i,variant:a=`default`,...o}){let s=i;return(0,W.jsx)(q,{className:wn(JF.root,r),p:24,mod:{...s,bordered:t,shadow:n,variant:a},...o,children:e})}XF.Header=YF;function ZF({...e}){return(0,W.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`M3.77762 11.9424C2.8296 10.2893 2.37185 8.93948 2.09584 7.57121C1.68762 5.54758 2.62181 3.57081 4.16938 2.30947C4.82345 1.77638 5.57323 1.95852 5.96 2.6524L6.83318 4.21891C7.52529 5.46057 7.87134 6.08139 7.8027 6.73959C7.73407 7.39779 7.26737 7.93386 6.33397 9.00601L3.77762 11.9424ZM3.77762 11.9424C5.69651 15.2883 8.70784 18.3013 12.0576 20.2224M12.0576 20.2224C13.7107 21.1704 15.0605 21.6282 16.4288 21.9042C18.4524 22.3124 20.4292 21.3782 21.6905 19.8306C22.2236 19.1766 22.0415 18.4268 21.3476 18.04L19.7811 17.1668C18.5394 16.4747 17.9186 16.1287 17.2604 16.1973C16.6022 16.2659 16.0661 16.7326 14.994 17.666L12.0576 20.2224Z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M14 6.83185C15.4232 7.43624 16.5638 8.57677 17.1682 10M14.654 2C18.1912 3.02076 20.9791 5.80852 22 9.34563`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function QF({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M12 22C14.2091 22 16 17.5228 16 12C16 6.47715 14.2091 2 12 2C9.79086 2 8 6.47715 8 12C8 17.5228 9.79086 22 12 22Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2 12H22`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function $F({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M8 13.5H16M8 8.5H12`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M6.09881 19C4.7987 18.8721 3.82475 18.4816 3.17157 17.8284C2 16.6569 2 14.7712 2 11V10.5C2 6.72876 2 4.84315 3.17157 3.67157C4.34315 2.5 6.22876 2.5 10 2.5H14C17.7712 2.5 19.6569 2.5 20.8284 3.67157C22 4.84315 22 6.72876 22 10.5V11C22 14.7712 22 16.6569 20.8284 17.8284C19.6569 19 17.7712 19 14 19C13.4395 19.0125 12.9931 19.0551 12.5546 19.155C11.3562 19.4309 10.2465 20.0441 9.14987 20.5789C7.58729 21.3408 6.806 21.7218 6.31569 21.3651C5.37769 20.6665 6.29454 18.5019 6.5 17.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}var eI={data:QF,voice:ZF,sms:$F},tI=e=>eI[e.toLowerCase()]||eI.data;function nI(){return{getPercent:e=>{if(e.percentUsed!=null&&Number.isFinite(e.percentUsed))return Math.max(0,Math.min(100,Math.round(e.percentUsed)));if(!Number.isFinite(e.total)||e.total<=0)return 0;let t=e.used/e.total*100;return Number.isFinite(t)?Math.max(0,Math.min(100,Math.round(t))):0},getColor:e=>{switch(e.toLowerCase()){case`data`:return`blue`;case`voice`:return`violet`;case`sms`:return`green`;default:return`blue`}},getShortLabel:e=>{let t=(e.key??``).toLowerCase();return t===`data`?`Data`:t===`voice`?`Voice`:t===`sms`?`SMS`:e.label?.trim()?e.label.trim():e.key?e.key.charAt(0).toUpperCase()+e.key.slice(1):`Usage`},getIcon:tI}}function rI({items:e=[],title:t}){let{getPercent:n,getColor:r,getShortLabel:i,getIcon:a}=nI();return(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,children:(0,W.jsxs)(Vy,{gap:`md`,children:[t&&(0,W.jsx)(Xf,{size:`lg`,fw:600,children:t}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`md`,children:e.map(e=>{let t=n(e),o=r(e.key),s=i(e);return(0,W.jsxs)(Eu,{gap:`md`,wrap:`nowrap`,children:[(0,W.jsx)(yy,{size:80,thickness:10,sections:[{value:t,color:o}],label:(0,W.jsxs)(Xf,{size:`sm`,ta:`center`,fw:600,children:[t,`%`]})}),(0,W.jsxs)(Vy,{gap:4,style:{flex:1},children:[(0,W.jsxs)(Eu,{gap:`xs`,children:[(0,W.jsx)(Hb,{color:o,variant:`light`,size:`sm`,children:U.createElement(a(e.key))}),(0,W.jsx)(Xf,{size:`sm`,fw:500,children:s})]}),(0,W.jsxs)(Eu,{gap:4,children:[(0,W.jsx)(Xf,{size:`sm`,children:e.used}),(0,W.jsxs)(Xf,{size:`sm`,c:`dimmed`,children:[`/ `,e.total,` `,e.unit]})]})]})]},e.key)})})]})})}var iI={offerCardButton:`_offerCardButton_1og3p_1`,"offerCardButton--clickable":`_offerCardButton--clickable_1og3p_6`};function aI({item:e,index:t,showPricing:n,onSelect:r}){let i=!!e.offerId;return(0,W.jsx)(dl,{className:`${iI.offerCardButton} ${i?iI.offerCardButtonClickable:``}`,onClick:()=>r(e.offerId),disabled:!i,children:(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,p:16,h:`100%`,children:(0,W.jsxs)(Vy,{gap:`sm`,h:`100%`,children:[(0,W.jsx)(Xf,{size:`md`,fw:600,lineClamp:2,children:e.name||`Addon`}),e.description&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,lineClamp:2,children:e.description}),e.dataAmount&&(0,W.jsx)(Xf,{size:`sm`,fw:500,children:e.dataAmount}),n&&e.price&&(0,W.jsx)(Xf,{size:`lg`,fw:600,c:`blue`,children:e.price}),e.chargeType&&(0,W.jsx)(Xf,{size:`xs`,c:`dimmed`,children:e.chargeType})]})})},e.offerId||t)}function oI({items:e=[],title:t=`Available Addons`,showPricing:n=!0,onSelectOffer:r}){let i=e=>{e&&r?.(e)};return(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,children:t}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`md`,children:e.map((e,t)=>(0,W.jsx)(aI,{item:e,index:t,showPricing:n,onSelect:i},e.offerId||t))})]})})}function sI(e){return e===`xs`||e===`sm`||e===`md`||e===`lg`||e===`xl`}function cI(e){return e===`icon-xs`||e===`icon-sm`||e===`icon-md`||e===`icon-lg`||e===`icon-xl`}function lI(e){if(e==null)return{};if(typeof e==`number`)return{width:e,height:e};if(sI(e)){let t=Lj[`icon-${e}`];return{width:t,height:t}}if(cI(e)){let t=Lj[e];return{width:t,height:t}}return{width:e,height:e}}function uI({advantage:e}){let{getIcon:t}=nI();return(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,p:16,children:(0,W.jsxs)(Eu,{gap:`sm`,wrap:`nowrap`,children:[(0,W.jsx)(Hb,{variant:`light`,size:`sm`,children:(0,U.createElement)(t(e.key),lI(`sm`))}),(0,W.jsxs)(Vy,{gap:4,style:{flex:1,minWidth:0},children:[(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,truncate:!0,children:e.type}),(0,W.jsxs)(Eu,{gap:4,wrap:`nowrap`,children:[(0,W.jsx)(Xf,{size:`md`,fw:600,truncate:!0,children:e.amount}),e.unit&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,truncate:!0,children:e.unit})]})]})]})})}function dI({price:e,priceSuffix:t,withCta:n,ctaLabel:r,onCtaClick:i}){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Jm,{}),(0,W.jsxs)(Eu,{justify:n?`space-between`:`flex-start`,align:`center`,children:[(0,W.jsxs)(Eu,{gap:`xs`,children:[(0,W.jsx)(Xf,{size:`xl`,fw:600,c:`primary`,children:e}),t&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,children:t})]}),n&&i&&(0,W.jsx)(Xf,{size:`md`,fw:600,c:`primary`,style:{cursor:`pointer`},onClick:i,children:r})]})]})}function fI({item:e,onSelectAccount:t}){let n=!!e.billingAccountId;return(0,W.jsx)(dl,{style:{cursor:n?`pointer`:`default`,transition:`all 0.15s ease`,height:`100%`},onClick:()=>t(e.billingAccountId),onMouseEnter:e=>{n&&(e.currentTarget.style.transform=`translateY(-2px)`)},onMouseLeave:e=>{n&&(e.currentTarget.style.transform=``)},children:(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,p:24,style:{height:`100%`},children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,c:`primary`,children:e.title||`Account Details`}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`sm`,children:e.advantages?.map(e=>(0,W.jsx)(uI,{advantage:e},e.key))}),e.price&&(0,W.jsx)(dI,{price:e.price,priceSuffix:e.priceSuffix})]})})})}function pI({items:e,title:t=`Details`,advantages:n=[],price:r,priceSuffix:i,ctaLabel:a=`Order Now`,onCtaClick:o,onSelectAccount:s}){let c=e=>{e&&s?.(e)};return e&&e.length>0?(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,children:t}),(0,W.jsx)(Py,{cols:{base:1,md:2},spacing:`md`,children:e.map((e,t)=>(0,W.jsx)(fI,{item:e,onSelectAccount:c},e.billingAccountId||t))})]})}):(0,W.jsx)(XF,{withBorder:!0,withShadow:!0,p:24,children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,c:`primary`,children:t}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`sm`,children:n.map(e=>(0,W.jsx)(uI,{advantage:e},e.key))}),r&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Jm,{}),(0,W.jsxs)(Eu,{justify:`space-between`,align:`center`,children:[(0,W.jsxs)(Eu,{gap:`xs`,children:[(0,W.jsx)(Xf,{size:`xl`,fw:600,c:`primary`,children:r}),i&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,children:i})]}),o&&(0,W.jsx)(jm,{onClick:o,size:`md`,children:a})]})]})]})})}var mI=(0,U.createContext)(void 0);function hI(){let e=(0,U.useContext)(mI);if(!e)throw Error(`VTableContext must be used within a VTable component`);return e}function gI({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M6 15L12 9L18 15`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function _I(e,t,n){return{handleClick:n=>{let r=window.getSelection(),i=r&&r.toString().trim().length>0;n.button===0&&t&&!i&&t(e)},handleMouseDown:t=>{if(t.button===1&&n){t.preventDefault();let r=n(e);r&&window.open(``+r,`_blank`)}}}}var vI={row:`_row_ze3zx_1`,arrow:`_arrow_ze3zx_26`,header:`_header_ze3zx_36`};function yI({column:e,row:t}){let n=(e,t)=>{if(t.render)return t.render(e,0);if(Array.isArray(t.accessor))return t.accessor.map(t=>e[t]).join(` `);if(t.accessor){let n=e[t.accessor];return n?String(n):`-`}return`-`},r=!!e.header,i=n(t,e),a=typeof i==`string`;return(0,W.jsxs)(W.Fragment,{children:[r&&(0,W.jsxs)(Xf,{className:vI.header,children:[e.header,`:`]}),(0,W.jsx)(Xf,{component:`span`,lineClamp:1,fw:500,truncate:!0,title:a?i:void 0,children:i})]})}function bI({row:e,columns:t}){let{onRowClick:n}=hI();return(0,W.jsxs)(q,{className:vI.row,mod:{clickable:!!n},children:[t.map((t,n)=>(0,W.jsx)(Vy,{justify:t.header?`flex-start`:`center`,flex:1,children:(0,W.jsx)(yI,{column:t,row:e})},n)),n&&(0,W.jsx)(q,{className:vI.arrow,children:(0,W.jsx)(gu,{variant:`transparent`,children:(0,W.jsx)(tA,{})})})]})}var xI={row:`_row_1jau4_1`,box:`_box_1jau4_10`,checkboxWrapper:`_checkboxWrapper_1jau4_38`,collapseWrapper:`_collapseWrapper_1jau4_52`,collapse:`_collapse_1jau4_52`,collapseContent:`_collapseContent_1jau4_75`};function SI(){let{idKey:e,paginatedData:t=[],columns:n=[],withSelection:r,selection:i=[],loading:a,toggleRow:o,withCollapsible:s,isRowCollapsible:c,withMultipleCollapse:l=!0,renderCollapsed:u,onRowClick:d,getRowUrl:f}=hI(),[p,m]=U.useState({}),[h,g]=U.useState({}),_=e=>{g(t=>({...t,[e]:!0})),m(t=>l?{...t,[e]:!t[e]}:{[e]:!t[e]})};return a&&t.length===0?(0,W.jsx)(Vy,{gap:16,children:Array.from({length:3}).map((e,t)=>(0,W.jsx)(Ly,{height:64,radius:`md`},`loading-${t}`))}):(0,W.jsx)(Vy,{className:xI.row,children:t.map((t,a)=>{let l=i.some(n=>n[e]===t[e]),m=t[e],g=typeof m==`string`||typeof m==`number`?m:a,v=p[g]||!1,y=v||h[g],b=s&&(c?c(t,a):!0),{handleClick:x,handleMouseDown:S}=_I(t,d,f);return(0,W.jsxs)(q,{className:xI.box,mod:{"with-selection":r,"with-collapse":b,"is-expanded":v,selected:l},onClick:x,onMouseDown:S,children:[b&&(0,W.jsx)(dl,{className:xI.collapseWrapper,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),_(g)},children:v?(0,W.jsx)(gI,{width:20,height:20}):(0,W.jsx)(DO,{width:20,height:20})}),r&&(0,W.jsx)(Eu,{className:xI.checkboxWrapper,onClick:e=>{e.stopPropagation(),o(t,a,e)},align:`center`,children:(0,W.jsx)(tm,{checked:l,readOnly:!0})}),(0,W.jsx)(bI,{row:t,columns:n}),b&&u&&(0,W.jsx)(Ji,{expanded:v,className:xI.collapse,children:y?(0,W.jsx)(q,{className:xI.collapseContent,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation()},children:u(t,a,{view:`card`})}):null})]},a)})})}var CI={DEFAULT_ALL_DATA_PAGE_SIZE:200,DEFAULT_INITIAL_PAGE:1,DEFAULT_PAGE_SIZE:10},wI=[5,10,20,50,100,200];function TI(e,t){return Array.isArray(e)?e.includes(t):e===t}function EI(e){if(!e.length)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function DI(e,t=new Set){if(Array.isArray(e))for(let n of e)if(nm(n))DI(n.items,t);else{if(n.value===void 0)throw Error(`Each option must have value property`);if(typeof n.value!=`string`)throw Error(`Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(t.has(n.value))throw Error(`Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}var OI=0,kI=1,AI=2,jI=4;function MI(e){return()=>e}function NI(e){e()}function PI(e,t){return n=>e(t(n))}function FI(e,t){return()=>e(t)}function II(e,t){return n=>e(t,n)}function LI(e){return e!==void 0}function RI(...e){return()=>{e.map(NI)}}function zI(){}function BI(e,t){return t(e),e}function VI(e,t){return t(e)}function HI(...e){return e}function UI(e,t){return e(kI,t)}function WI(e,t){e(OI,t)}function GI(e){e(AI)}function KI(e){return e(jI)}function qI(e,t){return UI(e,II(t,OI))}function JI(e,t){let n=e(kI,e=>{n(),t(e)});return n}function YI(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function XI(e,t){return e===t}function ZI(e=XI){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function QI(e){return t=>n=>{e(n)&&t(n)}}function $I(e){return t=>PI(t,e)}function eL(e){return t=>()=>{t(e)}}function $(e,...t){let n=aL(...t);return((t,r)=>{switch(t){case AI:GI(e);return;case kI:return UI(e,n(r))}})}function tL(e,t){return n=>r=>{n(t=e(t,r))}}function nL(e){return t=>n=>{e>0?e--:t(n)}}function rL(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function iL(...e){let t=Array(e.length),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;UI(e,e=>{let s=n;n|=o,t[a]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{let o=()=>{e([a].concat(t))};n===i?o():r=o}}function aL(...e){return t=>e.reduceRight(VI,t)}function oL(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case kI:return a?n===a?void 0:(r(),n=a,t=UI(e,a),t):(r(),zI);case AI:r(),n=null;return}}}function sL(e){let t=e,n=lL();return((e,r)=>{switch(e){case OI:t=r;break;case kI:r(t);break;case jI:return t}return n(e,r)})}function cL(e,t){return BI(sL(t),t=>qI(e,t))}function lL(){let e=[];return((t,n)=>{switch(t){case OI:e.slice().forEach(e=>{e(n)});return;case AI:e.splice(0,e.length);return;case kI:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function uL(e){return BI(lL(),t=>qI(e,t))}function dL(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:fL(),singleton:n}}var fL=()=>Symbol();function pL(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);let o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}function mL(...e){let t=lL(),n=Array(e.length),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;UI(e,e=>{n[a]=e,r|=o,r===i&&WI(t,n)})}),function(e,a){switch(e){case AI:GI(t);return;case kI:return r===i&&a(n),UI(t,a)}}}function hL(e,t=XI){return $(e,ZI(t))}function gL(...e){return function(t,n){switch(t){case AI:return;case kI:return RI(...e.map(e=>UI(e,n)))}}}var _L={DEBUG:0,INFO:1,WARN:2,ERROR:3},vL={[_L.DEBUG]:`debug`,[_L.ERROR]:`error`,[_L.INFO]:`log`,[_L.WARN]:`warn`},yL=()=>typeof globalThis>`u`?window:globalThis,bL=dL(()=>{let e=sL(_L.ERROR);return{log:sL((t,n,r=_L.INFO)=>{r>=(yL().VIRTUOSO_LOG_LEVEL??KI(e))&&console[vL[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0});function xL(e,t,n){return SL(e,t,n).callbackRef}function SL(e,t,n){let r=U.useRef(null),i=e=>{},a=U.useMemo(()=>typeof ResizeObserver<`u`?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;n.offsetParent!==null&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return i=e=>{e&&t?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:i,ref:r}}function CL(e,t,n,r,i,a,o,s,c){return SL(U.useCallback(n=>{let c=wL(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;l.dataset.virtuosoScroller===void 0;)l=l.parentElement;let u=l.lastElementChild.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollLeft:o.scrollTop:u?s?d.scrollX||d.document.documentElement.scrollLeft:d.scrollY||d.document.documentElement.scrollTop:s?l.scrollLeft:l.scrollTop,p=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,m=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(f,0),viewportHeight:m}),a?.(s?TL(`column-gap`,getComputedStyle(n).columnGap,i):TL(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function wL(e,t,n,r){let i=e.length;if(i===0)return null;let a=[];for(let o=0;o<i;o++){let i=e.item(o);if(i.dataset.index===void 0)continue;let s=parseInt(i.dataset.index),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},_L.ERROR),l===c)continue;let u=a[a.length-1];a.length===0||u.size!==l||u.endIndex!==s-1?a.push({endIndex:s,size:l,startIndex:s}):a[a.length-1].endIndex++}return a}function TL(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,_L.WARN),t===`normal`?0:parseInt(t??`0`,10)}function EL(e,t,n){let r=U.useRef(null),i=U.useCallback(n=>{if(!n?.offsetParent)return;let i=n.getBoundingClientRect(),a=i.width,s,c;if(t){let e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),s=n+t.scrollTop}else{let e=o.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),s=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=SL(i,!0,n),s=U.useCallback(()=>{i(o.current)},[i,o]);return U.useEffect(()=>{if(t){t.addEventListener(`scroll`,s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener(`scroll`,s),e.unobserve(t)}}let e=o.current?.ownerDocument.defaultView;return e?.addEventListener(`scroll`,s),e?.addEventListener(`resize`,s),()=>{e?.removeEventListener(`scroll`,s),e?.removeEventListener(`resize`,s)}},[s,t,o]),a}var DL=dL(()=>{let e=lL(),t=lL(),n=sL(0),r=lL(),i=sL(0),a=lL(),o=lL(),s=sL(0),c=sL(0),l=sL(0),u=sL(0),d=lL(),f=lL(),p=sL(!1),m=sL(!1),h=sL(!1);return qI($(e,$I(({scrollTop:e})=>e)),t),qI($(e,$I(({scrollHeight:e})=>e)),o),qI(t,i),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),OL={lvl:0};function kL(e,t){let n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]),a=[];for(let o=1;o<n;o++){let{index:n,value:s}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=s}return a.push({end:1/0,start:r,value:i}),a}function AL(e){return e===OL}function jL(e,t){if(!AL(e))return t===e.k?e.v:t<e.k?jL(e.l,t):jL(e.r,t)}function ML(e,t,n=`k`){if(AL(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=ML(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return ML(e.l,t,n)}function NL(e,t,n){return AL(e)?WL(t,n,1):t===e.k?BL(e,{k:t,v:n}):t<e.k?GL(BL(e,{l:NL(e.l,t,n)})):GL(BL(e,{r:NL(e.r,t,n)}))}function PL(){return OL}function FL(e,t,n){if(AL(e))return[];let r=ML(e,t)[0];return JL(RL(e,r,n))}function IL(e,t){if(AL(e))return OL;let{k:n,l:r,r:i}=e;if(t===n){if(AL(r))return i;if(AL(i))return r;let[t,n]=UL(r);return zL(BL(e,{k:t,l:VL(r),v:n}))}return zL(t<n?BL(e,{l:IL(r,t)}):BL(e,{r:IL(i,t)}))}function LL(e){return AL(e)?[]:[...LL(e.l),{k:e.k,v:e.v},...LL(e.r)]}function RL(e,t,n){if(AL(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(RL(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(RL(a,t,n))),s}function zL(e){let{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(HL(t))return KL(BL(e,{lvl:n-1}));if(!AL(t)&&!AL(t.r))return BL(t.r,{l:BL(t,{r:t.r.l}),lvl:n,r:BL(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(HL(e))return qL(BL(e,{lvl:n-1}));if(!AL(r)&&!AL(r.l)){let t=r.l,i=HL(t)?r.lvl-1:r.lvl;return BL(t,{l:BL(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:qL(BL(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function BL(e,t){return WL(t.k===void 0?e.k:t.k,t.v===void 0?e.v:t.v,t.lvl===void 0?e.lvl:t.lvl,t.l===void 0?e.l:t.l,t.r===void 0?e.r:t.r)}function VL(e){return AL(e.r)?e.l:zL(BL(e,{r:VL(e.r)}))}function HL(e){return AL(e)||e.lvl>e.r.lvl}function UL(e){return AL(e.r)?[e.k,e.v]:UL(e.r)}function WL(e,t,n,r=OL,i=OL){return{k:e,l:r,lvl:n,r:i,v:t}}function GL(e){return qL(KL(e))}function KL(e){let{l:t}=e;return!AL(t)&&t.lvl===e.lvl?BL(t,{r:BL(e,{l:t.r})}):e}function qL(e){let{lvl:t,r:n}=e;return!AL(n)&&!AL(n.r)&&n.lvl===t&&n.r.lvl===t?BL(n,{l:BL(e,{r:n.l}),lvl:t+1}):e}function JL(e){return kL(e,({k:e,v:t})=>({index:e,value:t}))}function YL(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function XL(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var ZL=dL(()=>({recalcInProgress:sL(!1)}),[],{singleton:!0});function QL(e,t,n){return e[$L(e,t,n)]}function $L(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw Error(`Failed binary finding record in array - ${e.join(`,`)}, searched for ${t}`)}function eR(e,t,n,r){let i=$L(e,t,r),a=$L(e,n,r,i);return e.slice(i,a+1)}function tR(e,t){return Math.round(e.getBoundingClientRect()[t])}function nR(e){return!AL(e.groupOffsetTree)}function rR({index:e},t){return t===e?0:t<e?-1:1}function iR(){return{groupIndices:[],groupOffsetTree:PL(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:PL()}}function aR(e,t){let n=AL(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),AL(e)){e=NL(e,0,i);continue}let o=FL(e,a-1,t+1);if(o.some(_R(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=IL(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=NL(e,t+1,a));c&&(e=NL(e,a,i))}return[e,n]}function oR(e){return typeof e.groupIndex<`u`}function sR({offset:e},t){return t===e?0:t<e?-1:1}function cR(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=QL(t,e,rR),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function lR(e,t){if(!nR(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function uR(e,t,n){if(oR(e))return t.groupIndices[e.groupIndex]+1;let r=lR(e.index===`LAST`?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}function dR(e,t,n,r=0){return r>0&&(t=Math.max(t,QL(e,r,rR).offset)),kL(eR(e,t,n,sR),gR)}function fR(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,_L.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&AL(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>NL(NL(t,n,e),n+1,r),o)}else [o,s]=aR(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=hR(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>NL(e,t,cR(t,d,i)),PL()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function pR(e){return LL(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i===void 0?1/0:i.k-1,size:t,startIndex:e}})}function mR(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function hR(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t!==0){c=$L(i,t-1,rR),s=i[c].offset;let e=ML(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===ML(n,t)[1]&&--c,i=i.slice(0,c+1)}else i=[];for(let{start:e,value:c}of FL(n,t,1/0)){let t=e-a,n=t*o+s+t*r;i.push({index:e,offset:n,size:c}),a=e,s=n,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function gR(e){return{index:e.index,value:e}}function _R(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}var vR={offsetHeight:`height`,offsetWidth:`width`},yR=dL(([{log:e},{recalcInProgress:t}])=>{let n=lL(),r=lL(),i=cL(r,0),a=lL(),o=lL(),s=sL(0),c=sL([]),l=sL(void 0),u=sL(void 0),d=sL(void 0),f=sL(void 0),p=sL((e,t)=>tR(e,vR[t])),m=sL(void 0),h=sL(0),g=iR(),_=cL($(n,iL(c,e,h),tL(fR,g),ZI()),g),v=cL($(c,ZI(),tL((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),$I(({prev:e})=>e)),[]);qI($(c,QI(e=>e.length>0),iL(_,h),$I(([e,t,n])=>{let r=e.reduce((e,r,i)=>NL(e,r,cR(r,t.offsetTree,n)||i),PL());return{...t,groupIndices:e,groupOffsetTree:r}})),_),qI($(r,iL(_),QI(([e,{lastIndex:t}])=>e<t),$I(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),qI(l,u);let y=cL($(l,$I(e=>e===void 0)),!0);qI($(u,QI(e=>e!==void 0&&AL(KI(_).sizeTree)),$I(e=>{let t=KI(d),n=KI(c).length>0;return t!==void 0&&t!==0?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),qI($(f,QI(e=>e!==void 0&&e.length>0&&AL(KI(_).sizeTree)),$I(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),qI($(c,iL(d,u),QI(([,e,t])=>e!==void 0&&t!==void 0),$I(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),o!==void 0&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);let b=uL($(n,iL(_),tL(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),$I(e=>e.changed)));UI($(s,tL((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),$I(e=>e.diff)),e=>{let{groupIndices:n}=KI(_);if(e>0)WI(t,!0),WI(a,e+mR(e,n));else if(e<0){let t=KI(v);t.length>0&&(e-=mR(-e,t)),WI(o,e)}}),UI($(s,iL(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},_L.ERROR)});let x=uL(a);qI($(a,iL(_),$I(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=jL(t.sizeTree,0),a=0,o=0;for(;a<e;){let e=t.groupIndices[o],s=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),o++,a+=s+1}let s=LL(t.sizeTree);return a!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return t.prevSize!==0&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return LL(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=uL($(o,iL(_,h),$I(([e,{offsetTree:t},n])=>cR(-e,t,n))));return qI($(o,iL(_,h),$I(([e,t,n])=>{if(t.groupIndices.length>0){if(AL(t.sizeTree))return t;let r=PL(),i=KI(v),a=0,o=0,s=0;for(;a<-e;){s=i[o];let e=i[o+1]-s-1;o++,a+=e+1}if(r=LL(t.sizeTree).reduce((t,{k:n,v:r})=>NL(t,Math.max(0,n+e),r),r),a!==-e){let n=jL(t.sizeTree,s);r=NL(r,0,n);let i=ML(t.sizeTree,-e+1)[1];r=NL(r,1,i)}return{...t,sizeTree:r,...hR(t.offsetTree,0,r,n)}}let r=LL(t.sizeTree).reduce((t,{k:n,v:r})=>NL(t,Math.max(0,n+e),r),PL());return{...t,sizeTree:r,...hR(t.offsetTree,0,r,n)}})),_),{beforeUnshiftWith:x,data:m,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,fixedGroupSize:d,gap:h,groupIndices:c,heightEstimates:f,itemSize:p,listRefresh:b,shiftWith:o,shiftWithOffset:S,sizeRanges:n,sizes:_,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:a}},HI(bL,ZL),{singleton:!0});function bR(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var xR=dL(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=lL(),o=lL(),s=uL($(a,$I(bR)));return qI($(s,$I(e=>e.totalCount)),n),qI($(s,$I(e=>e.groupIndices)),e),qI($(mL(i,t,r),QI(([e,t])=>nR(t)),$I(([e,t,n])=>ML(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),ZI(),$I(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},HI(yR,DL)),SR=dL(([{log:e}])=>{let t=sL(!1),n=uL($(t,QI(e=>e),ZI()));return UI(t,t=>{t&&KI(e)(`props updated`,{},_L.DEBUG)}),{didMount:n,propsReady:t}},HI(bL),{singleton:!0}),CR=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function wR(e){let t=typeof e==`number`?{index:e}:e;return t.align||=`start`,(!t.behavior||!CR)&&(t.behavior=`auto`),t.offset===void 0&&(t.offset=0),t}var TR=dL(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{let p=lL(),m=lL(),h=sL(0),g=null,_=null,v=null;function y(){g!==null&&(g(),g=null),v!==null&&(v(),v=null),_&&=(clearTimeout(_),null),WI(c,!1)}return qI($(p,iL(n,d,r,h,s,o,f),iL(e,a,i),$I(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=wR(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=uR(b,n,w),E=cR(T,n.offsetTree,d)+o;x===`end`?(E+=f+ML(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+ML(n.sizeTree,T)[1]-r+h)/2:E-=a,C!==void 0&&C!==0&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},_L.DEBUG),WI(p,e)):(WI(m,!0),l(`list did not change, scroll successful`,{},_L.DEBUG))};if(y(),S===`smooth`){let e=!1;v=UI(t,t=>{e||=t}),g=JI(u,()=>{D(e)})}else g=JI($(t,ER(150)),D);return _=setTimeout(()=>{y()},1200),WI(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},_L.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},HI(yR,DL,bL),{singleton:!0});function ER(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function DR(e,t){e===0?t():requestAnimationFrame(()=>{DR(e-1,t)})}function OR(e,t){let n=t-1;return typeof e==`number`?e:e.index===`LAST`?n:e.index}var kR=dL(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=sL(!0),c=sL(0),l=sL(!0);return qI($(o,iL(c),QI(([e,t])=>t!==0),eL(!1)),s),qI($(o,iL(c),QI(([e,t])=>t!==0),eL(!1)),l),UI($(mL(t,o),iL(s,n,e,l),QI(([[,e],t,{sizeTree:n},r,i])=>e&&(!AL(n)||LI(r))&&!t&&!i),iL(c)),([,e])=>{JI(i,()=>{WI(l,!0)}),DR(4,()=>{JI(r,()=>{WI(s,!0)}),WI(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},HI(yR,DL,TR,SR),{singleton:!0});function AR(e,t){return Math.abs(e-t)<1.01}var jR=`up`,MR=`down`,NR=`none`,PR={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},FR=0,IR=dL(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=sL(!1),s=sL(!0),c=lL(),l=lL(),u=sL(4),d=sL(FR),f=cL($(gL($(hL(i),nL(1),eL(!0)),$(hL(i),nL(1),eL(!1),YI(100))),ZI()),!1),p=cL($(gL($(n,eL(!0)),$(n,eL(!1),YI(200))),ZI()),!1);qI($(mL(hL(i),hL(d)),$I(([e,t])=>e<=t),ZI()),s),qI($(s,rL(50)),l);let m=uL($(mL(r,hL(a),hL(t),hL(e),hL(u)),tL((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{let s=n+r-t>-o,c={scrollHeight:t,scrollTop:n,viewportHeight:r};if(s){let t,r;return n>e.state.scrollTop?(t=`SCROLLED_DOWN`,r=e.state.scrollTop-n):(t=`SIZE_DECREASED`,r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:c}}let l;return l=c.scrollHeight>e.state.scrollHeight?`SIZE_INCREASED`:r<e.state.viewportHeight?`VIEWPORT_HEIGHT_DECREASING`:n<e.state.scrollTop?`SCROLLING_UPWARDS`:`NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM`,{atBottom:!1,notAtBottomBecause:l,state:c}},PR),ZI((e,t)=>e!==void 0&&e.atBottom===t.atBottom))),h=cL($(r,tL((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!AR(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),QI(e=>e.changed),$I(e=>e.jump)),0);qI($(m,$I(e=>e.atBottom)),o),qI($(o,rL(50)),c);let g=sL(MR);qI($(r,$I(({scrollTop:e})=>e),ZI(),tL((e,t)=>KI(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?jR:MR,prevScrollTop:t},{direction:MR,prevScrollTop:0}),$I(e=>e.direction)),g),qI($(r,rL(50),eL(NR)),g);let _=sL(0);return qI($(f,QI(e=>!e),eL(0)),_),qI($(i,rL(100),iL(f),QI(([e,t])=>t),tL(([e,t],[n])=>[t,n],[0,0]),$I(([e,t])=>t-e)),_),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:g,scrollVelocity:_}},HI(DL)),LR=`top`,RR=`bottom`,zR=`none`;function BR(e,t,n){return typeof e==`number`?n===jR&&t===LR||n===MR&&t===RR?e:0:n===jR?t===LR?e.main:e.reverse:t===RR?e.main:e.reverse}function VR(e,t){return typeof e==`number`?e:e[t]??0}var HR=dL(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=lL(),o=sL(0),s=sL(0),c=sL(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:cL($(mL(hL(r),hL(i),hL(n),hL(a,XL),hL(c),hL(o),hL(t),hL(e),hL(s)),$I(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=zR,m=VR(l,LR),h=VR(l,RR);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=jR),i<e-f+t+h&&(p=MR),p===zR?null:[Math.max(u-n-BR(a,LR,p)-m,0),u-f-s+t+BR(a,RR,p)+h]}),QI(e=>e!==null),ZI(XL)),[0,0])}},HI(DL),{singleton:!0});function UR(e,t,n){if(nR(t)){let r=lR(e,t);return[{index:ML(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}var WR={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function GR(e,t,n,r,i,a){let{lastIndex:o,lastOffset:s,lastSize:c}=i,l=0,u=0;if(e.length>0){l=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let d=n-o,f=s+d*c+(d-1)*r,p=l,m=f-u;return{bottom:u,firstItemIndex:a,items:qR(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:qR(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function KR(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-o>=e)break;o++}let s=e+o,c=OR(t,s);return GR(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function qR(e,t,n){if(e.length===0)return[];if(!nR(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,a=[],o=FL(t.groupOffsetTree,r,i),s,c=0;for(let r of e){(!s||s.end<r.index)&&(s=o.shift(),c=t.groupIndices.indexOf(s.start));let e;e=r.index===s.start?{index:c,type:`group`}:{groupIndex:c,index:r.index-(c+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function JR(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var YR=dL(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:m}])=>{let h=sL([]),g=sL(0),_=lL(),v=sL(0);qI(a.topItemsIndexes,h);let y=cL($(mL(p,m,hL(c,XL),hL(i),hL(r),hL(l),u,hL(h),hL(t),hL(n),hL(v),e),QI(([e,t,,n,,,,,,,,r])=>{let i=r!==void 0&&r.length!==n;return e&&!t&&!i}),$I(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=KI(g);if(n===0)return{...WR,totalCount:n};if(e===0&&t===0)return m===0?{...WR,totalCount:n}:KR(m,i,r,s,c,u||[]);if(AL(p))return m>0?null:GR(UR(OR(i,n),d,u),[],n,c,d,s);let h=[];if(o.length>0){let e=o[0],t=o[o.length-1],n=0;for(let r of FL(p,e,t)){let i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)h.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return GR([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=dR(f,e,t,_);if(v.length===0)return null;let y=n-1,b=BI([],n=>{for(let r of v){let i=r.value,a=i.offset,o=r.start,s=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+c)/(s+c));let t=o-r.start;a+=t*s+t*c}o<_&&(a+=(_-o)*s,o=_);let l=Math.min(r.end,y);for(let e=o;e<=l&&!(a>=t);e++)n.push({data:u?.[e],index:e,offset:a,size:s}),a+=s+c}}),x=JR(l,LR),S=JR(l,RR);if(b.length>0&&(x>0||S>0)){let e=b[0],t=b[b.length-1];if(x>0&&e.index>_){let t=Math.min(x,e.index-_),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=FL(p,i,i)[0]?.value??e.size;r-=t+c,n.unshift({data:u?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<y){let e=Math.min(S,y-t.index),n=t.offset+t.size+c;for(let r=t.index+1;r<=t.index+e;r++){let e=FL(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return GR(b,h,n,c,d,s)}),QI(e=>e!==null),ZI()),WR);qI($(e,QI(LI),$I(e=>e?.length)),i),qI($(y,$I(e=>e.topListHeight)),d),qI(d,s),qI($(y,$I(e=>[e.top,e.bottom])),o),qI($(y,$I(e=>e.items)),_);let b=uL($(y,QI(({items:e})=>e.length>0),iL(i,e),QI(([{items:e},t])=>e[e.length-1].originalIndex===t-1),$I(([,e,t])=>[e-1,t]),ZI(XL),$I(([e])=>e))),x=uL($(y,rL(200),QI(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),$I(({items:e})=>e[0].index),ZI()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:uL($(y,QI(({items:e})=>e.length>0),$I(({items:e})=>{let t=0,n=e.length-1;for(;e[t].type===`group`&&t<n;)t++;for(;e[n].type===`group`&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),ZI(YL))),startReached:x,topItemsIndexes:h,...f}},HI(yR,xR,HR,kR,TR,IR,SR,ZL),{singleton:!0}),XR=dL(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=lL(),o=cL($(mL(n,e,r,t,i),$I(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return qI(hL(o),a),{totalListHeight:o,totalListHeightChanged:a}},HI(DL,YR),{singleton:!0}),ZR=dL(([{viewportHeight:e},{totalListHeight:t}])=>{let n=sL(!1);return{alignToBottom:n,paddingTopAddition:cL($(mL(n,e,t),QI(([e])=>e),$I(([,e,t])=>Math.max(0,e-t)),rL(0),ZI()),0)}},HI(DL,XR),{singleton:!0}),QR=dL(()=>({context:sL(null)})),$R=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,...r===void 0?{}:{behavior:r}}:e>a?{...i,align:n??`end`,...r===void 0?{}:{behavior:r}}:null,ez=dL(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=lL();return qI($(u,iL(t,c,n,a,i,r,s),iL(e),$I(([[e,t,n,r,i,a,s,c],l])=>{let{calculateViewLocation:u=$R,done:d,...f}=e,p=uR(e,t,r-1),m=cR(p,t.offsetTree,l)+i+a,h=m+ML(t.sizeTree,p)[1],g=c+a,_=u({itemBottom:h,itemTop:m,locationParams:f,viewportBottom:c+n-s,viewportTop:g});return _===null?d?.():d&&JI($(o,QI(e=>!e),nL(KI(o)?1:2)),d),_}),QI(e=>e!==null)),l),{scrollIntoView:u}},HI(yR,DL,TR,YR,bL),{singleton:!0});function tz(e){return e===!1?!1:e===`smooth`?`smooth`:`auto`}var nz=(e,t)=>typeof e==`function`?tz(e(t)):t&&tz(e),rz=dL(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{let m=sL(!1),h=lL(),g=null;function _(e){WI(o,{align:`end`,behavior:e,index:`LAST`})}UI($(mL($(hL(t),nL(1)),c),iL(hL(m),a,s,d),$I(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=nz(n,r||a),o&&=s!==!1),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),QI(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g!==null&&(g(),g=null),KI(n)===void 0?g=JI(e,()=>{KI(u)(`following output to `,{totalCount:r},_L.DEBUG),_(t),g=null}):requestAnimationFrame(()=>{KI(u)(`following output to `,{totalCount:r},_L.DEBUG),_(t)})});function v(e){let t=JI(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&g===null&&(KI(u)(`scrolling to bottom due to increased size`,{},_L.DEBUG),_(`auto`))});setTimeout(t,100)}UI($(mL(hL(m),t,l),QI(([e,,t])=>e!==!1&&t),tL(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),QI(({refreshed:e})=>e),iL(m,t)),([,e])=>{KI(s)&&v(e!==!1)}),UI(h,()=>{v(KI(m)!==!1)}),UI(mL(hL(m),i),([e,t])=>{e!==!1&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=sL(null),b=lL();return qI(gL($(hL(r),$I(e=>e?.length??0)),$(hL(t))),b),UI($(mL($(b,nL(1)),c),iL(hL(y),s,d,f),$I(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),QI(e=>!!e),rL(0)),t=>{g!==null&&(g(),g=null),KI(n)===void 0?g=JI(e,()=>{KI(u)(`scrolling into view`,{}),WI(p,t),g=null}):requestAnimationFrame(()=>{KI(u)(`scrolling into view`,{}),WI(p,t)})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},HI(yR,IR,TR,kR,SR,bL,DL,QR,ez)),iz=dL(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(qI($(s,iL(a),QI(([,e])=>e!==0),iL(i,r,t,n,e),$I(([[,e],t,n,r,i,a=[]])=>KR(e,t,n,r,i,a))),o),{}),HI(yR,kR,YR,SR),{singleton:!0}),az=dL(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=sL(0);return UI($(e,iL(r),QI(([,e])=>e!==0),$I(([,e])=>({top:e}))),e=>{JI($(n,nL(1),QI(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{WI(t,e)})})}),{initialScrollTop:r}},HI(SR,DL,YR),{singleton:!0}),oz=dL(([{scrollVelocity:e}])=>{let t=sL(!1),n=lL(),r=sL(!1);return qI($(e,iL(r,t,n),QI(([e,t])=>t!==!1&&t!==void 0),$I(([e,t,n,r])=>{let{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),ZI()),t),UI($(mL(t,e,n),iL(r)),([[e,t,n],r])=>{e&&r!==!1&&r!==void 0&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},HI(IR),{singleton:!0}),sz=dL(([{scrollContainerState:e,scrollTo:t}])=>{let n=lL(),r=lL(),i=lL(),a=sL(!1),o=sL(void 0);return qI($(mL(n,r),$I(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),qI($(t,iL(r),$I(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},HI(DL)),cz=dL(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=lL(),u=sL(void 0),d=sL(null),f=sL(null);return qI(s,d),qI(c,f),UI($(l,iL(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=pR(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),qI($(u,QI(LI),$I(lz)),i),qI($(a,iL(u),QI(([,e])=>e!==void 0),ZI(),$I(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},HI(yR,DL,kR,SR,sz));function lz(e){return{align:`start`,index:0,offset:e.scrollTop}}var uz=dL(([{topItemsIndexes:e}])=>{let t=sL(0);return qI($(t,QI(e=>e>=0),$I(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},HI(YR));function dz(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var fz=dz(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),pz=dL(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g},_,v,y,b,{scrollToIndex:x},S,{topItemCount:C},{groupCounts:w},T])=>{let{listState:E,minOverscanItemCount:D,topItemsIndexes:O,rangeChanged:k,...A}=b;return qI(k,T.scrollSeekRangeChanged),qI($(T.windowViewportRect,$I(e=>e.visibleHeight)),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:w,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:O,totalCount:f,...y,groupIndices:o,itemSize:c,listState:E,minOverscanItemCount:D,scrollToIndex:x,statefulTotalCount:d,trackItemSizes:p,rangeChanged:k,...A,...T,..._,sizes:u,...v}},HI(yR,kR,DL,cz,rz,YR,TR,dL(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:m}])=>{let h=uL($(c,iL(o),tL(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},s])=>{let c=r+a,l=0;return t===o&&e.length>0&&i.length>0&&(i[0].originalIndex===0&&e[0].originalIndex===0||(l=c-n,l!==0&&(l+=s))),[l,i,o,c]},[0,[],0,0]),QI(([e])=>e!==0),iL(r,s,n,i,p,m),QI(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===jR),$I(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},_L.DEBUG),e))));function g(n){n>0?(WI(t,{behavior:`auto`,top:-n}),WI(e,0)):(WI(e,0),WI(t,{behavior:`auto`,top:-n}))}return UI($(h,iL(e,a)),([t,n,r])=>{r&&fz()?WI(e,n-t):g(-t)}),UI($(mL(cL(a,!1),e,m),QI(([e,t,n])=>!e&&!n&&t!==0),$I(([e,t])=>t),rL(1)),g),qI($(d,$I(e=>({top:-e}))),t),UI($(l,iL(f,u),$I(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);let o=0,s=jL(r,0),c=0,l=0;for(;c<e;){c++,o+=s;let n=t.length===l+1?1/0:t[l+1]-t[l]-1;c+n>e&&(o-=s,n=e-c+1),c+=n,o+=a(n),l++}return o})),n=>{WI(e,n),requestAnimationFrame(()=>{WI(t,{top:n}),requestAnimationFrame(()=>{WI(e,0),WI(m,!1)})})}),{deviation:e}},HI(DL,IR,YR,yR,bL,ZL)),uz,xR,dL(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),HI(HR,iz,SR,oz,XR,az,ZR,sz,ez,bL,QR))));function mz(e,t){let n={},r={},i=0,a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}var hz=typeof document<`u`?U.useLayoutEffect:U.useEffect;function gz(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=U.createContext({});function c(e,n){e.propsReady!==void 0&&WI(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];WI(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];WI(i,n[r])}e.propsReady!==void 0&&WI(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];WI(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=oL(e[t.events[r]]),n),{})}return{Component:U.forwardRef(function(t,a){let{children:d,...f}=t,[p]=U.useState(()=>BI(pL(e),e=>{c(e,f)})),[m]=U.useState(FI(u,p));hz(()=>{for(let e of o)e in f&&UI(m[e],f[e]);return()=>{Object.values(m).map(GI)}},[f,m,p]),hz(()=>{c(p,f)}),U.useImperativeHandle(a,MI(l(p)));let h=n;return(0,W.jsx)(s.Provider,{value:p,children:n===void 0?d:(0,W.jsx)(h,{...mz([...r,...i,...o],f),children:d})})}),useEmitter:(e,t)=>{let n=U.useContext(s)[e];hz(()=>UI(n,t),[t,n])},useEmitterValue:e=>{let t=U.useContext(s)[e],[n,r]=U.useState(FI(KI,t));return hz(()=>UI(t,e=>{e!==n&&r(MI(e))}),[t,n]),n},usePublisher:e=>{let t=U.useContext(s);return U.useCallback(n=>{WI(t[e],n)},[t,e])}}}var _z=U.createContext(void 0),vz=U.createContext(void 0),yz=`-webkit-sticky`,bz=`sticky`,xz=dz(()=>{if(typeof document>`u`)return bz;let e=document.createElement(`div`);return e.style.position=yz,e.style.position===yz?yz:bz}),Sz=typeof document<`u`?U.useLayoutEffect:U.useEffect;function Cz(e){return`self`in e}function wz(e){return`body`in e}function Tz(e,t,n,r=zI,i,a){let o=U.useRef(null),s=U.useRef(null),c=U.useRef(null),l=U.useCallback(n=>{let r,i,o,l=n.target;if(wz(l)||Cz(l)){let e=Cz(l)?l:l.defaultView;o=a===!0?e.scrollX:e.scrollY,r=a===!0?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a===!0?e.innerWidth:e.innerHeight}else o=a===!0?l.scrollLeft:l.scrollTop,r=a===!0?l.scrollWidth:l.scrollHeight,i=a===!0?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync===!0?u():cn.flushSync(u),s.current!==null&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&=(clearTimeout(c.current),null))},[e,t,a]);U.useEffect(()=>{let e=i||o.current;return r(i||o.current),l({suppressFlushSync:!0,target:e}),e.addEventListener(`scroll`,l,{passive:!0}),()=>{r(null),e.removeEventListener(`scroll`,l)}},[o,l,n,r,i]);function u(n){let r=o.current;if(!r||(a===!0?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;Cz(r)?(u=Math.max(tR(r.document.documentElement,a===!0?`width`:`height`),a===!0?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a===!0?r.innerWidth:r.innerHeight,d=a===!0?window.scrollX:window.scrollY):(u=r[a===!0?`scrollWidth`:`scrollHeight`],l=tR(r,a===!0?`width`:`height`),d=r[a===!0?`scrollLeft`:`scrollTop`]);let f=u-l;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),AR(l,u)||n.top===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a===!0&&(n={...n.behavior===void 0?{}:{behavior:n.behavior},left:n.top}),r.scrollTo(n)}function d(e){a===!0&&(e={...e.behavior===void 0?{}:{behavior:e.behavior},...e.top===void 0?{}:{left:e.top}}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}function Ez(e){return e}var Dz=dL(([e,t])=>({...e,...t}),HI(pz,dL(()=>{let e=sL(e=>`Item ${e}`),t=sL(e=>`Group ${e}`),n=sL({}),r=sL(Ez),i=sL(`div`),a=sL(zI),o=(e,t=null)=>cL($(n,$I(t=>t[e]),ZI()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o(`EmptyPlaceholder`),FooterComponent:o(`Footer`),GroupComponent:o(`Group`,`div`),groupContent:t,HeaderComponent:o(`Header`),HeaderFooterTag:i,ItemComponent:o(`Item`,`div`),itemContent:e,ListComponent:o(`List`,`div`),ScrollerComponent:o(`Scroller`,`div`),scrollerRef:a,ScrollSeekPlaceholder:o(`ScrollSeekPlaceholder`),TopItemListComponent:o(`TopItemList`)}}))),Oz=({height:e})=>(0,W.jsx)(`div`,{style:{height:e}}),kz={overflowAnchor:`none`,position:xz(),zIndex:1},Az={overflowAnchor:`none`},jz={...Az,display:`inline-block`,height:`100%`},Mz=U.memo(function({showTopList:e=!1}){let t=Jz(`listState`),n=Yz(`sizeRanges`),r=Jz(`useWindowScroll`),i=Jz(`customScrollParent`),a=Yz(`windowScrollContainerState`),o=Yz(`scrollContainerState`),s=i||r?a:o,c=Jz(`itemContent`),l=Jz(`context`),u=Jz(`groupContent`),d=Jz(`trackItemSizes`),f=Jz(`itemSize`),p=Jz(`log`),m=Yz(`gap`),h=Jz(`horizontalDirection`),{callbackRef:g}=CL(n,f,d,e?zI:s,p,m,i,h,Jz(`skipAnimationFrameInResizeObserver`)),[_,v]=U.useState(0);qz(`deviation`,e=>{_!==e&&v(e)});let y=Jz(`EmptyPlaceholder`),b=Jz(`ScrollSeekPlaceholder`)??Oz,x=Jz(`ListComponent`),S=Jz(`ItemComponent`),C=Jz(`GroupComponent`),w=Jz(`computeItemKey`),T=Jz(`isSeeking`),E=Jz(`groupIndices`).length>0,D=Jz(`alignToBottom`),O=Jz(`initialItemFinalLocationReached`),k=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginLeft:_===0?D?`auto`:0:_,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y!=null?(0,W.jsx)(y,{...Lz(y,l)}):(0,W.jsx)(x,{...Lz(x,l),"data-testid":e?`virtuoso-top-item-list`:`virtuoso-item-list`,ref:g,style:k,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=w(n+t.firstItemIndex,e.data,l);return T?(0,U.createElement)(b,{...Lz(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,U.createElement)(C,{...Lz(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:kz},u(e.index,l)):(0,U.createElement)(S,{...Lz(S,l),...Rz(S,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:h?jz:Az},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),Nz={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},Pz={outline:`none`,overflowX:`auto`,position:`relative`},Fz=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:void 0}),Iz={position:xz(),top:0,width:`100%`,zIndex:1};function Lz(e,t){if(typeof e!=`string`)return{context:t}}function Rz(e,t){return{item:typeof e==`string`?void 0:t}}var zz=U.memo(function(){let e=Jz(`HeaderComponent`),t=Yz(`headerHeight`),n=Jz(`HeaderFooterTag`),r=xL(U.useMemo(()=>e=>{t(tR(e,`height`))},[t]),!0,Jz(`skipAnimationFrameInResizeObserver`)),i=Jz(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Lz(e,i)})})}),Bz=U.memo(function(){let e=Jz(`FooterComponent`),t=Yz(`footerHeight`),n=Jz(`HeaderFooterTag`),r=xL(U.useMemo(()=>e=>{t(tR(e,`height`))},[t]),!0,Jz(`skipAnimationFrameInResizeObserver`)),i=Jz(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Lz(e,i)})})});function Vz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return U.memo(function({children:r,style:i,context:a,...o}){let s=n(`scrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`scrollerRef`),d=t(`horizontalDirection`)||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:m}=Tz(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,W.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?Pz:Nz,...i},tabIndex:0,...o,...Lz(c,a),children:r})})}function Hz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return U.memo(function({children:r,style:i,context:a,...o}){let s=n(`windowScrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`totalListHeight`),d=t(`deviation`),f=t(`customScrollParent`),p=U.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=Tz(s,l,c,t(`scrollerRef`),f);return Sz(()=>(h.current=f||p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,W.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?void 0:{height:u+d}},...o,...Lz(c,a),children:r})})}var Uz=({children:e})=>{let t=U.useContext(_z),n=Yz(`viewportHeight`),r=Yz(`fixedItemHeight`),i=Jz(`alignToBottom`),a=Jz(`horizontalDirection`),o=xL(U.useMemo(()=>PI(n,e=>tR(e,a?`width`:`height`)),[n,a]),!0,Jz(`skipAnimationFrameInResizeObserver`));return U.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:Fz(i),children:e})},Wz=({children:e})=>{let t=U.useContext(_z),n=Yz(`windowViewportRect`),r=Yz(`fixedItemHeight`),i=EL(n,Jz(`customScrollParent`),Jz(`skipAnimationFrameInResizeObserver`)),a=Jz(`alignToBottom`);return U.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Fz(a),children:e})},Gz=({children:e})=>{let t=Jz(`TopItemListComponent`)??`div`,n=Jz(`headerHeight`);return(0,W.jsx)(t,{style:{...Iz,marginTop:`${n}px`},...Lz(t,Jz(`context`)),children:e})},{Component:Kz,useEmitter:qz,useEmitterValue:Jz,usePublisher:Yz}=gz(Dz,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,scrollIntoViewOnChange:`scrollIntoViewOnChange`,itemContent:`itemContent`,groupContent:`groupContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,groupCounts:`groupCounts`,topItemCount:`topItemCount`,firstItemIndex:`firstItemIndex`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,heightEstimates:`heightEstimates`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`HeaderFooterTag`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,horizontalDirection:`horizontalDirection`,skipAnimationFrameInResizeObserver:`skipAnimationFrameInResizeObserver`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,autoscrollToBottom:`autoscrollToBottom`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},U.memo(function(e){let t=Jz(`useWindowScroll`),n=Jz(`topItemsIndexes`).length>0,r=Jz(`customScrollParent`),i=Jz(`context`);return(0,W.jsxs)(r||t?Zz:Xz,{...e,context:i,children:[n&&(0,W.jsx)(Gz,{children:(0,W.jsx)(Mz,{showTopList:!0})}),(0,W.jsxs)(r||t?Wz:Uz,{children:[(0,W.jsx)(zz,{}),(0,W.jsx)(Mz,{}),(0,W.jsx)(Bz,{})]})]})})),Xz=Vz({useEmitter:qz,useEmitterValue:Jz,usePublisher:Yz}),Zz=Hz({useEmitter:qz,useEmitterValue:Jz,usePublisher:Yz}),Qz=Kz,$z=dL(([e,t])=>({...e,...t}),HI(pz,dL(()=>{let e=sL(e=>(0,W.jsxs)(`td`,{children:[`Item $`,e]})),t=sL(null),n=sL(e=>(0,W.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=sL(null),i=sL(null),a=sL({}),o=sL(Ez),s=sL(zI),c=(e,t=null)=>cL($(a,$I(t=>t[e]),ZI()),t);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c(`EmptyPlaceholder`),FillerRow:c(`FillerRow`),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`),TableBodyComponent:c(`TableBody`,`tbody`),TableComponent:c(`Table`,`table`),TableFooterComponent:c(`TableFoot`,`tfoot`),TableHeadComponent:c(`TableHead`,`thead`),TableRowComponent:c(`TableRow`,`tr`),GroupComponent:c(`Group`,`tr`)}}))),eB=({height:e})=>(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{style:{height:e}})}),tB=({height:e})=>(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),nB={overflowAnchor:`none`},rB={position:xz(),zIndex:2,overflowAnchor:`none`},iB=U.memo(function({showTopList:e=!1}){let t=uB(`listState`),n=uB(`computeItemKey`),r=uB(`firstItemIndex`),i=uB(`context`),a=uB(`isSeeking`),o=uB(`fixedHeaderHeight`),s=uB(`groupIndices`).length>0,c=uB(`itemContent`),l=uB(`groupContent`),u=uB(`ScrollSeekPlaceholder`)??eB,d=uB(`GroupComponent`),f=uB(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,h=n(m+r,t.data,i),g=e?m===0?0:p[m-1]:0;return a?(0,U.createElement)(u,{...Lz(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,U.createElement)(d,{...Lz(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...rB,top:o}},l(t.index,i)):(0,U.createElement)(f,{...Lz(f,i),...Rz(f,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:h,style:e?{...rB,top:o+g}:nB},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))})}),aB=U.memo(function(){let e=uB(`listState`),t=uB(`topItemsIndexes`).length>0,n=dB(`sizeRanges`),r=uB(`useWindowScroll`),i=uB(`customScrollParent`),a=dB(`windowScrollContainerState`),o=dB(`scrollContainerState`),s=i||r?a:o,c=uB(`trackItemSizes`),{callbackRef:l,ref:u}=CL(n,uB(`itemSize`),c,s,uB(`log`),void 0,i,!1,uB(`skipAnimationFrameInResizeObserver`)),[d,f]=U.useState(0);lB(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=uB(`EmptyPlaceholder`),m=uB(`FillerRow`)??tB,h=uB(`TableBodyComponent`),g=uB(`paddingTopAddition`),_=uB(`statefulTotalCount`),v=uB(`context`);if(_===0&&p!=null)return(0,W.jsx)(p,{...Lz(p,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),b=e.offsetTop+g+d-y,x=e.offsetBottom,S=b>0?(0,W.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,W.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,W.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...Lz(h,v),children:[S,t&&(0,W.jsx)(iB,{showTopList:!0}),(0,W.jsx)(iB,{}),C]})}),oB=({children:e})=>{let t=U.useContext(_z),n=dB(`viewportHeight`),r=dB(`fixedItemHeight`),i=xL(U.useMemo(()=>PI(n,e=>tR(e,`height`)),[n]),!0,uB(`skipAnimationFrameInResizeObserver`));return U.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:Fz(!1),children:e})},sB=({children:e})=>{let t=U.useContext(_z),n=dB(`windowViewportRect`),r=dB(`fixedItemHeight`),i=EL(n,uB(`customScrollParent`),uB(`skipAnimationFrameInResizeObserver`));return U.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Fz(!1),children:e})},{Component:cB,useEmitter:lB,useEmitterValue:uB,usePublisher:dB}=gz($z,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,firstItemIndex:`firstItemIndex`,itemContent:`itemContent`,groupContent:`groupContent`,fixedHeaderContent:`fixedHeaderContent`,fixedFooterContent:`fixedFooterContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,topItemCount:`topItemCount`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,groupCounts:`groupCounts`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},U.memo(function(e){let t=uB(`useWindowScroll`),n=uB(`customScrollParent`),r=dB(`fixedHeaderHeight`),i=dB(`fixedFooterHeight`),a=uB(`fixedHeaderContent`),o=uB(`fixedFooterContent`),s=uB(`context`),c=xL(U.useMemo(()=>PI(r,e=>tR(e,`height`)),[r]),!0,uB(`skipAnimationFrameInResizeObserver`)),l=xL(U.useMemo(()=>PI(i,e=>tR(e,`height`)),[i]),!0,uB(`skipAnimationFrameInResizeObserver`)),u=n||t?pB:fB,d=n||t?sB:oB,f=uB(`TableComponent`),p=uB(`TableHeadComponent`),m=uB(`TableFooterComponent`),h=a?(0,W.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...Lz(p,s),children:a()},`TableHead`):null,g=o?(0,W.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...Lz(m,s),children:o()},`TableFoot`):null;return(0,W.jsx)(u,{...e,...Lz(u,s),children:(0,W.jsx)(d,{children:(0,W.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...Lz(f,s),children:[h,(0,W.jsx)(aB,{},`TableBody`),g]})})})})),fB=Vz({useEmitter:lB,useEmitterValue:uB,usePublisher:dB}),pB=Hz({useEmitter:lB,useEmitterValue:uB,usePublisher:dB}),mB={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},hB={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:gB,floor:_B,max:vB,min:yB,round:bB}=Math;function xB(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function SB(e){return{...hB,items:e}}function CB(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function wB(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}var TB=dL(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:m,propsReady:h},{customScrollParent:g,useWindowScroll:_,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b},x])=>{let S=sL(0),C=sL(0),w=sL(mB),T=sL({height:0,width:0}),E=sL({height:0,width:0}),D=lL(),O=lL(),k=sL(0),A=sL(null),j=sL({column:0,row:0}),M=lL(),N=lL(),P=sL(!1),ee=sL(0),F=sL(!0),I=sL(!1),te=sL(!1);UI($(m,iL(ee),QI(([e,t])=>t!==0)),()=>{WI(F,!1)}),UI($(mL(m,F,E,T,ee,I),QI(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{WI(I,!0),DR(1,()=>{WI(D,e)}),JI($(l),()=>{WI(t,[0,0]),WI(F,!0)})}),qI($(N,QI(e=>e!=null&&e.scrollTop>0),eL(0)),C),UI($(m,iL(N),QI(([,e])=>e!=null)),([,e])=>{e&&(WI(T,e.viewport),WI(E,e.item),WI(j,e.gap),e.scrollTop>0&&(WI(P,!0),JI($(l,nL(1)),e=>{WI(P,!1)}),WI(c,{top:e.scrollTop})))}),qI($(T,$I(({height:e})=>e)),d),qI($(mL(hL(T,CB),hL(E,CB),hL(j,(e,t)=>e!==void 0&&e.column===t.column&&e.row===t.row),hL(l)),$I(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),M),qI($(mL(hL(S),r,hL(j,wB),hL(E,CB),hL(T,CB),hL(A),hL(C),hL(P),hL(F),hL(ee)),QI(([,,,,,,,e])=>!e),$I(([e,[t,n],r,i,a,o,s,,c,l])=>{let{column:u,row:d}=r,{height:f,width:p}=i,{width:m}=a;if(s===0&&(e===0||m===0))return mB;if(p===0){let t=OR(l,e);return SB(xB(t,t+Math.max(s-1,0),o))}let h=EB(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*_B((t+d)/(f+d)),_=h*gB((n+d)/(f+d))-1,_=yB(e-1,vB(_,h-1)),g=yB(_,vB(0,g))):(g=0,_=-1);let v=xB(g,_,o),{bottom:y,top:b}=DB(a,r,i,v),x=gB(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),qI($(A,QI(e=>e!==null),$I(e=>e.length)),S),qI($(mL(T,E,w,j),QI(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),$I(([e,t,{items:n},r])=>{let{bottom:i,top:a}=DB(e,r,t,n);return[a,i]}),ZI(XL)),t);let ne=sL(!1);qI($(l,iL(ne),$I(([e,t])=>t||e!==0)),ne);let re=uL($(mL(w,S),QI(([{items:e}])=>e.length>0),iL(ne),QI(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&e.offsetBottom===0&&e.items.length===t)&&r}),$I(([[,e]])=>e-1),ZI())),ie=uL($(hL(w),QI(({items:e})=>e.length>0&&e[0].index===0),eL(0),ZI())),L=uL($(hL(w),iL(P),QI(([{items:e},t])=>e.length>0&&!t),$I(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),ZI(YL),rL(0)));qI(L,p.scrollSeekRangeChanged),qI($(D,iL(T,E,S,j),$I(([e,t,n,r,i])=>{let a=wR(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=vB(0,l,yB(r-1,l));let u=OB(t,i,n,l);return o===`end`?u=bB(u-t.height+n.height):o===`center`&&(u=bB(u-t.height/2+n.height/2)),c!==void 0&&c!==0&&(u+=c),{behavior:s,top:u}})),c);let R=cL($(w,$I(e=>e.offsetBottom+e.bottom)),0);return qI($(b,$I(e=>({height:e.visibleHeight,width:e.visibleWidth}))),T),{customScrollParent:g,data:A,deviation:k,footerHeight:i,gap:j,headerHeight:a,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:n,restoreStateFrom:N,scrollBy:o,scrollContainerState:s,scrollHeight:O,scrollTo:c,scrollToIndex:D,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:_,viewportDimensions:T,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b,...p,gridState:w,horizontalDirection:te,initialTopMostItemIndex:ee,totalListHeight:R,...f,endReached:re,propsReady:h,rangeChanged:L,startReached:ie,stateChanged:M,stateRestoreInProgress:P,...x}},HI(HR,DL,IR,oz,SR,sz,bL));function EB(e,t,n){return vB(1,_B((e+n)/(_B(t)+n)))}function DB(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=OB(e,t,n,r[0].index);return{bottom:OB(e,t,n,r[r.length-1].index)+i,top:a}}function OB(e,t,n,r){let i=_B(r/EB(e.width,n.width,t.column)),a=i*n.height+vB(0,i-1)*t.row;return a>0?a+t.row:a}var kB=dL(([e,t])=>({...e,...t}),HI(TB,dL(()=>{let e=sL(e=>`Item ${e}`),t=sL({}),n=sL(null),r=sL(`virtuoso-grid-item`),i=sL(`virtuoso-grid-list`),a=sL(Ez),o=sL(`div`),s=sL(zI),c=(e,n=null)=>cL($(t,$I(t=>t[e]),ZI()),n),l=sL(!1),u=sL(!1);return qI(hL(u),l),{components:t,computeItemKey:a,context:n,FooterComponent:c(`Footer`),HeaderComponent:c(`Header`),headerFooterTag:o,itemClassName:r,ItemComponent:c(`Item`,`div`),itemContent:e,listClassName:i,ListComponent:c(`List`,`div`),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`,`div`)}}))),AB=U.memo(function(){let e=LB(`gridState`),t=LB(`listClassName`),n=LB(`itemClassName`),r=LB(`itemContent`),i=LB(`computeItemKey`),a=LB(`isSeeking`),o=RB(`scrollHeight`),s=LB(`ItemComponent`),c=LB(`ListComponent`),l=LB(`ScrollSeekPlaceholder`),u=LB(`context`),d=RB(`itemDimensions`),f=RB(`gap`),p=LB(`log`),m=LB(`stateRestoreInProgress`),h=RB(`reportReadyState`),g=xL(U.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n!==null){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:VB(`column-gap`,getComputedStyle(e).columnGap,p),row:VB(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return Sz(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,W.jsx)(c,{className:t,ref:g,...Lz(c,u),"data-testid":`virtuoso-item-list`,style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let o=i(t.index,t.data,u);return a?(0,W.jsx)(l,{...Lz(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,U.createElement)(s,{...Lz(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),jB=U.memo(function(){let e=LB(`HeaderComponent`),t=RB(`headerHeight`),n=LB(`headerFooterTag`),r=xL(U.useMemo(()=>e=>{t(tR(e,`height`))},[t]),!0,!1),i=LB(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Lz(e,i)})})}),MB=U.memo(function(){let e=LB(`FooterComponent`),t=RB(`footerHeight`),n=LB(`headerFooterTag`),r=xL(U.useMemo(()=>e=>{t(tR(e,`height`))},[t]),!0,!1),i=LB(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Lz(e,i)})})}),NB=({children:e})=>{let t=U.useContext(vz),n=RB(`itemDimensions`),r=RB(`viewportDimensions`),i=xL(U.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return U.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,W.jsx)(`div`,{ref:i,style:Fz(!1),children:e})},PB=({children:e})=>{let t=U.useContext(vz),n=RB(`windowViewportRect`),r=RB(`itemDimensions`),i=EL(n,LB(`customScrollParent`),!1);return U.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,W.jsx)(`div`,{ref:i,style:Fz(!1),children:e})},{Component:FB,useEmitter:IB,useEmitterValue:LB,usePublisher:RB}=gz(kB,{optional:{context:`context`,totalCount:`totalCount`,overscan:`overscan`,itemContent:`itemContent`,components:`components`,computeItemKey:`computeItemKey`,data:`data`,initialItemCount:`initialItemCount`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`headerFooterTag`,listClassName:`listClassName`,itemClassName:`itemClassName`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,restoreStateFrom:`restoreStateFrom`,initialTopMostItemIndex:`initialTopMostItemIndex`,increaseViewportBy:`increaseViewportBy`},methods:{scrollTo:`scrollTo`,scrollBy:`scrollBy`,scrollToIndex:`scrollToIndex`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,stateChanged:`stateChanged`,readyStateChanged:`readyStateChanged`}},U.memo(function({...e}){let t=LB(`useWindowScroll`),n=LB(`customScrollParent`),r=n||t?BB:zB,i=n||t?PB:NB,a=LB(`context`);return(0,W.jsx)(r,{...e,...Lz(r,a),children:(0,W.jsxs)(i,{children:[(0,W.jsx)(jB,{}),(0,W.jsx)(AB,{}),(0,W.jsx)(MB,{})]})})})),zB=Vz({useEmitter:IB,useEmitterValue:LB,usePublisher:RB}),BB=Hz({useEmitter:IB,useEmitterValue:LB,usePublisher:RB});function VB(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,_L.WARN),t===`normal`?0:parseInt(t??`0`,10)}function HB({data:e,value:t,renderOption:n}){if(!nm(e)){let r=TI(t,e.value);return(0,W.jsx)(Np.Option,{value:e.value,disabled:e.disabled,"data-checked":r||void 0,"aria-selected":r,active:r,children:n?.({option:e,checked:r})})}let r=e.items.map(e=>(0,W.jsx)(HB,{data:e,value:t,renderOption:n},e.value));return(0,W.jsx)(Np.Group,{label:e.group,children:r})}var UB={dropdownHeightTransition:`_dropdownHeightTransition_1kps7_1`};function WB(e,t,n){return n?e&&e<=t?e:t:0}function GB({data:e,maxDropdownHeight:t,opened:n,renderOption:r,scrollAreaProps:i,value:a,withScrollArea:o=!0,withVirtualization:s}){let c=(0,U.useRef)(null),[l,u]=(0,U.useState)(0),d=an(n),f=t??220,p=e.map(e=>(0,W.jsx)(HB,{data:e,value:a,renderOption:r},nm(e)?e.group:e.value)),m=e=>{c.current?.scrollToIndex({index:e,align:`start`})},h=(e,t)=>{if(t==null)return-1;let n=Array.isArray(t);return e.findIndex(e=>n?nm(e)?t.some(t=>e.group.includes(t)):t.includes(e.value):nm(e)?e.group.includes(t):e.value===t)},g=(0,U.useCallback)((e,t,n,r,i)=>{if(e&&t&&n){let t=h(r,n);t>-1&&!i&&e&&m(t)}else e&&!n&&m(0)},[]);if((0,U.useEffect)(()=>{g(n,s,a,e,d)},[n,s,a,e,d,g]),s){let t=WB(l,f,e.length);return(0,W.jsx)(q,{className:UB.dropdownHeightTransition,style:{height:t},children:(0,W.jsx)(Qz,{ref:c,style:{height:`100%`},totalCount:e.length,totalListHeightChanged:u,itemContent:t=>(0,W.jsx)(HB,{data:e[t],value:a,renderOption:r},nm(e[t])?e[t].group:e[t].value)})})}return o?(0,W.jsx)(sl.Autosize,{mah:f,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...i,children:p}):(0,W.jsx)(W.Fragment,{children:p})}var KB={selectAll:`_selectAll_158re_1`};function qB({opened:e,data:t,filter:n,filterOptions:r=!0,hidden:i,hiddenWhenEmpty:a,limit:o,maxDropdownHeight:s,nothingFoundMessage:c,renderOption:l,onSelectAllToggle:u,scrollAreaProps:d,search:f,value:p,withScrollArea:m=!0,withSelectAll:h,withVirtualization:g}){DI(t);let{_}=OM(),v=typeof f==`string`&&t.every(e=>nm(e)?!0:e.label!==f)?(n||rm)({options:t,search:r?f:``,limit:o??1/0}):t,y=EI(v),b=v.filter(e=>nm(e)?!1:!e.disabled).map(e=>{if(!nm(e))return e.value}).filter(e=>typeof e==`string`),x=Array.isArray(p)?p:[],S=b.length>0&&b.every(e=>x.includes(e)),C=b.some(e=>x.includes(e))&&!S;return(0,W.jsx)(Np.Dropdown,{hidden:i||a&&y,children:(0,W.jsxs)(Np.Options,{children:[h&&(0,W.jsxs)(Eu,{gap:8,className:KB.selectAll,onClick:()=>u?.(!S),children:[(0,W.jsx)(tm,{checked:S,indeterminate:C,onChange:e=>{e.preventDefault(),u?.(!S)}}),(0,W.jsx)(Xf,{span:!0,children:_({id:`mCB6Je`})})]}),(0,W.jsx)(GB,{opened:e,data:v,maxDropdownHeight:s,renderOption:l,scrollAreaProps:d,value:p,withScrollArea:m,withVirtualization:g}),y&&c&&(0,W.jsx)(Np.Empty,{children:c})]})})}var JB=(0,U.memo)(function({allowDeselect:e=!0,autoComplete:t,chevronColor:n,classNames:r,clearable:i,clearButtonProps:a,comboboxProps:o,data:s,defaultDropdownOpened:c,defaultSearchValue:l,defaultValue:u,disabled:d,dropdownOpened:f,error:p,filter:m,form:h,hiddenInputProps:g,id:_,limit:v,loading:y,maxDropdownHeight:b,name:x,nothingFoundMessage:S,onBlur:C,onChange:w,onClear:T,onClick:E,onDropdownClose:D,onDropdownOpen:O,onFocus:k,onOptionSubmit:A,onSearchChange:j,placeholder:M,readOnly:N,rightSection:P,rightSectionPointerEvents:ee,scrollAreaProps:F,searchable:I,searchValue:te,selectFirstOptionOnChange:ne,size:re,styles:ie,unstyled:L,value:R,withScrollArea:ae,withVirtualization:oe,...se}){let ce=(0,U.useMemo)(()=>tp(s),[s]),le=(0,U.useMemo)(()=>np(ce),[ce]),ue=Lt(_),{_:de}=OM(),[z,fe,pe]=Jt({value:R,defaultValue:u,finalValue:null,onChange:w}),me=typeof z==`string`?le[z]:void 0,he=an(me),[B,ge,_e]=Jt({value:te,defaultValue:l,finalValue:me?me.label:``,onChange:j}),V=Ap({opened:f,defaultOpened:c,onDropdownOpen:()=>{O?.(),V.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{D?.(),V.resetSelectedOption()}}),ve=e=>{ge(e),V.resetSelectedOption()},ye=()=>y?(0,W.jsx)(cu,{size:`xs`}):P??(0,W.jsx)(DO,{width:20,height:20}),{resolvedClassNames:be,resolvedStyles:xe}=Hr({props:se,styles:ie,classNames:r});(0,U.useEffect)(()=>{ne&&V.selectFirstOption()},[ne,B]),(0,U.useEffect)(()=>{R===null&&ve(``),typeof R==`string`&&me&&(he?.value!==me.value||he?.label!==me.label)&&ve(me.label)},[R,me]),(0,U.useEffect)(()=>{!pe&&!_e&&ve(typeof z==`string`&&le[z]?.label||``)},[s,z]);let Se=(0,W.jsx)(Np.ClearButton,{...a,onClear:()=>{fe(null,null),ve(``),T?.()}}),Ce=i&&!!z&&!d&&!N,we=ye(),Te=ee,Ee=S??de({id:`Hz+sxK`}),De=M??de({id:`rG3WVm`});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Np,{store:V,__staticSelector:`Select`,classNames:be,styles:xe,unstyled:L,readOnly:N,onOptionSubmit:t=>{A?.(t);let n=e&&le[t].value===z?null:le[t],r=n?n.value:null;r!==z&&fe(r,n),pe||ve(typeof r==`string`&&n?.label||``),V.closeDropdown()},size:re,...o,children:[(0,W.jsx)(Np.Target,{targetType:I?`input`:`button`,autoComplete:t,children:(0,W.jsx)(Cf,{id:ue,__defaultRightSection:(0,W.jsx)(Np.Chevron,{size:re,error:p,unstyled:L,color:n}),__clearSection:Se,__clearable:Ce,rightSection:we,rightSectionPointerEvents:Te||(Ce?`all`:`none`),...se,placeholder:De,size:re,__staticSelector:`Select`,disabled:d,readOnly:N||!I,value:B,onChange:e=>{ve(e.currentTarget.value),V.openDropdown(),ne&&V.selectFirstOption()},onFocus:e=>{I&&V.openDropdown(),k?.(e)},onBlur:e=>{I&&V.closeDropdown(),ve(z==null?``:le[z]?.label||``),C?.(e)},onClick:e=>{I?V.openDropdown():V.toggleDropdown(),E?.(e)},classNames:be,styles:xe,unstyled:L,pointer:!I,error:p})}),(0,W.jsx)(qB,{opened:V.dropdownOpened,data:ce,renderOption:XA,value:z,search:I?B:void 0,limit:v,maxDropdownHeight:b,filter:m,hidden:N||d,nothingFoundMessage:Ee,withScrollArea:ae,scrollAreaProps:F,withVirtualization:oe})]}),(0,W.jsx)(Np.HiddenInput,{value:z,name:x,form:h,disabled:d,...g})]})}),YB={root:`_root_185o8_1`,input:`_input_185o8_5`,dropdown:`_dropdown_185o8_12`,section:`_section_185o8_16`,text:`_text_185o8_20`};function XB({currentPage:e,pageSize:t,totalElements:n,paginationSizes:r,loading:i,onPageSizeChange:a}){let{_:o}=OM(),s=t*(e-1)+1,c=Math.min(n,t*e);return(0,W.jsxs)(Eu,{justify:`space-between`,align:`center`,gap:24,children:[(0,W.jsxs)(Eu,{align:`center`,gap:6,children:[(0,W.jsx)(Xf,{size:`sm`,className:YB.text,children:o({id:`0ZU/fh`})}),(0,W.jsx)(JB,{classNames:{root:YB.root,input:YB.input,section:YB.section,dropdown:YB.dropdown},data:r.map(String),value:t.toString(),onChange:(e,t)=>a(Number(t.value)),disabled:i})]}),(0,W.jsx)(Xf,{size:`sm`,className:YB.text,children:o({id:`5PgX/3`,values:{startItem:s,endItem:c,totalElements:n}})})]})}var ZB={root:`_root_19e85_1`};function QB(){let{isCardView:e,currentPage:t,currentPageSize:n,totalElements:r,totalPages:i,loading:a,withServerPagination:o,handlePageChange:s,handlePageSizeChange:c}=hI(),l=wI.some(e=>e===n)?wI:[...wI,n].sort((e,t)=>e-t),u=Math.max(1,Math.ceil(r/n));return r===0?null:(0,W.jsxs)(Eu,{justify:`space-between`,align:`center`,gap:16,className:ZB.root,mod:{"card-view":e},children:[(0,W.jsx)(XB,{currentPage:t,pageSize:n,totalElements:r,paginationSizes:l,loading:a,onPageSizeChange:c}),(0,W.jsx)(xv,{total:o&&i||u,value:t,onChange:s,disabled:a})]})}function $B(){let{loading:e,isEmpty:t,withPagination:n}=hI();return(0,W.jsxs)(U.Activity,{mode:t&&!e?`hidden`:`visible`,children:[(0,W.jsx)(SI,{}),n&&(0,W.jsx)(QB,{})]})}var eV={loadingCell:`_loadingCell_1ncdo_1`,clickableRow:`_clickableRow_1ncdo_5`,actionCell:`_actionCell_1ncdo_9`,selectedRow:`_selectedRow_1ncdo_15`,firstCellContent:`_firstCellContent_1ncdo_19`,collapseButton:`_collapseButton_1ncdo_25`,checkbox:`_checkbox_1ncdo_37`,checkboxInner:`_checkboxInner_1ncdo_41`,expandedRows:`_expandedRows_1ncdo_45`,expandedContent:`_expandedContent_1ncdo_52`};function tV(){let{idKey:e,paginatedData:t=[],columns:n=[],withSelection:r,selection:i=[],loading:a,withCollapsible:o,isRowCollapsible:s,withMultipleCollapse:c=!0,toggleRow:l,renderCollapsed:u,collapsedViewType:d,onRowClick:f,getRowUrl:p}=hI(),[m,h]=(0,U.useState)({}),g=e=>{h(t=>c?{...t,[e]:!t[e]}:{[e]:!t[e]})},_=(e,t)=>{let n=t[e];return n?n.toString():`-`},v=(e,t,n)=>{if(!t.accessor&&!t.render)throw Error(`Column accessor or render function is required`);return t.render?t.render(e,n):Array.isArray(t.accessor)?t.accessor.map(t=>_(t,e)).join(` `):_(t.accessor,e)};return a?(0,W.jsx)(Cb.Tbody,{children:Array.from({length:3}).map((e,t)=>(0,W.jsxs)(Cb.Tr,{children:[n.map((e,n)=>(0,W.jsx)(Cb.Td,{children:n===0&&(o||r)?(0,W.jsxs)(q,{className:eV.firstCellContent,children:[o&&(0,W.jsx)(Ly,{height:16,width:16}),r&&(0,W.jsx)(Ly,{height:20,width:20,circle:!0}),(0,W.jsx)(Ly,{height:20,style:{flex:1}})]}):(0,W.jsx)(Ly,{height:20})},`loading-${t}-${n}`)),f&&(0,W.jsx)(Cb.Td,{children:(0,W.jsx)(Ly,{height:20})})]},`loading-${t}`))}):(0,W.jsx)(Cb.Tbody,{children:t.map((t,a)=>{let c=String(t[e]),h=m[c]||!1,_=i.some(n=>n[e]===t[e]),y=o&&(s?s(t,a):!0),b=d??`table`,{handleClick:x,handleMouseDown:S}=_I(t,f,p);return(0,W.jsxs)(U.Fragment,{children:[(0,W.jsxs)(Cb.Tr,{className:wn(f&&eV.clickableRow,_&&eV.selectedRow,h&&eV.expandedRows),onClick:x,onMouseDown:S,children:[n.map((n,i)=>(0,W.jsx)(Cb.Td,{fz:`md`,lh:`md`,fw:500,children:i===0&&(y||r)?(0,W.jsxs)(q,{className:eV.firstCellContent,children:[y&&(0,W.jsx)(dl,{className:eV.collapseButton,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),g(c)},children:h?(0,W.jsx)(gI,{width:20,height:20}):(0,W.jsx)(DO,{width:20,height:20})}),r&&(0,W.jsx)(tm,{classNames:{root:eV.checkbox,inner:eV.checkboxInner},checked:_,readOnly:!0,onClick:e=>{e.stopPropagation(),l(t,a,e)}}),v(t,n,a)]}):v(t,n,a)},`${e?String(t[e]):a}-${i}-${String(n.accessor)}`)),f&&(0,W.jsx)(Cb.Td,{className:eV.actionCell,children:(0,W.jsx)(Nm,{children:(0,W.jsx)(gu,{variant:`transparent`,children:(0,W.jsx)(tA,{})})})})]}),y&&h&&u&&b===`table`?(0,W.jsx)(U.Fragment,{children:u(t,a,{view:`table`})},`${a}-expanded`):null,y&&u&&b===`card`?(0,W.jsx)(Cb.Tr,{children:(0,W.jsx)(Cb.Td,{colSpan:n.length+ +!!f,p:0,children:(0,W.jsx)(Ji,{expanded:h,children:(0,W.jsx)(q,{className:eV.expandedContent,children:h?u(t,a,{view:`card`}):null})})})},`${a}-expanded`):null]},a)})})}var nV={checkbox:`_checkbox_oawpz_1`,textLight:`_textLight_oawpz_6`,firstHeaderContent:`_firstHeaderContent_oawpz_10`,checkboxInner:`_checkboxInner_oawpz_20`};function rV(){let{_:e}=OM(),{columns:t=[],withSelection:n,isCurrentPageSelected:r,isCurrentPageIndeterminate:i,loading:a,paginatedData:o=[],withSingleSelection:s,onRowClick:c,toggleCurrentPage:l}=hI(),u=a||!o.length,d=!!c;return(0,W.jsx)(Cb.Thead,{children:(0,W.jsxs)(Cb.Tr,{children:[t.map((e,t)=>(0,W.jsx)(Cb.Th,{className:nV.textLight,children:t===0&&n?(0,W.jsxs)(q,{className:nV.firstHeaderContent,children:[n&&!s&&(0,W.jsx)(tm,{classNames:{root:nV.checkbox,inner:nV.checkboxInner},checked:r,indeterminate:i,onChange:l,disabled:u}),e.header]}):e.header},`${String(e.accessor)}-${t}`)),d&&(0,W.jsx)(Cb.Th,{className:nV.textLight,w:80,children:e({id:`URmyfc`})})]})})}var iV={container:`_container_1xqco_1`,scrollContainer:`_scrollContainer_1xqco_5`};function aV(){let{loading:e,isEmpty:t,paginatedData:n=[],withPagination:r}=hI();return(0,W.jsxs)(U.Activity,{mode:t&&!e?`hidden`:`visible`,children:[(0,W.jsx)(Cb.ScrollContainer,{minWidth:320,classNames:{scrollContainer:iV.scrollContainer},children:(0,W.jsxs)(Cb,{highlightOnHover:n.length>0,classNames:{th:iV.th},children:[(0,W.jsx)(rV,{}),(0,W.jsx)(tV,{})]})}),r&&(0,W.jsx)(QB,{})]})}var oV={root:`_root_1yqhv_1`,rootWithBorder:`_rootWithBorder_1yqhv_5`,title:`_title_1yqhv_10`,description:`_description_1yqhv_14`};function sV({className:e,icon:t,title:n,description:r,children:i,titleClassName:a,descriptionClassName:o,withBorder:s=!0,...c}){return(0,W.jsxs)(Vy,{align:`center`,gap:16,className:wn(e,oV.root,{[oV.rootWithBorder]:s}),...c,children:[t,(0,W.jsxs)(Vy,{align:`center`,gap:4,children:[n&&(0,W.jsx)(Xf,{fw:500,size:`lg`,className:wn(oV.title,a),children:n}),r&&(0,W.jsx)(Xf,{size:`lg`,className:wn(oV.description,o),children:r})]}),i]})}var cV={root:`_root_je6aq_1`,title:`_title_je6aq_5`};function lV({title:e,description:t}){let{_:n}=OM();return(0,W.jsx)(sV,{title:e??n({id:`jGE4vv`}),description:t,h:72,className:cV.root,titleClassName:cV.title})}function uV({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M7 4V20`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M17 19V4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M10 6.99998C10 6.99998 7.79053 4.00001 6.99998 4C6.20942 3.99999 4 7 4 7`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M20 17C20 17 17.7905 20 17 20C16.2094 20 14 17 14 17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function dV({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M2 4.66669H4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2 11.3333H6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 11.3333H14`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M10 4.66669H14`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M4 4.66669C4 4.04543 4 3.73481 4.10149 3.48977C4.23682 3.16307 4.49639 2.90351 4.82309 2.76818C5.06812 2.66669 5.37875 2.66669 6 2.66669C6.62125 2.66669 6.93187 2.66669 7.17693 2.76818C7.5036 2.90351 7.7632 3.16307 7.89853 3.48977C8 3.73481 8 4.04543 8 4.66669C8 5.28794 8 5.59857 7.89853 5.8436C7.7632 6.1703 7.5036 6.42987 7.17693 6.56519C6.93187 6.66669 6.62125 6.66669 6 6.66669C5.37875 6.66669 5.06812 6.66669 4.82309 6.56519C4.49639 6.42987 4.23682 6.1703 4.10149 5.8436C4 5.59857 4 5.28794 4 4.66669Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M8 11.3333C8 10.712 8 10.4014 8.10147 10.1564C8.2368 9.82971 8.4964 9.57011 8.82307 9.43478C9.06813 9.33331 9.37873 9.33331 10 9.33331C10.6213 9.33331 10.9319 9.33331 11.1769 9.43478C11.5036 9.57011 11.7632 9.82971 11.8985 10.1564C12 10.4014 12 10.712 12 11.3333C12 11.9546 12 12.2652 11.8985 12.5102C11.7632 12.8369 11.5036 13.0965 11.1769 13.2318C10.9319 13.3333 10.6213 13.3333 10 13.3333C9.37873 13.3333 9.06813 13.3333 8.82307 13.2318C8.4964 13.0965 8.2368 12.8369 8.10147 12.5102C8 12.2652 8 11.9546 8 11.3333Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}function fV({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 640 640`,width:24,height:24,fill:`currentColor`,...e,children:(0,W.jsx)(`path`,{d:`M278.6 438.6L182.6 534.6C170.1 547.1 149.8 547.1 137.3 534.6L41.3 438.6C28.8 426.1 28.8 405.8 41.3 393.3C53.8 380.8 74.1 380.8 86.6 393.3L128 434.7L128 128C128 110.3 142.3 96 160 96C177.7 96 192 110.3 192 128L192 434.7L233.4 393.3C245.9 380.8 266.2 380.8 278.7 393.3C291.2 405.8 291.2 426.1 278.7 438.6zM352 96L384 96C401.7 96 416 110.3 416 128C416 145.7 401.7 160 384 160L352 160C334.3 160 320 145.7 320 128C320 110.3 334.3 96 352 96zM352 224L448 224C465.7 224 480 238.3 480 256C480 273.7 465.7 288 448 288L352 288C334.3 288 320 273.7 320 256C320 238.3 334.3 224 352 224zM352 352L512 352C529.7 352 544 366.3 544 384C544 401.7 529.7 416 512 416L352 416C334.3 416 320 401.7 320 384C320 366.3 334.3 352 352 352zM352 480L576 480C593.7 480 608 494.3 608 512C608 529.7 593.7 544 576 544L352 544C334.3 544 320 529.7 320 512C320 494.3 334.3 480 352 480z`})})}function pV({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 640 640`,width:24,height:24,fill:`currentColor`,...e,children:(0,W.jsx)(`path`,{stroke:`currentColor`,d:`M278.6 438.6L182.6 534.6C170.1 547.1 149.8 547.1 137.3 534.6L41.3 438.6C28.8 426.1 28.8 405.8 41.3 393.3C53.8 380.8 74.1 380.8 86.6 393.3L128 434.7L128 128C128 110.3 142.3 96 160 96C177.7 96 192 110.3 192 128L192 434.7L233.4 393.3C245.9 380.8 266.2 380.8 278.7 393.3C291.2 405.8 291.2 426.1 278.7 438.6zM352 544C334.3 544 320 529.7 320 512C320 494.3 334.3 480 352 480L384 480C401.7 480 416 494.3 416 512C416 529.7 401.7 544 384 544L352 544zM352 416C334.3 416 320 401.7 320 384C320 366.3 334.3 352 352 352L448 352C465.7 352 480 366.3 480 384C480 401.7 465.7 416 448 416L352 416zM352 288C334.3 288 320 273.7 320 256C320 238.3 334.3 224 352 224L512 224C529.7 224 544 238.3 544 256C544 273.7 529.7 288 512 288L352 288zM352 160C334.3 160 320 145.7 320 128C320 110.3 334.3 96 352 96L576 96C593.7 96 608 110.3 608 128C608 145.7 593.7 160 576 160L352 160z`})})}var mV={selected:`_selected_gzoet_1`};function hV({value:e,onChange:t,options:n}){return(0,W.jsx)(Eu,{gap:16,children:n.map(n=>(0,W.jsx)(dy,{label:n.label,children:(0,W.jsx)(gu,{size:32,p:0,variant:`subtle`,className:wn({[mV.selected]:e===n.value}),onClick:()=>t(n.value),children:n.icon})},String(n.value)))})}function gV({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M2 18C2 16.4596 2 15.6893 2.34673 15.1235C2.54074 14.8069 2.80693 14.5407 3.12353 14.3467C3.68934 14 4.45956 14 6 14C7.54044 14 8.31066 14 8.87647 14.3467C9.19307 14.5407 9.45926 14.8069 9.65327 15.1235C10 15.6893 10 16.4596 10 18C10 19.5404 10 20.3107 9.65327 20.8765C9.45926 21.1931 9.19307 21.4593 8.87647 21.6533C8.31066 22 7.54044 22 6 22C4.45956 22 3.68934 22 3.12353 21.6533C2.80693 21.4593 2.54074 21.1931 2.34673 20.8765C2 20.3107 2 19.5404 2 18Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M14 18C14 16.4596 14 15.6893 14.3467 15.1235C14.5407 14.8069 14.8069 14.5407 15.1235 14.3467C15.6893 14 16.4596 14 18 14C19.5404 14 20.3107 14 20.8765 14.3467C21.1931 14.5407 21.4593 14.8069 21.6533 15.1235C22 15.6893 22 16.4596 22 18C22 19.5404 22 20.3107 21.6533 20.8765C21.4593 21.1931 21.1931 21.4593 20.8765 21.6533C20.3107 22 19.5404 22 18 22C16.4596 22 15.6893 22 15.1235 21.6533C14.8069 21.4593 14.5407 21.1931 14.3467 20.8765C14 20.3107 14 19.5404 14 18Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2 6C2 4.45956 2 3.68934 2.34673 3.12353C2.54074 2.80693 2.80693 2.54074 3.12353 2.34673C3.68934 2 4.45956 2 6 2C7.54044 2 8.31066 2 8.87647 2.34673C9.19307 2.54074 9.45926 2.80693 9.65327 3.12353C10 3.68934 10 4.45956 10 6C10 7.54044 10 8.31066 9.65327 8.87647C9.45926 9.19307 9.19307 9.45926 8.87647 9.65327C8.31066 10 7.54044 10 6 10C4.45956 10 3.68934 10 3.12353 9.65327C2.80693 9.45926 2.54074 9.19307 2.34673 8.87647C2 8.31066 2 7.54044 2 6Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M14 6C14 4.45956 14 3.68934 14.3467 3.12353C14.5407 2.80693 14.8069 2.54074 15.1235 2.34673C15.6893 2 16.4596 2 18 2C19.5404 2 20.3107 2 20.8765 2.34673C21.1931 2.54074 21.4593 2.80693 21.6533 3.12353C22 3.68934 22 4.45956 22 6C22 7.54044 22 8.31066 21.6533 8.87647C21.4593 9.19307 21.1931 9.45926 20.8765 9.65327C20.3107 10 19.5404 10 18 10C16.4596 10 15.6893 10 15.1235 9.65327C14.8069 9.45926 14.5407 9.19307 14.3467 8.87647C14 8.31066 14 7.54044 14 6Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}function _V({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088Z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2.5 9H21.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2.5 13H21.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2.5 17H21.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M12 21.5V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function vV(){let[e,t]=Wt({key:zT.TABLE_VIEW,defaultValue:`list`,getInitialValueInEffect:!1});return{viewType:e,isCardView:e===`grid`,setViewType:t}}function yV(){let{viewType:e,setViewType:t}=vV(),{_:n}=OM();return(0,W.jsx)(hV,{value:e,onChange:t,options:[{value:`list`,label:n({id:`mbM6E8`}),icon:(0,W.jsx)(_V,{})},{value:`grid`,label:n({id:`APYQPm`}),icon:(0,W.jsx)(gV,{})}]})}var bV={menuItem:`_menuItem_16isq_1`,menuItemSelected:`_menuItemSelected_16isq_5`,selectedSorting:`_selectedSorting_16isq_9`,cellWithCheckbox:`_cellWithCheckbox_16isq_13`,checkbox:`_checkbox_16isq_20`,checkboxInner:`_checkboxInner_16isq_24`};function xV({children:e,withSwitchActions:t=!0,...n}){let{_:r}=OM(),{title:i,isCardView:a,withSelection:o,withSingleSelection:s,loading:c,paginatedData:l=[],isCurrentPageSelected:u,isCurrentPageIndeterminate:d,renderFilterSection:f,sortState:p,sortOptions:m,toggleCurrentPage:h,handleSort:g}=hI(),[_,v]=(0,U.useState)(!1),[y,{toggle:b}]=nn(!1),x=p?.field??null,S=p?.direction??null,C=m&&m.length>0,w=m?.find(e=>e.value===x)?.label??null??r({id:`m1SiNS`}),T=e=>e===`asc`?(0,W.jsx)(fV,{width:20,height:20}):e===`desc`?(0,W.jsx)(pV,{width:20,height:20}):(0,W.jsx)(uV,{width:20,height:20}),E=e=>{if(!g)return;let t=`desc`;x===e&&(S===`desc`?t=`asc`:S===`asc`&&(t=`unsorted`)),g({field:e,direction:t})},D=()=>{v(e=>!e)},O=e=>{e.stopPropagation(),h()},k=y||x&&x!==`unsorted`,A=o&&!s&&a;return(0,W.jsxs)(Vy,{gap:16,mb:16,...n,children:[A&&i&&(0,W.jsx)(Yb,{order:3,children:i}),(0,W.jsxs)(Eu,{justify:A||i?`space-between`:`flex-end`,align:`flex-end`,children:[A?(0,W.jsxs)(q,{className:bV.cellWithCheckbox,onClick:O,children:[(0,W.jsx)(tm,{classNames:{root:bV.checkbox,inner:bV.checkboxInner},disabled:c||!l.length,checked:u,indeterminate:d,onChange:h}),(0,W.jsxs)(Xf,{fw:500,children:[r({id:`mCB6Je`}),` `]})]}):i&&(0,W.jsx)(Yb,{order:3,children:i}),(0,W.jsxs)(Eu,{gap:8,children:[e,f&&(0,W.jsx)(jm,{variant:`subtle`,size:`compact-md`,className:wn({[bV.selectedSorting]:_}),leftSection:(0,W.jsx)(dV,{}),onClick:D,children:r({id:`cSev+j`})}),C&&(0,W.jsxs)(eg,{position:`bottom-end`,width:175,onOpen:b,onClose:b,children:[(0,W.jsx)(eg.Target,{children:(0,W.jsx)(jm,{className:wn({[bV.selectedSorting]:k}),variant:`subtle`,size:`compact-md`,leftSection:T(S),children:w})}),(0,W.jsx)(eg.Dropdown,{p:2,children:m?.map(e=>{let t=x===e.value;return(0,W.jsx)(eg.Item,{classNames:{item:wn(bV.menuItem,{[bV.menuItemSelected]:t})},rightSection:t?T(S):null,onClick:()=>E(e.value),children:e.label},e.value)})})]}),t&&(0,W.jsx)(yV,{})]})]}),(0,W.jsx)(Ji,{expanded:_,children:f})]})}function SV({data:e,withClientPagination:t=!0,withServerPagination:n,page:r,pageSize:i,onPageChange:a,onPageSizeChange:o,totalPages:s,totalElements:c}){let[l,u]=(0,U.useState)(1),[d,f]=(0,U.useState)(CI.DEFAULT_PAGE_SIZE),p=a!==void 0||o!==void 0,m=n||p?r??1:l,h=n||p?i??CI.DEFAULT_PAGE_SIZE:d,g=wI.includes(h)?h:CI.DEFAULT_PAGE_SIZE,_=!n&&t,v=Math.max(1,Math.ceil(e.length/g)),y=n?s??1:v,b=Math.max(1,Math.min(m,y)),x=n?c??0:e.length;return{paginatedData:(0,U.useMemo)(()=>{if(n||!_)return e;let t=(b-1)*g,r=t+g;return e.slice(t,Math.min(r,e.length))},[e,b,g,_,n]),currentPage:b,totalPages:y,totalElements:x,handlePageChange:e=>{a?a(e):u(e)},handlePageSizeChange:e=>{o?o(e):(f(e),u(1))},pageSize:g}}var CV=/^\d{4}-\d{2}-\d{2}|^\d{2}[/.-]\d{2}[/.-]\d{4}|^\d{2}[/.-]\d{2}[/.-]\d{2}/,wV=/[^0-9.-]/g;function TV(e){return e instanceof Date?!0:typeof e==`string`?(0,Q.default)(e).isValid()&&CV.test(e):!1}function EV(e,t){return e-t}function DV(e,t){return(0,Q.default)(e).valueOf()-(0,Q.default)(t).valueOf()}function OV(e,t){let n=parseFloat(e.replace(wV,``)),r=parseFloat(t.replace(wV,``));return!isNaN(n)&&!isNaN(r)?n-r:e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function kV(e,t){return e==null&&t==null?0:e==null?1:t==null?-1:typeof e==`number`&&typeof t==`number`?EV(e,t):TV(e)&&TV(t)?DV(e,t):typeof e==`string`&&typeof t==`string`?OV(e,t):e<t?-1:+(e>t)}function AV(e,t){return t.split(`.`).reduce((e,t)=>{if(typeof e==`object`&&e&&t in e)return e[t]},e)}function jV({data:e,sorting:t,withServerSorting:n,onPageChange:r}){let[i,a]=(0,U.useState)(null),o=t?.sortState,s=t?.onServerSort,c=s===void 0?i:o??null,l=(0,U.useMemo)(()=>(t?.sortOptions??[]).map(e=>e.value),[t?.sortOptions]);return{sortedData:(0,U.useMemo)(()=>{if(n||!c)return e;let{field:t,direction:r}=c;return r===`unsorted`||l.length>0&&!l.includes(t)?e:[...e].sort((e,n)=>{let i=kV(t.includes(`.`)?AV(e,t):e[t],t.includes(`.`)?AV(n,t):n[t]);return r===`desc`?-i:i})},[e,c,l,n]),currentSortState:c,handleSortChange:e=>{let{field:t,direction:n}=e;l.length>0&&!l.includes(t)||(r?.(1),s?s(e):a(n===`unsorted`?null:e))}}}function MV({title:e,columns:t=[],containerProps:n,data:r=[],emptyStateDescription:i,emptyStateTitle:a,idKey:o,loading:s,onSelectionChange:c,withSelection:l,selection:u=[],withSingleSelection:d,externalViewType:f,onPageChange:p,onPageSizeChange:m,page:h,pageSize:g,totalElements:_,totalPages:v,withPagination:y=!0,withServerPagination:b,withCollapsible:x,isRowCollapsible:S,renderCollapsed:C,collapsedViewType:w,withMultipleCollapse:T=!0,withinModal:E,renderHeaderActions:D,withSwitchActions:O=!0,onRowClick:k,getRowUrl:A,renderFilterSection:j,sorting:M}){let{isCardView:N}=vV(),P=f?f===`grid`:N,ee=O&&f==null,[F,I]=(0,U.useState)(null),{sortedData:te,currentSortState:ne,handleSortChange:re}=jV({data:r,sorting:M,withServerSorting:b,onPageChange:p}),{paginatedData:ie,currentPage:L,totalPages:R,totalElements:ae,handlePageChange:oe,handlePageSizeChange:se,pageSize:ce}=SV({data:te,withClientPagination:!b,withServerPagination:b,page:h,pageSize:g,onPageChange:p,onPageSizeChange:m,totalPages:v,totalElements:_}),le=(e,t,n)=>{if(d){let n=u.some(t=>t[o]===e[o]);c?.(n?[]:[e]),I(n?null:t);return}if(n.shiftKey&&F!==null){let e=Math.min(F,t),n=Math.max(F,t),r=ie.slice(e,n+1),i=[...u.filter(e=>!r.some(t=>t[o]===e[o])),...r];c?.(i);return}let r=u.some(t=>t[o]===e[o])?u.filter(t=>t[o]!==e[o]):[...u,e];I(t),c?.(r)},ue=()=>{if(d)return;let e=ie.every(e=>u.some(t=>t[o]===e[o]))?u.filter(e=>!ie.some(t=>e[o]===t[o])):[...u,...ie.filter(e=>!u.some(t=>t[o]===e[o]))];c?.(e)},de=ie.length>0&&ie.every(e=>u.some(t=>t[o]===e[o])),z=u.length>0&&ie.some(e=>u.some(t=>t[o]===e[o]))&&!de,fe={title:e,columns:t,data:ie,emptyStateDescription:i,emptyStateTitle:a,idKey:o,loading:s,onRowClick:k,getRowUrl:A,renderCollapsed:C,collapsedViewType:w,renderHeaderActions:D,selection:u,isRowCollapsible:S,withCollapsible:x,withMultipleCollapse:T,withPagination:y,withSelection:l,withServerPagination:b,withSingleSelection:d,withinModal:E,isCardView:P,isEmpty:!ie.length,checked:de,indeterminate:z,onChange:ue,disabled:s||!ie.length,sortState:ne,sortOptions:M?.sortOptions,handleSort:re,paginatedData:ie,currentPage:L,totalPages:R,totalElements:ae,currentPageSize:ce,handlePageChange:oe,handlePageSizeChange:se,toggleRow:le,toggleCurrentPage:ue,isCurrentPageSelected:de,isCurrentPageIndeterminate:z,renderFilterSection:j};return(0,W.jsx)(mI.Provider,{value:fe,children:(0,W.jsxs)(q,{...n,className:wn(iV.container,n?.className),mod:{"within-modal":E},children:[(0,W.jsx)(xV,{withSwitchActions:ee,children:D?D({selection:u}):null}),(0,W.jsx)(U.Activity,{mode:fe.isEmpty&&!s?`visible`:`hidden`,children:(0,W.jsx)(lV,{title:a,description:i})}),P?(0,W.jsx)($B,{}):(0,W.jsx)(aV,{})]})})}var NV=MV;function PV({headers:e=[],rows:t=[]}){let n=t.map((e,t)=>{let n={id:t};return e.forEach((e,t)=>{n[`col${t}`]=e}),n}),r=e.map((e,t)=>({header:e,accessor:`col${t}`}));return n.length===0?null:(0,W.jsx)(NV,{idKey:`id`,data:n,columns:r,withPagination:!1,withSwitchActions:!1})}function FV({title:e,content:t,variant:n=`info`}){return(0,W.jsx)(Gf,{icon:(0,U.useMemo)(()=>{switch(n){case`success`:return(0,W.jsx)(kT,{});case`warning`:return(0,W.jsx)(jT,{});case`error`:return(0,W.jsx)(OT,{});default:return(0,W.jsx)(AT,{})}},[n]),title:e,color:{info:`blue`,success:`green`,warning:`yellow`,error:`red`}[n],radius:`md`,children:t})}var IV={actionButton:`_actionButton_fnn5s_1`,primaryActionButton:`_primaryActionButton_fnn5s_12`};function LV({actions:e,onActionClick:t}){return!e||e.length===0?null:(0,W.jsx)(Eu,{gap:`xs`,wrap:`wrap`,mt:`xs`,children:e.map((e,n)=>(0,W.jsx)(jm,{variant:n===0?`filled`:`outline`,size:`sm`,radius:`sm`,className:n===0?IV.primaryActionButton:IV.actionButton,onClick:()=>t?.({type:`action-click`,data:{buttonText:e.buttonText,agentMessage:e.agentMessage,targetAgent:e.targetAgent}}),children:e.buttonText},`${e.buttonText}-${n}`))})}function RV(e){return typeof e==`object`&&!!e}function zV(e){return typeof e==`object`&&!!e&&`responseList`in e}function BV(e){if(typeof e!=`object`||!e)return[];let t=e;if(!t?.activePlan?.details)return[];let n=t.activePlan.details,r={data:`Data`,voice:`Min`,sms:`SMS`};return[`data`,`voice`,`sms`].map(e=>{let t=n[e],i=typeof t==`string`?t:typeof t==`number`?String(t):`-`,a=i.trim().split(/\s+/),o=a.length>1?a.slice(0,-1).join(` `):i,s=a.length>1?a[a.length-1]:null;return{key:e,type:r[e]||e,amount:o,unit:s}})}function VV(e){if(!e)return{price:void 0,suffix:void 0};let t=e.price;if(!t)return{price:void 0,suffix:void 0};let n=t.discount??t.price;return{price:typeof n==`number`?`$${n.toFixed(2)}`:n,suffix:t.showMonthly===!1?void 0:`/mth`}}function HV(e,t){let n=zV(e)?e.responseList:void 0,r=VV(t);if(n&&n.length>1)return{overviewItems:n.map(e=>{let t=BV(e),n=RV(e)?e:void 0;return{billingAccountId:n?.billingAccountId,title:n?.activePlan?.planName,advantages:t,price:r.price,priceSuffix:r.suffix}}),isMultipleAccounts:!0};let i=n?.[0],a=BV(i),o=RV(i)?i:void 0;return{advantages:a,price:r.price,priceSuffix:r.suffix,accountData:o,isMultipleAccounts:!1}}function UV({config:e,onWidgetEvent:t}){let n=HV(e.data,e.visualizationConfig);return n.isMultipleAccounts?(0,W.jsx)(pI,{items:n.overviewItems,title:e.visualizationConfig?.title||`Select Account`,onSelectAccount:e=>{t?.({type:`select-account`,data:{billingAccountId:e}})}}):(0,W.jsx)(pI,{title:n.accountData?.activePlan?.planName||e.visualizationConfig?.title,advantages:n.advantages,price:n.price,priceSuffix:n.priceSuffix,ctaLabel:e.visualizationConfig?.cta?.label,onCtaClick:()=>{t?.({type:`cta-click`,data:{}})}})}function WV(e){return typeof e==`object`&&!!e&&`responseList`in e}function GV(e){return Array.isArray(e)&&e.length>0}function KV(e){switch(e.type){case`actions`:return GV(e.config.actions);case`chart`:case`usage-chart`:return GV(e.config.items);case`offer-card`:case`addon-card`:return GV(e.config.items)||WV(e.config.data);case`table`:return GV(e.config.items);case`highlight-box`:case`info-box`:return!!(e.config.visualizationConfig?.title||e.config.visualizationConfig?.content);case`overview-card`:case`account-overview`:return!!(WV(e.config.data)||e.config.visualizationConfig?.price||e.config.visualizationConfig?.cta||e.config.visualizationConfig?.title);default:return!0}}function qV(e,t){let n=qF(e);if(!n||!KV(n))return{kind:`fallback`,payload:e};switch(n.type){case`chart`:case`usage-chart`:return{kind:`widget`,widget:(0,W.jsx)(rI,{items:n.config.items,title:n.config.visualizationConfig?.title})};case`offer-card`:case`addon-card`:return{kind:`widget`,widget:(0,W.jsx)(oI,{items:WV(n.config.data)?n.config.data.responseList:n.config.items,title:n.config.visualizationConfig?.title,showPricing:n.config.visualizationConfig?.showPricing,onSelectOffer:e=>{t?.({type:`select-offer`,data:{offerId:e}})}})};case`overview-card`:case`account-overview`:return{kind:`widget`,widget:(0,W.jsx)(UV,{config:n.config,onWidgetEvent:t})};case`table`:return{kind:`widget`,widget:(0,W.jsx)(PV,{headers:n.config.visualizationConfig?.headers,rows:n.config.items})};case`highlight-box`:case`info-box`:return{kind:`widget`,widget:(0,W.jsx)(FV,{title:n.config.visualizationConfig?.title,content:n.config.visualizationConfig?.content,variant:n.config.visualizationConfig?.variant})};case`actions`:return{kind:`widget`,widget:(0,W.jsx)(LV,{actions:n.config.actions,onActionClick:t})};default:return{kind:`fallback`,payload:e}}}var JV=e=>e!=null&&(typeof e!=`string`||e.trim()!==``);function YV(e){if(typeof e!=`object`||!e)return!1;let t=Object.values(e);return t.length===0?!1:t.some(JV)}function XV(e){return e.replace(/(?:\r?\n)?\s*(?:'{3}|"{3}|`{3})\s*$/i,``).replace(/(?:\r?\n)?\s*(?:'{3}|"{3}|`{3})\s*json\s*(?:'{3}|"{3}|`{3})?\s*$/i,``).trimEnd()}function ZV(e){return e.replace(/\s*"structuredData"\s*:\s*$/i,``).replace(/\s*\\"structuredData\\"\s*:\s*$/i,``).trimEnd()}function QV(e){return e.replace(/\\r\\n/g,`
|
|
377
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${jF(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=MF(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+jF(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=MF(e);if(i===null)return jF(n);e=i;let a=`<img src="${e}" alt="${jF(n)}"`;return t&&(a+=` title="${jF(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:jF(e.text)}},HF=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},UF=class e{options;renderer;textRenderer;constructor(e){this.options=e||hP,this.options.renderer=this.options.renderer||new VF,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new HF}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},WF=class{options;block;constructor(e){this.options=e||hP}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?BF.lex:BF.lexInline}provideParser(){return this.block?UF.parse:UF.parseInline}},GF=new class{defaults=mP();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=UF;Renderer=VF;TextRenderer=HF;Lexer=BF;Tokenizer=zF;Hooks=WF;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new VF(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new zF(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new WF;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];WF.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&WF.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return BF.lex(e,t??this.defaults)}parser(e,t){return UF.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?BF.lex:BF.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?UF.parse:UF.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?BF.lex:BF.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?UF.parse:UF.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
378
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+jF(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function KF(e,t){return GF.parse(e,t)}KF.options=KF.setOptions=function(e){return GF.setOptions(e),KF.defaults=GF.defaults,gP(KF.defaults),KF},KF.getDefaults=mP,KF.defaults=hP,KF.use=function(...e){return GF.use(...e),KF.defaults=GF.defaults,gP(KF.defaults),KF},KF.walkTokens=function(e,t){return GF.walkTokens(e,t)},KF.parseInline=GF.parseInline,KF.Parser=UF,KF.parser=UF.parse,KF.Renderer=VF,KF.TextRenderer=HF,KF.Lexer=BF,KF.lexer=BF.lex,KF.Tokenizer=zF,KF.Hooks=WF,KF.parse=KF,KF.options,KF.setOptions,KF.use,KF.walkTokens,KF.parseInline,UF.parse,BF.lex;function qF(e){let t=e.trim().toLowerCase();switch(t){case`usage-chart`:return`usage-chart`;case`chart`:return`chart`;case`offer-card`:case`addon-card`:return t;case`overview-card`:case`account-overview`:return t;case`card`:return`overview-card`;case`table`:return`table`;case`highlightbox`:case`highlight-box`:return`highlight-box`;case`info-box`:return`info-box`;case`actions`:return`actions`;default:return null}}function JF(e){let t=qF(e.type);if(!t)return null;switch(t){case`chart`:case`usage-chart`:return{type:t,config:e};case`offer-card`:case`addon-card`:return{type:t,config:e};case`overview-card`:case`account-overview`:return{type:t,config:e};case`table`:return{type:t,config:e};case`highlight-box`:case`info-box`:return{type:t,config:e};case`actions`:return{type:t,config:e};default:return null}}var YF={root:`_root_1o6c0_1`,header:`_header_1o6c0_17`};function XF({children:e,className:t,...n}){return(0,W.jsx)(q,{className:wn(YF.header,t),...n,children:e})}function ZF({children:e,withBorder:t=!0,withShadow:n=!0,className:r,mod:i,variant:a=`default`,...o}){let s=i;return(0,W.jsx)(q,{className:wn(YF.root,r),p:24,mod:{...s,bordered:t,shadow:n,variant:a},...o,children:e})}ZF.Header=XF;function QF({...e}){return(0,W.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,W.jsx)(`path`,{d:`M3.77762 11.9424C2.8296 10.2893 2.37185 8.93948 2.09584 7.57121C1.68762 5.54758 2.62181 3.57081 4.16938 2.30947C4.82345 1.77638 5.57323 1.95852 5.96 2.6524L6.83318 4.21891C7.52529 5.46057 7.87134 6.08139 7.8027 6.73959C7.73407 7.39779 7.26737 7.93386 6.33397 9.00601L3.77762 11.9424ZM3.77762 11.9424C5.69651 15.2883 8.70784 18.3013 12.0576 20.2224M12.0576 20.2224C13.7107 21.1704 15.0605 21.6282 16.4288 21.9042C18.4524 22.3124 20.4292 21.3782 21.6905 19.8306C22.2236 19.1766 22.0415 18.4268 21.3476 18.04L19.7811 17.1668C18.5394 16.4747 17.9186 16.1287 17.2604 16.1973C16.6022 16.2659 16.0661 16.7326 14.994 17.666L12.0576 20.2224Z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M14 6.83185C15.4232 7.43624 16.5638 8.57677 17.1682 10M14.654 2C18.1912 3.02076 20.9791 5.80852 22 9.34563`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function $F({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.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,W.jsx)(`path`,{d:`M12 22C14.2091 22 16 17.5228 16 12C16 6.47715 14.2091 2 12 2C9.79086 2 8 6.47715 8 12C8 17.5228 9.79086 22 12 22Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2 12H22`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function eI({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M8 13.5H16M8 8.5H12`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M6.09881 19C4.7987 18.8721 3.82475 18.4816 3.17157 17.8284C2 16.6569 2 14.7712 2 11V10.5C2 6.72876 2 4.84315 3.17157 3.67157C4.34315 2.5 6.22876 2.5 10 2.5H14C17.7712 2.5 19.6569 2.5 20.8284 3.67157C22 4.84315 22 6.72876 22 10.5V11C22 14.7712 22 16.6569 20.8284 17.8284C19.6569 19 17.7712 19 14 19C13.4395 19.0125 12.9931 19.0551 12.5546 19.155C11.3562 19.4309 10.2465 20.0441 9.14987 20.5789C7.58729 21.3408 6.806 21.7218 6.31569 21.3651C5.37769 20.6665 6.29454 18.5019 6.5 17.5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}var tI={data:$F,voice:QF,sms:eI},nI=e=>tI[e.toLowerCase()]||tI.data;function rI(){return{getPercent:e=>{if(e.percentUsed!=null&&Number.isFinite(e.percentUsed))return Math.max(0,Math.min(100,Math.round(e.percentUsed)));if(!Number.isFinite(e.total)||e.total<=0)return 0;let t=e.used/e.total*100;return Number.isFinite(t)?Math.max(0,Math.min(100,Math.round(t))):0},getColor:e=>{switch(e.toLowerCase()){case`data`:return`blue`;case`voice`:return`violet`;case`sms`:return`green`;default:return`blue`}},getShortLabel:e=>{let t=(e.key??``).toLowerCase();return t===`data`?`Data`:t===`voice`?`Voice`:t===`sms`?`SMS`:e.label?.trim()?e.label.trim():e.key?e.key.charAt(0).toUpperCase()+e.key.slice(1):`Usage`},getIcon:nI}}function iI({items:e=[],title:t}){let{getPercent:n,getColor:r,getShortLabel:i,getIcon:a}=rI();return(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,children:(0,W.jsxs)(Vy,{gap:`md`,children:[t&&(0,W.jsx)(Xf,{size:`lg`,fw:600,children:t}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`md`,children:e.map(e=>{let t=n(e),o=r(e.key),s=i(e);return(0,W.jsxs)(Eu,{gap:`md`,wrap:`nowrap`,children:[(0,W.jsx)(yy,{size:80,thickness:10,sections:[{value:t,color:o}],label:(0,W.jsxs)(Xf,{size:`sm`,ta:`center`,fw:600,children:[t,`%`]})}),(0,W.jsxs)(Vy,{gap:4,style:{flex:1},children:[(0,W.jsxs)(Eu,{gap:`xs`,children:[(0,W.jsx)(Hb,{color:o,variant:`light`,size:`sm`,children:U.createElement(a(e.key))}),(0,W.jsx)(Xf,{size:`sm`,fw:500,children:s})]}),(0,W.jsxs)(Eu,{gap:4,children:[(0,W.jsx)(Xf,{size:`sm`,children:e.used}),(0,W.jsxs)(Xf,{size:`sm`,c:`dimmed`,children:[`/ `,e.total,` `,e.unit]})]})]})]},e.key)})})]})})}var aI={offerCardButton:`_offerCardButton_1og3p_1`,"offerCardButton--clickable":`_offerCardButton--clickable_1og3p_6`};function oI({item:e,index:t,showPricing:n,onSelect:r}){let i=!!e.offerId;return(0,W.jsx)(dl,{className:`${aI.offerCardButton} ${i?aI.offerCardButtonClickable:``}`,onClick:()=>r(e.offerId),disabled:!i,children:(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,p:16,h:`100%`,children:(0,W.jsxs)(Vy,{gap:`sm`,h:`100%`,children:[(0,W.jsx)(Xf,{size:`md`,fw:600,lineClamp:2,children:e.name||`Addon`}),e.description&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,lineClamp:2,children:e.description}),e.dataAmount&&(0,W.jsx)(Xf,{size:`sm`,fw:500,children:e.dataAmount}),n&&e.price&&(0,W.jsx)(Xf,{size:`lg`,fw:600,c:`blue`,children:e.price}),e.chargeType&&(0,W.jsx)(Xf,{size:`xs`,c:`dimmed`,children:e.chargeType})]})})},e.offerId||t)}function sI({items:e=[],title:t=`Available Addons`,showPricing:n=!0,onSelectOffer:r}){let i=e=>{e&&r?.(e)};return(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,children:t}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`md`,children:e.map((e,t)=>(0,W.jsx)(oI,{item:e,index:t,showPricing:n,onSelect:i},e.offerId||t))})]})})}function cI(e){return e===`xs`||e===`sm`||e===`md`||e===`lg`||e===`xl`}function lI(e){return e===`icon-xs`||e===`icon-sm`||e===`icon-md`||e===`icon-lg`||e===`icon-xl`}function uI(e){if(e==null)return{};if(typeof e==`number`)return{width:e,height:e};if(cI(e)){let t=Lj[`icon-${e}`];return{width:t,height:t}}if(lI(e)){let t=Lj[e];return{width:t,height:t}}return{width:e,height:e}}function dI({advantage:e}){let{getIcon:t}=rI();return(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,p:16,children:(0,W.jsxs)(Eu,{gap:`sm`,wrap:`nowrap`,children:[(0,W.jsx)(Hb,{variant:`light`,size:`sm`,children:(0,U.createElement)(t(e.key),uI(`sm`))}),(0,W.jsxs)(Vy,{gap:4,style:{flex:1,minWidth:0},children:[(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,truncate:!0,children:e.type}),(0,W.jsxs)(Eu,{gap:4,wrap:`nowrap`,children:[(0,W.jsx)(Xf,{size:`md`,fw:600,truncate:!0,children:e.amount}),e.unit&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,truncate:!0,children:e.unit})]})]})]})})}function fI({price:e,priceSuffix:t,withCta:n,ctaLabel:r,onCtaClick:i}){return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Jm,{}),(0,W.jsxs)(Eu,{justify:n?`space-between`:`flex-start`,align:`center`,children:[(0,W.jsxs)(Eu,{gap:`xs`,children:[(0,W.jsx)(Xf,{size:`xl`,fw:600,c:`primary`,children:e}),t&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,children:t})]}),n&&i&&(0,W.jsx)(Xf,{size:`md`,fw:600,c:`primary`,style:{cursor:`pointer`},onClick:i,children:r})]})]})}function pI({item:e,onSelectAccount:t}){let n=!!e.billingAccountId;return(0,W.jsx)(dl,{style:{cursor:n?`pointer`:`default`,transition:`all 0.15s ease`,height:`100%`},onClick:()=>t(e.billingAccountId),onMouseEnter:e=>{n&&(e.currentTarget.style.transform=`translateY(-2px)`)},onMouseLeave:e=>{n&&(e.currentTarget.style.transform=``)},children:(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,p:24,style:{height:`100%`},children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,c:`primary`,children:e.title||`Account Details`}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`sm`,children:e.advantages?.map(e=>(0,W.jsx)(dI,{advantage:e},e.key))}),e.price&&(0,W.jsx)(fI,{price:e.price,priceSuffix:e.priceSuffix})]})})})}function mI({items:e,title:t=`Details`,advantages:n=[],price:r,priceSuffix:i,ctaLabel:a=`Order Now`,onCtaClick:o,onSelectAccount:s}){let c=e=>{e&&s?.(e)};return e&&e.length>0?(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,children:t}),(0,W.jsx)(Py,{cols:{base:1,md:2},spacing:`md`,children:e.map((e,t)=>(0,W.jsx)(pI,{item:e,onSelectAccount:c},e.billingAccountId||t))})]})}):(0,W.jsx)(ZF,{withBorder:!0,withShadow:!0,p:24,children:(0,W.jsxs)(Vy,{gap:`md`,children:[(0,W.jsx)(Xf,{size:`lg`,fw:600,c:`primary`,children:t}),(0,W.jsx)(Py,{cols:{base:1,sm:2},spacing:`sm`,children:n.map(e=>(0,W.jsx)(dI,{advantage:e},e.key))}),r&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Jm,{}),(0,W.jsxs)(Eu,{justify:`space-between`,align:`center`,children:[(0,W.jsxs)(Eu,{gap:`xs`,children:[(0,W.jsx)(Xf,{size:`xl`,fw:600,c:`primary`,children:r}),i&&(0,W.jsx)(Xf,{size:`sm`,c:`dimmed`,children:i})]}),o&&(0,W.jsx)(jm,{onClick:o,size:`md`,children:a})]})]})]})})}var hI=(0,U.createContext)(void 0);function gI(){let e=(0,U.useContext)(hI);if(!e)throw Error(`VTableContext must be used within a VTable component`);return e}function _I({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,W.jsx)(`path`,{d:`M6 15L12 9L18 15`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function vI(e,t,n){return{handleClick:n=>{let r=window.getSelection(),i=r&&r.toString().trim().length>0;n.button===0&&t&&!i&&t(e)},handleMouseDown:t=>{if(t.button===1&&n){t.preventDefault();let r=n(e);r&&window.open(``+r,`_blank`)}}}}var yI={row:`_row_ze3zx_1`,arrow:`_arrow_ze3zx_26`,header:`_header_ze3zx_36`};function bI({column:e,row:t}){let n=(e,t)=>{if(t.render)return t.render(e,0);if(Array.isArray(t.accessor))return t.accessor.map(t=>e[t]).join(` `);if(t.accessor){let n=e[t.accessor];return n?String(n):`-`}return`-`},r=!!e.header,i=n(t,e),a=typeof i==`string`;return(0,W.jsxs)(W.Fragment,{children:[r&&(0,W.jsxs)(Xf,{className:yI.header,children:[e.header,`:`]}),(0,W.jsx)(Xf,{component:`span`,lineClamp:1,fw:500,truncate:!0,title:a?i:void 0,children:i})]})}function xI({row:e,columns:t}){let{onRowClick:n}=gI();return(0,W.jsxs)(q,{className:yI.row,mod:{clickable:!!n},children:[t.map((t,n)=>(0,W.jsx)(Vy,{justify:t.header?`flex-start`:`center`,flex:1,children:(0,W.jsx)(bI,{column:t,row:e})},n)),n&&(0,W.jsx)(q,{className:yI.arrow,children:(0,W.jsx)(gu,{variant:`transparent`,children:(0,W.jsx)(tA,{})})})]})}var SI={row:`_row_1jau4_1`,box:`_box_1jau4_10`,checkboxWrapper:`_checkboxWrapper_1jau4_38`,collapseWrapper:`_collapseWrapper_1jau4_52`,collapse:`_collapse_1jau4_52`,collapseContent:`_collapseContent_1jau4_75`};function CI(){let{idKey:e,paginatedData:t=[],columns:n=[],withSelection:r,selection:i=[],loading:a,toggleRow:o,withCollapsible:s,isRowCollapsible:c,withMultipleCollapse:l=!0,renderCollapsed:u,onRowClick:d,getRowUrl:f}=gI(),[p,m]=U.useState({}),[h,g]=U.useState({}),_=e=>{g(t=>({...t,[e]:!0})),m(t=>l?{...t,[e]:!t[e]}:{[e]:!t[e]})};return a&&t.length===0?(0,W.jsx)(Vy,{gap:16,children:Array.from({length:3}).map((e,t)=>(0,W.jsx)(Ly,{height:64,radius:`md`},`loading-${t}`))}):(0,W.jsx)(Vy,{className:SI.row,children:t.map((t,a)=>{let l=i.some(n=>n[e]===t[e]),m=t[e],g=typeof m==`string`||typeof m==`number`?m:a,v=p[g]||!1,y=v||h[g],b=s&&(c?c(t,a):!0),{handleClick:x,handleMouseDown:S}=vI(t,d,f);return(0,W.jsxs)(q,{className:SI.box,mod:{"with-selection":r,"with-collapse":b,"is-expanded":v,selected:l},onClick:x,onMouseDown:S,children:[b&&(0,W.jsx)(dl,{className:SI.collapseWrapper,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),_(g)},children:v?(0,W.jsx)(_I,{width:20,height:20}):(0,W.jsx)(DO,{width:20,height:20})}),r&&(0,W.jsx)(Eu,{className:SI.checkboxWrapper,onClick:e=>{e.stopPropagation(),o(t,a,e)},align:`center`,children:(0,W.jsx)(tm,{checked:l,readOnly:!0})}),(0,W.jsx)(xI,{row:t,columns:n}),b&&u&&(0,W.jsx)(Ji,{expanded:v,className:SI.collapse,children:y?(0,W.jsx)(q,{className:SI.collapseContent,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation()},children:u(t,a,{view:`card`})}):null})]},a)})})}var wI={DEFAULT_ALL_DATA_PAGE_SIZE:200,DEFAULT_INITIAL_PAGE:1,DEFAULT_PAGE_SIZE:10},TI=[5,10,20,50,100,200];function EI(e,t){return Array.isArray(e)?e.includes(t):e===t}function DI(e){if(!e.length)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function OI(e,t=new Set){if(Array.isArray(e))for(let n of e)if(nm(n))OI(n.items,t);else{if(n.value===void 0)throw Error(`Each option must have value property`);if(typeof n.value!=`string`)throw Error(`Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(t.has(n.value))throw Error(`Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}var kI=0,AI=1,jI=2,MI=4;function NI(e){return()=>e}function PI(e){e()}function FI(e,t){return n=>e(t(n))}function II(e,t){return()=>e(t)}function LI(e,t){return n=>e(t,n)}function RI(e){return e!==void 0}function zI(...e){return()=>{e.map(PI)}}function BI(){}function VI(e,t){return t(e),e}function HI(e,t){return t(e)}function UI(...e){return e}function WI(e,t){return e(AI,t)}function GI(e,t){e(kI,t)}function KI(e){e(jI)}function qI(e){return e(MI)}function JI(e,t){return WI(e,LI(t,kI))}function YI(e,t){let n=e(AI,e=>{n(),t(e)});return n}function XI(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function ZI(e,t){return e===t}function QI(e=ZI){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function $I(e){return t=>n=>{e(n)&&t(n)}}function eL(e){return t=>FI(t,e)}function tL(e){return t=>()=>{t(e)}}function $(e,...t){let n=oL(...t);return((t,r)=>{switch(t){case jI:KI(e);return;case AI:return WI(e,n(r))}})}function nL(e,t){return n=>r=>{n(t=e(t,r))}}function rL(e){return t=>n=>{e>0?e--:t(n)}}function iL(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function aL(...e){let t=Array(e.length),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;WI(e,e=>{let s=n;n|=o,t[a]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{let o=()=>{e([a].concat(t))};n===i?o():r=o}}function oL(...e){return t=>e.reduceRight(HI,t)}function sL(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case AI:return a?n===a?void 0:(r(),n=a,t=WI(e,a),t):(r(),BI);case jI:r(),n=null;return}}}function cL(e){let t=e,n=uL();return((e,r)=>{switch(e){case kI:t=r;break;case AI:r(t);break;case MI:return t}return n(e,r)})}function lL(e,t){return VI(cL(t),t=>JI(e,t))}function uL(){let e=[];return((t,n)=>{switch(t){case kI:e.slice().forEach(e=>{e(n)});return;case jI:e.splice(0,e.length);return;case AI:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function dL(e){return VI(uL(),t=>JI(e,t))}function fL(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:pL(),singleton:n}}var pL=()=>Symbol();function mL(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);let o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}function hL(...e){let t=uL(),n=Array(e.length),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;WI(e,e=>{n[a]=e,r|=o,r===i&&GI(t,n)})}),function(e,a){switch(e){case jI:KI(t);return;case AI:return r===i&&a(n),WI(t,a)}}}function gL(e,t=ZI){return $(e,QI(t))}function _L(...e){return function(t,n){switch(t){case jI:return;case AI:return zI(...e.map(e=>WI(e,n)))}}}var vL={DEBUG:0,INFO:1,WARN:2,ERROR:3},yL={[vL.DEBUG]:`debug`,[vL.ERROR]:`error`,[vL.INFO]:`log`,[vL.WARN]:`warn`},bL=()=>typeof globalThis>`u`?window:globalThis,xL=fL(()=>{let e=cL(vL.ERROR);return{log:cL((t,n,r=vL.INFO)=>{r>=(bL().VIRTUOSO_LOG_LEVEL??qI(e))&&console[yL[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0});function SL(e,t,n){return CL(e,t,n).callbackRef}function CL(e,t,n){let r=U.useRef(null),i=e=>{},a=U.useMemo(()=>typeof ResizeObserver<`u`?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;n.offsetParent!==null&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return i=e=>{e&&t?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:i,ref:r}}function wL(e,t,n,r,i,a,o,s,c){return CL(U.useCallback(n=>{let c=TL(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;l.dataset.virtuosoScroller===void 0;)l=l.parentElement;let u=l.lastElementChild.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollLeft:o.scrollTop:u?s?d.scrollX||d.document.documentElement.scrollLeft:d.scrollY||d.document.documentElement.scrollTop:s?l.scrollLeft:l.scrollTop,p=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,m=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight;r({scrollHeight:p,scrollTop:Math.max(f,0),viewportHeight:m}),a?.(s?EL(`column-gap`,getComputedStyle(n).columnGap,i):EL(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function TL(e,t,n,r){let i=e.length;if(i===0)return null;let a=[];for(let o=0;o<i;o++){let i=e.item(o);if(i.dataset.index===void 0)continue;let s=parseInt(i.dataset.index),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},vL.ERROR),l===c)continue;let u=a[a.length-1];a.length===0||u.size!==l||u.endIndex!==s-1?a.push({endIndex:s,size:l,startIndex:s}):a[a.length-1].endIndex++}return a}function EL(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,vL.WARN),t===`normal`?0:parseInt(t??`0`,10)}function DL(e,t,n){let r=U.useRef(null),i=U.useCallback(n=>{if(!n?.offsetParent)return;let i=n.getBoundingClientRect(),a=i.width,s,c;if(t){let e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),s=n+t.scrollTop}else{let e=o.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),s=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=CL(i,!0,n),s=U.useCallback(()=>{i(o.current)},[i,o]);return U.useEffect(()=>{if(t){t.addEventListener(`scroll`,s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener(`scroll`,s),e.unobserve(t)}}let e=o.current?.ownerDocument.defaultView;return e?.addEventListener(`scroll`,s),e?.addEventListener(`resize`,s),()=>{e?.removeEventListener(`scroll`,s),e?.removeEventListener(`resize`,s)}},[s,t,o]),a}var OL=fL(()=>{let e=uL(),t=uL(),n=cL(0),r=uL(),i=cL(0),a=uL(),o=uL(),s=cL(0),c=cL(0),l=cL(0),u=cL(0),d=uL(),f=uL(),p=cL(!1),m=cL(!1),h=cL(!1);return JI($(e,eL(({scrollTop:e})=>e)),t),JI($(e,eL(({scrollHeight:e})=>e)),o),JI(t,i),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),kL={lvl:0};function AL(e,t){let n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]),a=[];for(let o=1;o<n;o++){let{index:n,value:s}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=s}return a.push({end:1/0,start:r,value:i}),a}function jL(e){return e===kL}function ML(e,t){if(!jL(e))return t===e.k?e.v:t<e.k?ML(e.l,t):ML(e.r,t)}function NL(e,t,n=`k`){if(jL(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=NL(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return NL(e.l,t,n)}function PL(e,t,n){return jL(e)?GL(t,n,1):t===e.k?VL(e,{k:t,v:n}):t<e.k?KL(VL(e,{l:PL(e.l,t,n)})):KL(VL(e,{r:PL(e.r,t,n)}))}function FL(){return kL}function IL(e,t,n){if(jL(e))return[];let r=NL(e,t)[0];return YL(zL(e,r,n))}function LL(e,t){if(jL(e))return kL;let{k:n,l:r,r:i}=e;if(t===n){if(jL(r))return i;if(jL(i))return r;let[t,n]=WL(r);return BL(VL(e,{k:t,l:HL(r),v:n}))}return BL(t<n?VL(e,{l:LL(r,t)}):VL(e,{r:LL(i,t)}))}function RL(e){return jL(e)?[]:[...RL(e.l),{k:e.k,v:e.v},...RL(e.r)]}function zL(e,t,n){if(jL(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(zL(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(zL(a,t,n))),s}function BL(e){let{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(UL(t))return qL(VL(e,{lvl:n-1}));if(!jL(t)&&!jL(t.r))return VL(t.r,{l:VL(t,{r:t.r.l}),lvl:n,r:VL(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(UL(e))return JL(VL(e,{lvl:n-1}));if(!jL(r)&&!jL(r.l)){let t=r.l,i=UL(t)?r.lvl-1:r.lvl;return VL(t,{l:VL(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:JL(VL(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function VL(e,t){return GL(t.k===void 0?e.k:t.k,t.v===void 0?e.v:t.v,t.lvl===void 0?e.lvl:t.lvl,t.l===void 0?e.l:t.l,t.r===void 0?e.r:t.r)}function HL(e){return jL(e.r)?e.l:BL(VL(e,{r:HL(e.r)}))}function UL(e){return jL(e)||e.lvl>e.r.lvl}function WL(e){return jL(e.r)?[e.k,e.v]:WL(e.r)}function GL(e,t,n,r=kL,i=kL){return{k:e,l:r,lvl:n,r:i,v:t}}function KL(e){return JL(qL(e))}function qL(e){let{l:t}=e;return!jL(t)&&t.lvl===e.lvl?VL(t,{r:VL(e,{l:t.r})}):e}function JL(e){let{lvl:t,r:n}=e;return!jL(n)&&!jL(n.r)&&n.lvl===t&&n.r.lvl===t?VL(n,{l:VL(e,{r:n.l}),lvl:t+1}):e}function YL(e){return AL(e,({k:e,v:t})=>({index:e,value:t}))}function XL(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function ZL(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var QL=fL(()=>({recalcInProgress:cL(!1)}),[],{singleton:!0});function $L(e,t,n){return e[eR(e,t,n)]}function eR(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw Error(`Failed binary finding record in array - ${e.join(`,`)}, searched for ${t}`)}function tR(e,t,n,r){let i=eR(e,t,r),a=eR(e,n,r,i);return e.slice(i,a+1)}function nR(e,t){return Math.round(e.getBoundingClientRect()[t])}function rR(e){return!jL(e.groupOffsetTree)}function iR({index:e},t){return t===e?0:t<e?-1:1}function aR(){return{groupIndices:[],groupOffsetTree:FL(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:FL()}}function oR(e,t){let n=jL(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),jL(e)){e=PL(e,0,i);continue}let o=IL(e,a-1,t+1);if(o.some(vR(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=LL(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=PL(e,t+1,a));c&&(e=PL(e,a,i))}return[e,n]}function sR(e){return typeof e.groupIndex<`u`}function cR({offset:e},t){return t===e?0:t<e?-1:1}function lR(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=$L(t,e,iR),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function uR(e,t){if(!rR(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function dR(e,t,n){if(sR(e))return t.groupIndices[e.groupIndex]+1;let r=uR(e.index===`LAST`?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}function fR(e,t,n,r=0){return r>0&&(t=Math.max(t,$L(e,r,iR).offset)),AL(tR(e,t,n,cR),_R)}function pR(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,vL.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&jL(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>PL(PL(t,n,e),n+1,r),o)}else [o,s]=oR(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=gR(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>PL(e,t,lR(t,d,i)),FL()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function mR(e){return RL(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i===void 0?1/0:i.k-1,size:t,startIndex:e}})}function hR(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function gR(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t!==0){c=eR(i,t-1,iR),s=i[c].offset;let e=NL(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===NL(n,t)[1]&&--c,i=i.slice(0,c+1)}else i=[];for(let{start:e,value:c}of IL(n,t,1/0)){let t=e-a,n=t*o+s+t*r;i.push({index:e,offset:n,size:c}),a=e,s=n,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function _R(e){return{index:e.index,value:e}}function vR(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}var yR={offsetHeight:`height`,offsetWidth:`width`},bR=fL(([{log:e},{recalcInProgress:t}])=>{let n=uL(),r=uL(),i=lL(r,0),a=uL(),o=uL(),s=cL(0),c=cL([]),l=cL(void 0),u=cL(void 0),d=cL(void 0),f=cL(void 0),p=cL((e,t)=>nR(e,yR[t])),m=cL(void 0),h=cL(0),g=aR(),_=lL($(n,aL(c,e,h),nL(pR,g),QI()),g),v=lL($(c,QI(),nL((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),eL(({prev:e})=>e)),[]);JI($(c,$I(e=>e.length>0),aL(_,h),eL(([e,t,n])=>{let r=e.reduce((e,r,i)=>PL(e,r,lR(r,t.offsetTree,n)||i),FL());return{...t,groupIndices:e,groupOffsetTree:r}})),_),JI($(r,aL(_),$I(([e,{lastIndex:t}])=>e<t),eL(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),JI(l,u);let y=lL($(l,eL(e=>e===void 0)),!0);JI($(u,$I(e=>e!==void 0&&jL(qI(_).sizeTree)),eL(e=>{let t=qI(d),n=qI(c).length>0;return t!==void 0&&t!==0?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),JI($(f,$I(e=>e!==void 0&&e.length>0&&jL(qI(_).sizeTree)),eL(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),JI($(c,aL(d,u),$I(([,e,t])=>e!==void 0&&t!==void 0),eL(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),o!==void 0&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);let b=dL($(n,aL(_),nL(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),eL(e=>e.changed)));WI($(s,nL((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),eL(e=>e.diff)),e=>{let{groupIndices:n}=qI(_);if(e>0)GI(t,!0),GI(a,e+hR(e,n));else if(e<0){let t=qI(v);t.length>0&&(e-=hR(-e,t)),GI(o,e)}}),WI($(s,aL(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},vL.ERROR)});let x=dL(a);JI($(a,aL(_),eL(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=ML(t.sizeTree,0),a=0,o=0;for(;a<e;){let e=t.groupIndices[o],s=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),o++,a+=s+1}let s=RL(t.sizeTree);return a!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return t.prevSize!==0&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return RL(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=dL($(o,aL(_,h),eL(([e,{offsetTree:t},n])=>lR(-e,t,n))));return JI($(o,aL(_,h),eL(([e,t,n])=>{if(t.groupIndices.length>0){if(jL(t.sizeTree))return t;let r=FL(),i=qI(v),a=0,o=0,s=0;for(;a<-e;){s=i[o];let e=i[o+1]-s-1;o++,a+=e+1}if(r=RL(t.sizeTree).reduce((t,{k:n,v:r})=>PL(t,Math.max(0,n+e),r),r),a!==-e){let n=ML(t.sizeTree,s);r=PL(r,0,n);let i=NL(t.sizeTree,-e+1)[1];r=PL(r,1,i)}return{...t,sizeTree:r,...gR(t.offsetTree,0,r,n)}}let r=RL(t.sizeTree).reduce((t,{k:n,v:r})=>PL(t,Math.max(0,n+e),r),FL());return{...t,sizeTree:r,...gR(t.offsetTree,0,r,n)}})),_),{beforeUnshiftWith:x,data:m,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,fixedGroupSize:d,gap:h,groupIndices:c,heightEstimates:f,itemSize:p,listRefresh:b,shiftWith:o,shiftWithOffset:S,sizeRanges:n,sizes:_,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:a}},UI(xL,QL),{singleton:!0});function xR(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var SR=fL(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=uL(),o=uL(),s=dL($(a,eL(xR)));return JI($(s,eL(e=>e.totalCount)),n),JI($(s,eL(e=>e.groupIndices)),e),JI($(hL(i,t,r),$I(([e,t])=>rR(t)),eL(([e,t,n])=>NL(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),QI(),eL(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},UI(bR,OL)),CR=fL(([{log:e}])=>{let t=cL(!1),n=dL($(t,$I(e=>e),QI()));return WI(t,t=>{t&&qI(e)(`props updated`,{},vL.DEBUG)}),{didMount:n,propsReady:t}},UI(xL),{singleton:!0}),wR=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function TR(e){let t=typeof e==`number`?{index:e}:e;return t.align||=`start`,(!t.behavior||!wR)&&(t.behavior=`auto`),t.offset===void 0&&(t.offset=0),t}var ER=fL(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{let p=uL(),m=uL(),h=cL(0),g=null,_=null,v=null;function y(){g!==null&&(g(),g=null),v!==null&&(v(),v=null),_&&=(clearTimeout(_),null),GI(c,!1)}return JI($(p,aL(n,d,r,h,s,o,f),aL(e,a,i),eL(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=TR(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=dR(b,n,w),E=lR(T,n.offsetTree,d)+o;x===`end`?(E+=f+NL(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+NL(n.sizeTree,T)[1]-r+h)/2:E-=a,C!==void 0&&C!==0&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},vL.DEBUG),GI(p,e)):(GI(m,!0),l(`list did not change, scroll successful`,{},vL.DEBUG))};if(y(),S===`smooth`){let e=!1;v=WI(t,t=>{e||=t}),g=YI(u,()=>{D(e)})}else g=YI($(t,DR(150)),D);return _=setTimeout(()=>{y()},1200),GI(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},vL.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},UI(bR,OL,xL),{singleton:!0});function DR(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function OR(e,t){e===0?t():requestAnimationFrame(()=>{OR(e-1,t)})}function kR(e,t){let n=t-1;return typeof e==`number`?e:e.index===`LAST`?n:e.index}var AR=fL(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=cL(!0),c=cL(0),l=cL(!0);return JI($(o,aL(c),$I(([e,t])=>t!==0),tL(!1)),s),JI($(o,aL(c),$I(([e,t])=>t!==0),tL(!1)),l),WI($(hL(t,o),aL(s,n,e,l),$I(([[,e],t,{sizeTree:n},r,i])=>e&&(!jL(n)||RI(r))&&!t&&!i),aL(c)),([,e])=>{YI(i,()=>{GI(l,!0)}),OR(4,()=>{YI(r,()=>{GI(s,!0)}),GI(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},UI(bR,OL,ER,CR),{singleton:!0});function jR(e,t){return Math.abs(e-t)<1.01}var MR=`up`,NR=`down`,PR=`none`,FR={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},IR=0,LR=fL(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=cL(!1),s=cL(!0),c=uL(),l=uL(),u=cL(4),d=cL(IR),f=lL($(_L($(gL(i),rL(1),tL(!0)),$(gL(i),rL(1),tL(!1),XI(100))),QI()),!1),p=lL($(_L($(n,tL(!0)),$(n,tL(!1),XI(200))),QI()),!1);JI($(hL(gL(i),gL(d)),eL(([e,t])=>e<=t),QI()),s),JI($(s,iL(50)),l);let m=dL($(hL(r,gL(a),gL(t),gL(e),gL(u)),nL((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{let s=n+r-t>-o,c={scrollHeight:t,scrollTop:n,viewportHeight:r};if(s){let t,r;return n>e.state.scrollTop?(t=`SCROLLED_DOWN`,r=e.state.scrollTop-n):(t=`SIZE_DECREASED`,r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:c}}let l;return l=c.scrollHeight>e.state.scrollHeight?`SIZE_INCREASED`:r<e.state.viewportHeight?`VIEWPORT_HEIGHT_DECREASING`:n<e.state.scrollTop?`SCROLLING_UPWARDS`:`NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM`,{atBottom:!1,notAtBottomBecause:l,state:c}},FR),QI((e,t)=>e!==void 0&&e.atBottom===t.atBottom))),h=lL($(r,nL((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!jR(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),$I(e=>e.changed),eL(e=>e.jump)),0);JI($(m,eL(e=>e.atBottom)),o),JI($(o,iL(50)),c);let g=cL(NR);JI($(r,eL(({scrollTop:e})=>e),QI(),nL((e,t)=>qI(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?MR:NR,prevScrollTop:t},{direction:NR,prevScrollTop:0}),eL(e=>e.direction)),g),JI($(r,iL(50),tL(PR)),g);let _=cL(0);return JI($(f,$I(e=>!e),tL(0)),_),JI($(i,iL(100),aL(f),$I(([e,t])=>t),nL(([e,t],[n])=>[t,n],[0,0]),eL(([e,t])=>t-e)),_),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:g,scrollVelocity:_}},UI(OL)),RR=`top`,zR=`bottom`,BR=`none`;function VR(e,t,n){return typeof e==`number`?n===MR&&t===RR||n===NR&&t===zR?e:0:n===MR?t===RR?e.main:e.reverse:t===zR?e.main:e.reverse}function HR(e,t){return typeof e==`number`?e:e[t]??0}var UR=fL(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=uL(),o=cL(0),s=cL(0),c=cL(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:lL($(hL(gL(r),gL(i),gL(n),gL(a,ZL),gL(c),gL(o),gL(t),gL(e),gL(s)),eL(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=BR,m=HR(l,RR),h=HR(l,zR);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=MR),i<e-f+t+h&&(p=NR),p===BR?null:[Math.max(u-n-VR(a,RR,p)-m,0),u-f-s+t+VR(a,zR,p)+h]}),$I(e=>e!==null),QI(ZL)),[0,0])}},UI(OL),{singleton:!0});function WR(e,t,n){if(rR(t)){let r=uR(e,t);return[{index:NL(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}var GR={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function KR(e,t,n,r,i,a){let{lastIndex:o,lastOffset:s,lastSize:c}=i,l=0,u=0;if(e.length>0){l=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let d=n-o,f=s+d*c+(d-1)*r,p=l,m=f-u;return{bottom:u,firstItemIndex:a,items:JR(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:JR(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function qR(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-o>=e)break;o++}let s=e+o,c=kR(t,s);return KR(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function JR(e,t,n){if(e.length===0)return[];if(!rR(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,a=[],o=IL(t.groupOffsetTree,r,i),s,c=0;for(let r of e){(!s||s.end<r.index)&&(s=o.shift(),c=t.groupIndices.indexOf(s.start));let e;e=r.index===s.start?{index:c,type:`group`}:{groupIndex:c,index:r.index-(c+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function YR(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var XR=fL(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:m}])=>{let h=cL([]),g=cL(0),_=uL(),v=cL(0);JI(a.topItemsIndexes,h);let y=lL($(hL(p,m,gL(c,ZL),gL(i),gL(r),gL(l),u,gL(h),gL(t),gL(n),gL(v),e),$I(([e,t,,n,,,,,,,,r])=>{let i=r!==void 0&&r.length!==n;return e&&!t&&!i}),eL(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=qI(g);if(n===0)return{...GR,totalCount:n};if(e===0&&t===0)return m===0?{...GR,totalCount:n}:qR(m,i,r,s,c,u||[]);if(jL(p))return m>0?null:KR(WR(kR(i,n),d,u),[],n,c,d,s);let h=[];if(o.length>0){let e=o[0],t=o[o.length-1],n=0;for(let r of IL(p,e,t)){let i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)h.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return KR([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=fR(f,e,t,_);if(v.length===0)return null;let y=n-1,b=VI([],n=>{for(let r of v){let i=r.value,a=i.offset,o=r.start,s=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+c)/(s+c));let t=o-r.start;a+=t*s+t*c}o<_&&(a+=(_-o)*s,o=_);let l=Math.min(r.end,y);for(let e=o;e<=l&&!(a>=t);e++)n.push({data:u?.[e],index:e,offset:a,size:s}),a+=s+c}}),x=YR(l,RR),S=YR(l,zR);if(b.length>0&&(x>0||S>0)){let e=b[0],t=b[b.length-1];if(x>0&&e.index>_){let t=Math.min(x,e.index-_),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=IL(p,i,i)[0]?.value??e.size;r-=t+c,n.unshift({data:u?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<y){let e=Math.min(S,y-t.index),n=t.offset+t.size+c;for(let r=t.index+1;r<=t.index+e;r++){let e=IL(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return KR(b,h,n,c,d,s)}),$I(e=>e!==null),QI()),GR);JI($(e,$I(RI),eL(e=>e?.length)),i),JI($(y,eL(e=>e.topListHeight)),d),JI(d,s),JI($(y,eL(e=>[e.top,e.bottom])),o),JI($(y,eL(e=>e.items)),_);let b=dL($(y,$I(({items:e})=>e.length>0),aL(i,e),$I(([{items:e},t])=>e[e.length-1].originalIndex===t-1),eL(([,e,t])=>[e-1,t]),QI(ZL),eL(([e])=>e))),x=dL($(y,iL(200),$I(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),eL(({items:e})=>e[0].index),QI()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:dL($(y,$I(({items:e})=>e.length>0),eL(({items:e})=>{let t=0,n=e.length-1;for(;e[t].type===`group`&&t<n;)t++;for(;e[n].type===`group`&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),QI(XL))),startReached:x,topItemsIndexes:h,...f}},UI(bR,SR,UR,AR,ER,LR,CR,QL),{singleton:!0}),ZR=fL(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=uL(),o=lL($(hL(n,e,r,t,i),eL(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return JI(gL(o),a),{totalListHeight:o,totalListHeightChanged:a}},UI(OL,XR),{singleton:!0}),QR=fL(([{viewportHeight:e},{totalListHeight:t}])=>{let n=cL(!1);return{alignToBottom:n,paddingTopAddition:lL($(hL(n,e,t),$I(([e])=>e),eL(([,e,t])=>Math.max(0,e-t)),iL(0),QI()),0)}},UI(OL,ZR),{singleton:!0}),$R=fL(()=>({context:cL(null)})),ez=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,...r===void 0?{}:{behavior:r}}:e>a?{...i,align:n??`end`,...r===void 0?{}:{behavior:r}}:null,tz=fL(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=uL();return JI($(u,aL(t,c,n,a,i,r,s),aL(e),eL(([[e,t,n,r,i,a,s,c],l])=>{let{calculateViewLocation:u=ez,done:d,...f}=e,p=dR(e,t,r-1),m=lR(p,t.offsetTree,l)+i+a,h=m+NL(t.sizeTree,p)[1],g=c+a,_=u({itemBottom:h,itemTop:m,locationParams:f,viewportBottom:c+n-s,viewportTop:g});return _===null?d?.():d&&YI($(o,$I(e=>!e),rL(qI(o)?1:2)),d),_}),$I(e=>e!==null)),l),{scrollIntoView:u}},UI(bR,OL,ER,XR,xL),{singleton:!0});function nz(e){return e===!1?!1:e===`smooth`?`smooth`:`auto`}var rz=(e,t)=>typeof e==`function`?nz(e(t)):t&&nz(e),iz=fL(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{let m=cL(!1),h=uL(),g=null;function _(e){GI(o,{align:`end`,behavior:e,index:`LAST`})}WI($(hL($(gL(t),rL(1)),c),aL(gL(m),a,s,d),eL(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=rz(n,r||a),o&&=s!==!1),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),$I(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g!==null&&(g(),g=null),qI(n)===void 0?g=YI(e,()=>{qI(u)(`following output to `,{totalCount:r},vL.DEBUG),_(t),g=null}):requestAnimationFrame(()=>{qI(u)(`following output to `,{totalCount:r},vL.DEBUG),_(t)})});function v(e){let t=YI(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&g===null&&(qI(u)(`scrolling to bottom due to increased size`,{},vL.DEBUG),_(`auto`))});setTimeout(t,100)}WI($(hL(gL(m),t,l),$I(([e,,t])=>e!==!1&&t),nL(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),$I(({refreshed:e})=>e),aL(m,t)),([,e])=>{qI(s)&&v(e!==!1)}),WI(h,()=>{v(qI(m)!==!1)}),WI(hL(gL(m),i),([e,t])=>{e!==!1&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=cL(null),b=uL();return JI(_L($(gL(r),eL(e=>e?.length??0)),$(gL(t))),b),WI($(hL($(b,rL(1)),c),aL(gL(y),s,d,f),eL(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),$I(e=>!!e),iL(0)),t=>{g!==null&&(g(),g=null),qI(n)===void 0?g=YI(e,()=>{qI(u)(`scrolling into view`,{}),GI(p,t),g=null}):requestAnimationFrame(()=>{qI(u)(`scrolling into view`,{}),GI(p,t)})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},UI(bR,LR,ER,AR,CR,xL,OL,$R,tz)),az=fL(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(JI($(s,aL(a),$I(([,e])=>e!==0),aL(i,r,t,n,e),eL(([[,e],t,n,r,i,a=[]])=>qR(e,t,n,r,i,a))),o),{}),UI(bR,AR,XR,CR),{singleton:!0}),oz=fL(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=cL(0);return WI($(e,aL(r),$I(([,e])=>e!==0),eL(([,e])=>({top:e}))),e=>{YI($(n,rL(1),$I(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{GI(t,e)})})}),{initialScrollTop:r}},UI(CR,OL,XR),{singleton:!0}),sz=fL(([{scrollVelocity:e}])=>{let t=cL(!1),n=uL(),r=cL(!1);return JI($(e,aL(r,t,n),$I(([e,t])=>t!==!1&&t!==void 0),eL(([e,t,n,r])=>{let{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),QI()),t),WI($(hL(t,e,n),aL(r)),([[e,t,n],r])=>{e&&r!==!1&&r!==void 0&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},UI(LR),{singleton:!0}),cz=fL(([{scrollContainerState:e,scrollTo:t}])=>{let n=uL(),r=uL(),i=uL(),a=cL(!1),o=cL(void 0);return JI($(hL(n,r),eL(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),JI($(t,aL(r),eL(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},UI(OL)),lz=fL(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=uL(),u=cL(void 0),d=cL(null),f=cL(null);return JI(s,d),JI(c,f),WI($(l,aL(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=mR(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),JI($(u,$I(RI),eL(uz)),i),JI($(a,aL(u),$I(([,e])=>e!==void 0),QI(),eL(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},UI(bR,OL,AR,CR,cz));function uz(e){return{align:`start`,index:0,offset:e.scrollTop}}var dz=fL(([{topItemsIndexes:e}])=>{let t=cL(0);return JI($(t,$I(e=>e>=0),eL(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},UI(XR));function fz(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var pz=fz(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),mz=fL(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g},_,v,y,b,{scrollToIndex:x},S,{topItemCount:C},{groupCounts:w},T])=>{let{listState:E,minOverscanItemCount:D,topItemsIndexes:O,rangeChanged:k,...A}=b;return JI(k,T.scrollSeekRangeChanged),JI($(T.windowViewportRect,eL(e=>e.visibleHeight)),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:w,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:O,totalCount:f,...y,groupIndices:o,itemSize:c,listState:E,minOverscanItemCount:D,scrollToIndex:x,statefulTotalCount:d,trackItemSizes:p,rangeChanged:k,...A,...T,..._,sizes:u,...v}},UI(bR,AR,OL,lz,iz,XR,ER,fL(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:m}])=>{let h=dL($(c,aL(o),nL(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},s])=>{let c=r+a,l=0;return t===o&&e.length>0&&i.length>0&&(i[0].originalIndex===0&&e[0].originalIndex===0||(l=c-n,l!==0&&(l+=s))),[l,i,o,c]},[0,[],0,0]),$I(([e])=>e!==0),aL(r,s,n,i,p,m),$I(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===MR),eL(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},vL.DEBUG),e))));function g(n){n>0?(GI(t,{behavior:`auto`,top:-n}),GI(e,0)):(GI(e,0),GI(t,{behavior:`auto`,top:-n}))}return WI($(h,aL(e,a)),([t,n,r])=>{r&&pz()?GI(e,n-t):g(-t)}),WI($(hL(lL(a,!1),e,m),$I(([e,t,n])=>!e&&!n&&t!==0),eL(([e,t])=>t),iL(1)),g),JI($(d,eL(e=>({top:-e}))),t),WI($(l,aL(f,u),eL(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);let o=0,s=ML(r,0),c=0,l=0;for(;c<e;){c++,o+=s;let n=t.length===l+1?1/0:t[l+1]-t[l]-1;c+n>e&&(o-=s,n=e-c+1),c+=n,o+=a(n),l++}return o})),n=>{GI(e,n),requestAnimationFrame(()=>{GI(t,{top:n}),requestAnimationFrame(()=>{GI(e,0),GI(m,!1)})})}),{deviation:e}},UI(OL,LR,XR,bR,xL,QL)),dz,SR,fL(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),UI(UR,az,CR,sz,ZR,oz,QR,cz,tz,xL,$R))));function hz(e,t){let n={},r={},i=0,a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}var gz=typeof document<`u`?U.useLayoutEffect:U.useEffect;function _z(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=U.createContext({});function c(e,n){e.propsReady!==void 0&&GI(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];GI(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];GI(i,n[r])}e.propsReady!==void 0&&GI(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];GI(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=sL(e[t.events[r]]),n),{})}return{Component:U.forwardRef(function(t,a){let{children:d,...f}=t,[p]=U.useState(()=>VI(mL(e),e=>{c(e,f)})),[m]=U.useState(II(u,p));gz(()=>{for(let e of o)e in f&&WI(m[e],f[e]);return()=>{Object.values(m).map(KI)}},[f,m,p]),gz(()=>{c(p,f)}),U.useImperativeHandle(a,NI(l(p)));let h=n;return(0,W.jsx)(s.Provider,{value:p,children:n===void 0?d:(0,W.jsx)(h,{...hz([...r,...i,...o],f),children:d})})}),useEmitter:(e,t)=>{let n=U.useContext(s)[e];gz(()=>WI(n,t),[t,n])},useEmitterValue:e=>{let t=U.useContext(s)[e],[n,r]=U.useState(II(qI,t));return gz(()=>WI(t,e=>{e!==n&&r(NI(e))}),[t,n]),n},usePublisher:e=>{let t=U.useContext(s);return U.useCallback(n=>{GI(t[e],n)},[t,e])}}}var vz=U.createContext(void 0),yz=U.createContext(void 0),bz=`-webkit-sticky`,xz=`sticky`,Sz=fz(()=>{if(typeof document>`u`)return xz;let e=document.createElement(`div`);return e.style.position=bz,e.style.position===bz?bz:xz}),Cz=typeof document<`u`?U.useLayoutEffect:U.useEffect;function wz(e){return`self`in e}function Tz(e){return`body`in e}function Ez(e,t,n,r=BI,i,a){let o=U.useRef(null),s=U.useRef(null),c=U.useRef(null),l=U.useCallback(n=>{let r,i,o,l=n.target;if(Tz(l)||wz(l)){let e=wz(l)?l:l.defaultView;o=a===!0?e.scrollX:e.scrollY,r=a===!0?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a===!0?e.innerWidth:e.innerHeight}else o=a===!0?l.scrollLeft:l.scrollTop,r=a===!0?l.scrollWidth:l.scrollHeight,i=a===!0?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync===!0?u():cn.flushSync(u),s.current!==null&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&=(clearTimeout(c.current),null))},[e,t,a]);U.useEffect(()=>{let e=i||o.current;return r(i||o.current),l({suppressFlushSync:!0,target:e}),e.addEventListener(`scroll`,l,{passive:!0}),()=>{r(null),e.removeEventListener(`scroll`,l)}},[o,l,n,r,i]);function u(n){let r=o.current;if(!r||(a===!0?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;wz(r)?(u=Math.max(nR(r.document.documentElement,a===!0?`width`:`height`),a===!0?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a===!0?r.innerWidth:r.innerHeight,d=a===!0?window.scrollX:window.scrollY):(u=r[a===!0?`scrollWidth`:`scrollHeight`],l=nR(r,a===!0?`width`:`height`),d=r[a===!0?`scrollLeft`:`scrollTop`]);let f=u-l;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),jR(l,u)||n.top===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a===!0&&(n={...n.behavior===void 0?{}:{behavior:n.behavior},left:n.top}),r.scrollTo(n)}function d(e){a===!0&&(e={...e.behavior===void 0?{}:{behavior:e.behavior},...e.top===void 0?{}:{left:e.top}}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}function Dz(e){return e}var Oz=fL(([e,t])=>({...e,...t}),UI(mz,fL(()=>{let e=cL(e=>`Item ${e}`),t=cL(e=>`Group ${e}`),n=cL({}),r=cL(Dz),i=cL(`div`),a=cL(BI),o=(e,t=null)=>lL($(n,eL(t=>t[e]),QI()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o(`EmptyPlaceholder`),FooterComponent:o(`Footer`),GroupComponent:o(`Group`,`div`),groupContent:t,HeaderComponent:o(`Header`),HeaderFooterTag:i,ItemComponent:o(`Item`,`div`),itemContent:e,ListComponent:o(`List`,`div`),ScrollerComponent:o(`Scroller`,`div`),scrollerRef:a,ScrollSeekPlaceholder:o(`ScrollSeekPlaceholder`),TopItemListComponent:o(`TopItemList`)}}))),kz=({height:e})=>(0,W.jsx)(`div`,{style:{height:e}}),Az={overflowAnchor:`none`,position:Sz(),zIndex:1},jz={overflowAnchor:`none`},Mz={...jz,display:`inline-block`,height:`100%`},Nz=U.memo(function({showTopList:e=!1}){let t=Yz(`listState`),n=Xz(`sizeRanges`),r=Yz(`useWindowScroll`),i=Yz(`customScrollParent`),a=Xz(`windowScrollContainerState`),o=Xz(`scrollContainerState`),s=i||r?a:o,c=Yz(`itemContent`),l=Yz(`context`),u=Yz(`groupContent`),d=Yz(`trackItemSizes`),f=Yz(`itemSize`),p=Yz(`log`),m=Xz(`gap`),h=Yz(`horizontalDirection`),{callbackRef:g}=wL(n,f,d,e?BI:s,p,m,i,h,Yz(`skipAnimationFrameInResizeObserver`)),[_,v]=U.useState(0);Jz(`deviation`,e=>{_!==e&&v(e)});let y=Yz(`EmptyPlaceholder`),b=Yz(`ScrollSeekPlaceholder`)??kz,x=Yz(`ListComponent`),S=Yz(`ItemComponent`),C=Yz(`GroupComponent`),w=Yz(`computeItemKey`),T=Yz(`isSeeking`),E=Yz(`groupIndices`).length>0,D=Yz(`alignToBottom`),O=Yz(`initialItemFinalLocationReached`),k=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginLeft:_===0?D?`auto`:0:_,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y!=null?(0,W.jsx)(y,{...Rz(y,l)}):(0,W.jsx)(x,{...Rz(x,l),"data-testid":e?`virtuoso-top-item-list`:`virtuoso-item-list`,ref:g,style:k,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=w(n+t.firstItemIndex,e.data,l);return T?(0,U.createElement)(b,{...Rz(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,U.createElement)(C,{...Rz(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Az},u(e.index,l)):(0,U.createElement)(S,{...Rz(S,l),...zz(S,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:h?Mz:jz},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),Pz={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},Fz={outline:`none`,overflowX:`auto`,position:`relative`},Iz=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:void 0}),Lz={position:Sz(),top:0,width:`100%`,zIndex:1};function Rz(e,t){if(typeof e!=`string`)return{context:t}}function zz(e,t){return{item:typeof e==`string`?void 0:t}}var Bz=U.memo(function(){let e=Yz(`HeaderComponent`),t=Xz(`headerHeight`),n=Yz(`HeaderFooterTag`),r=SL(U.useMemo(()=>e=>{t(nR(e,`height`))},[t]),!0,Yz(`skipAnimationFrameInResizeObserver`)),i=Yz(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Rz(e,i)})})}),Vz=U.memo(function(){let e=Yz(`FooterComponent`),t=Xz(`footerHeight`),n=Yz(`HeaderFooterTag`),r=SL(U.useMemo(()=>e=>{t(nR(e,`height`))},[t]),!0,Yz(`skipAnimationFrameInResizeObserver`)),i=Yz(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Rz(e,i)})})});function Hz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return U.memo(function({children:r,style:i,context:a,...o}){let s=n(`scrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`scrollerRef`),d=t(`horizontalDirection`)||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:m}=Ez(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,W.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?Fz:Pz,...i},tabIndex:0,...o,...Rz(c,a),children:r})})}function Uz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return U.memo(function({children:r,style:i,context:a,...o}){let s=n(`windowScrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`totalListHeight`),d=t(`deviation`),f=t(`customScrollParent`),p=U.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=Ez(s,l,c,t(`scrollerRef`),f);return Cz(()=>(h.current=f||p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,W.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?void 0:{height:u+d}},...o,...Rz(c,a),children:r})})}var Wz=({children:e})=>{let t=U.useContext(vz),n=Xz(`viewportHeight`),r=Xz(`fixedItemHeight`),i=Yz(`alignToBottom`),a=Yz(`horizontalDirection`),o=SL(U.useMemo(()=>FI(n,e=>nR(e,a?`width`:`height`)),[n,a]),!0,Yz(`skipAnimationFrameInResizeObserver`));return U.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:Iz(i),children:e})},Gz=({children:e})=>{let t=U.useContext(vz),n=Xz(`windowViewportRect`),r=Xz(`fixedItemHeight`),i=DL(n,Yz(`customScrollParent`),Yz(`skipAnimationFrameInResizeObserver`)),a=Yz(`alignToBottom`);return U.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Iz(a),children:e})},Kz=({children:e})=>{let t=Yz(`TopItemListComponent`)??`div`,n=Yz(`headerHeight`);return(0,W.jsx)(t,{style:{...Lz,marginTop:`${n}px`},...Rz(t,Yz(`context`)),children:e})},{Component:qz,useEmitter:Jz,useEmitterValue:Yz,usePublisher:Xz}=_z(Oz,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,scrollIntoViewOnChange:`scrollIntoViewOnChange`,itemContent:`itemContent`,groupContent:`groupContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,groupCounts:`groupCounts`,topItemCount:`topItemCount`,firstItemIndex:`firstItemIndex`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,heightEstimates:`heightEstimates`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`HeaderFooterTag`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,horizontalDirection:`horizontalDirection`,skipAnimationFrameInResizeObserver:`skipAnimationFrameInResizeObserver`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,autoscrollToBottom:`autoscrollToBottom`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},U.memo(function(e){let t=Yz(`useWindowScroll`),n=Yz(`topItemsIndexes`).length>0,r=Yz(`customScrollParent`),i=Yz(`context`);return(0,W.jsxs)(r||t?Qz:Zz,{...e,context:i,children:[n&&(0,W.jsx)(Kz,{children:(0,W.jsx)(Nz,{showTopList:!0})}),(0,W.jsxs)(r||t?Gz:Wz,{children:[(0,W.jsx)(Bz,{}),(0,W.jsx)(Nz,{}),(0,W.jsx)(Vz,{})]})]})})),Zz=Hz({useEmitter:Jz,useEmitterValue:Yz,usePublisher:Xz}),Qz=Uz({useEmitter:Jz,useEmitterValue:Yz,usePublisher:Xz}),$z=qz,eB=fL(([e,t])=>({...e,...t}),UI(mz,fL(()=>{let e=cL(e=>(0,W.jsxs)(`td`,{children:[`Item $`,e]})),t=cL(null),n=cL(e=>(0,W.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=cL(null),i=cL(null),a=cL({}),o=cL(Dz),s=cL(BI),c=(e,t=null)=>lL($(a,eL(t=>t[e]),QI()),t);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c(`EmptyPlaceholder`),FillerRow:c(`FillerRow`),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`),TableBodyComponent:c(`TableBody`,`tbody`),TableComponent:c(`Table`,`table`),TableFooterComponent:c(`TableFoot`,`tfoot`),TableHeadComponent:c(`TableHead`,`thead`),TableRowComponent:c(`TableRow`,`tr`),GroupComponent:c(`Group`,`tr`)}}))),tB=({height:e})=>(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{style:{height:e}})}),nB=({height:e})=>(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),rB={overflowAnchor:`none`},iB={position:Sz(),zIndex:2,overflowAnchor:`none`},aB=U.memo(function({showTopList:e=!1}){let t=dB(`listState`),n=dB(`computeItemKey`),r=dB(`firstItemIndex`),i=dB(`context`),a=dB(`isSeeking`),o=dB(`fixedHeaderHeight`),s=dB(`groupIndices`).length>0,c=dB(`itemContent`),l=dB(`groupContent`),u=dB(`ScrollSeekPlaceholder`)??tB,d=dB(`GroupComponent`),f=dB(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,h=n(m+r,t.data,i),g=e?m===0?0:p[m-1]:0;return a?(0,U.createElement)(u,{...Rz(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,U.createElement)(d,{...Rz(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...iB,top:o}},l(t.index,i)):(0,U.createElement)(f,{...Rz(f,i),...zz(f,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:h,style:e?{...iB,top:o+g}:rB},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))})}),oB=U.memo(function(){let e=dB(`listState`),t=dB(`topItemsIndexes`).length>0,n=fB(`sizeRanges`),r=dB(`useWindowScroll`),i=dB(`customScrollParent`),a=fB(`windowScrollContainerState`),o=fB(`scrollContainerState`),s=i||r?a:o,c=dB(`trackItemSizes`),{callbackRef:l,ref:u}=wL(n,dB(`itemSize`),c,s,dB(`log`),void 0,i,!1,dB(`skipAnimationFrameInResizeObserver`)),[d,f]=U.useState(0);uB(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=dB(`EmptyPlaceholder`),m=dB(`FillerRow`)??nB,h=dB(`TableBodyComponent`),g=dB(`paddingTopAddition`),_=dB(`statefulTotalCount`),v=dB(`context`);if(_===0&&p!=null)return(0,W.jsx)(p,{...Rz(p,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),b=e.offsetTop+g+d-y,x=e.offsetBottom,S=b>0?(0,W.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,W.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,W.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...Rz(h,v),children:[S,t&&(0,W.jsx)(aB,{showTopList:!0}),(0,W.jsx)(aB,{}),C]})}),sB=({children:e})=>{let t=U.useContext(vz),n=fB(`viewportHeight`),r=fB(`fixedItemHeight`),i=SL(U.useMemo(()=>FI(n,e=>nR(e,`height`)),[n]),!0,dB(`skipAnimationFrameInResizeObserver`));return U.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:Iz(!1),children:e})},cB=({children:e})=>{let t=U.useContext(vz),n=fB(`windowViewportRect`),r=fB(`fixedItemHeight`),i=DL(n,dB(`customScrollParent`),dB(`skipAnimationFrameInResizeObserver`));return U.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,W.jsx)(`div`,{"data-viewport-type":`window`,ref:i,style:Iz(!1),children:e})},{Component:lB,useEmitter:uB,useEmitterValue:dB,usePublisher:fB}=_z(eB,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,firstItemIndex:`firstItemIndex`,itemContent:`itemContent`,groupContent:`groupContent`,fixedHeaderContent:`fixedHeaderContent`,fixedFooterContent:`fixedFooterContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,topItemCount:`topItemCount`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,groupCounts:`groupCounts`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},U.memo(function(e){let t=dB(`useWindowScroll`),n=dB(`customScrollParent`),r=fB(`fixedHeaderHeight`),i=fB(`fixedFooterHeight`),a=dB(`fixedHeaderContent`),o=dB(`fixedFooterContent`),s=dB(`context`),c=SL(U.useMemo(()=>FI(r,e=>nR(e,`height`)),[r]),!0,dB(`skipAnimationFrameInResizeObserver`)),l=SL(U.useMemo(()=>FI(i,e=>nR(e,`height`)),[i]),!0,dB(`skipAnimationFrameInResizeObserver`)),u=n||t?mB:pB,d=n||t?cB:sB,f=dB(`TableComponent`),p=dB(`TableHeadComponent`),m=dB(`TableFooterComponent`),h=a?(0,W.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...Rz(p,s),children:a()},`TableHead`):null,g=o?(0,W.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...Rz(m,s),children:o()},`TableFoot`):null;return(0,W.jsx)(u,{...e,...Rz(u,s),children:(0,W.jsx)(d,{children:(0,W.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...Rz(f,s),children:[h,(0,W.jsx)(oB,{},`TableBody`),g]})})})})),pB=Hz({useEmitter:uB,useEmitterValue:dB,usePublisher:fB}),mB=Uz({useEmitter:uB,useEmitterValue:dB,usePublisher:fB}),hB={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},gB={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:_B,floor:vB,max:yB,min:bB,round:xB}=Math;function SB(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function CB(e){return{...gB,items:e}}function wB(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function TB(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}var EB=fL(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:m,propsReady:h},{customScrollParent:g,useWindowScroll:_,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b},x])=>{let S=cL(0),C=cL(0),w=cL(hB),T=cL({height:0,width:0}),E=cL({height:0,width:0}),D=uL(),O=uL(),k=cL(0),A=cL(null),j=cL({column:0,row:0}),M=uL(),N=uL(),P=cL(!1),ee=cL(0),F=cL(!0),I=cL(!1),te=cL(!1);WI($(m,aL(ee),$I(([e,t])=>t!==0)),()=>{GI(F,!1)}),WI($(hL(m,F,E,T,ee,I),$I(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{GI(I,!0),OR(1,()=>{GI(D,e)}),YI($(l),()=>{GI(t,[0,0]),GI(F,!0)})}),JI($(N,$I(e=>e!=null&&e.scrollTop>0),tL(0)),C),WI($(m,aL(N),$I(([,e])=>e!=null)),([,e])=>{e&&(GI(T,e.viewport),GI(E,e.item),GI(j,e.gap),e.scrollTop>0&&(GI(P,!0),YI($(l,rL(1)),e=>{GI(P,!1)}),GI(c,{top:e.scrollTop})))}),JI($(T,eL(({height:e})=>e)),d),JI($(hL(gL(T,wB),gL(E,wB),gL(j,(e,t)=>e!==void 0&&e.column===t.column&&e.row===t.row),gL(l)),eL(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),M),JI($(hL(gL(S),r,gL(j,TB),gL(E,wB),gL(T,wB),gL(A),gL(C),gL(P),gL(F),gL(ee)),$I(([,,,,,,,e])=>!e),eL(([e,[t,n],r,i,a,o,s,,c,l])=>{let{column:u,row:d}=r,{height:f,width:p}=i,{width:m}=a;if(s===0&&(e===0||m===0))return hB;if(p===0){let t=kR(l,e);return CB(SB(t,t+Math.max(s-1,0),o))}let h=DB(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*vB((t+d)/(f+d)),_=h*_B((n+d)/(f+d))-1,_=bB(e-1,yB(_,h-1)),g=bB(_,yB(0,g))):(g=0,_=-1);let v=SB(g,_,o),{bottom:y,top:b}=OB(a,r,i,v),x=_B(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),JI($(A,$I(e=>e!==null),eL(e=>e.length)),S),JI($(hL(T,E,w,j),$I(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),eL(([e,t,{items:n},r])=>{let{bottom:i,top:a}=OB(e,r,t,n);return[a,i]}),QI(ZL)),t);let ne=cL(!1);JI($(l,aL(ne),eL(([e,t])=>t||e!==0)),ne);let re=dL($(hL(w,S),$I(([{items:e}])=>e.length>0),aL(ne),$I(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&e.offsetBottom===0&&e.items.length===t)&&r}),eL(([[,e]])=>e-1),QI())),ie=dL($(gL(w),$I(({items:e})=>e.length>0&&e[0].index===0),tL(0),QI())),L=dL($(gL(w),aL(P),$I(([{items:e},t])=>e.length>0&&!t),eL(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),QI(XL),iL(0)));JI(L,p.scrollSeekRangeChanged),JI($(D,aL(T,E,S,j),eL(([e,t,n,r,i])=>{let a=TR(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=yB(0,l,bB(r-1,l));let u=kB(t,i,n,l);return o===`end`?u=xB(u-t.height+n.height):o===`center`&&(u=xB(u-t.height/2+n.height/2)),c!==void 0&&c!==0&&(u+=c),{behavior:s,top:u}})),c);let R=lL($(w,eL(e=>e.offsetBottom+e.bottom)),0);return JI($(b,eL(e=>({height:e.visibleHeight,width:e.visibleWidth}))),T),{customScrollParent:g,data:A,deviation:k,footerHeight:i,gap:j,headerHeight:a,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:n,restoreStateFrom:N,scrollBy:o,scrollContainerState:s,scrollHeight:O,scrollTo:c,scrollToIndex:D,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:_,viewportDimensions:T,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b,...p,gridState:w,horizontalDirection:te,initialTopMostItemIndex:ee,totalListHeight:R,...f,endReached:re,propsReady:h,rangeChanged:L,startReached:ie,stateChanged:M,stateRestoreInProgress:P,...x}},UI(UR,OL,LR,sz,CR,cz,xL));function DB(e,t,n){return yB(1,vB((e+n)/(vB(t)+n)))}function OB(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=kB(e,t,n,r[0].index);return{bottom:kB(e,t,n,r[r.length-1].index)+i,top:a}}function kB(e,t,n,r){let i=vB(r/DB(e.width,n.width,t.column)),a=i*n.height+yB(0,i-1)*t.row;return a>0?a+t.row:a}var AB=fL(([e,t])=>({...e,...t}),UI(EB,fL(()=>{let e=cL(e=>`Item ${e}`),t=cL({}),n=cL(null),r=cL(`virtuoso-grid-item`),i=cL(`virtuoso-grid-list`),a=cL(Dz),o=cL(`div`),s=cL(BI),c=(e,n=null)=>lL($(t,eL(t=>t[e]),QI()),n),l=cL(!1),u=cL(!1);return JI(gL(u),l),{components:t,computeItemKey:a,context:n,FooterComponent:c(`Footer`),HeaderComponent:c(`Header`),headerFooterTag:o,itemClassName:r,ItemComponent:c(`Item`,`div`),itemContent:e,listClassName:i,ListComponent:c(`List`,`div`),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`,`div`)}}))),jB=U.memo(function(){let e=RB(`gridState`),t=RB(`listClassName`),n=RB(`itemClassName`),r=RB(`itemContent`),i=RB(`computeItemKey`),a=RB(`isSeeking`),o=zB(`scrollHeight`),s=RB(`ItemComponent`),c=RB(`ListComponent`),l=RB(`ScrollSeekPlaceholder`),u=RB(`context`),d=zB(`itemDimensions`),f=zB(`gap`),p=RB(`log`),m=RB(`stateRestoreInProgress`),h=zB(`reportReadyState`),g=SL(U.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n!==null){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:HB(`column-gap`,getComputedStyle(e).columnGap,p),row:HB(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return Cz(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,W.jsx)(c,{className:t,ref:g,...Rz(c,u),"data-testid":`virtuoso-item-list`,style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let o=i(t.index,t.data,u);return a?(0,W.jsx)(l,{...Rz(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,U.createElement)(s,{...Rz(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),MB=U.memo(function(){let e=RB(`HeaderComponent`),t=zB(`headerHeight`),n=RB(`headerFooterTag`),r=SL(U.useMemo(()=>e=>{t(nR(e,`height`))},[t]),!0,!1),i=RB(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Rz(e,i)})})}),NB=U.memo(function(){let e=RB(`FooterComponent`),t=zB(`footerHeight`),n=RB(`headerFooterTag`),r=SL(U.useMemo(()=>e=>{t(nR(e,`height`))},[t]),!0,!1),i=RB(`context`);return e==null?null:(0,W.jsx)(n,{ref:r,children:(0,W.jsx)(e,{...Rz(e,i)})})}),PB=({children:e})=>{let t=U.useContext(yz),n=zB(`itemDimensions`),r=zB(`viewportDimensions`),i=SL(U.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return U.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,W.jsx)(`div`,{ref:i,style:Iz(!1),children:e})},FB=({children:e})=>{let t=U.useContext(yz),n=zB(`windowViewportRect`),r=zB(`itemDimensions`),i=DL(n,RB(`customScrollParent`),!1);return U.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,W.jsx)(`div`,{ref:i,style:Iz(!1),children:e})},{Component:IB,useEmitter:LB,useEmitterValue:RB,usePublisher:zB}=_z(AB,{optional:{context:`context`,totalCount:`totalCount`,overscan:`overscan`,itemContent:`itemContent`,components:`components`,computeItemKey:`computeItemKey`,data:`data`,initialItemCount:`initialItemCount`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`headerFooterTag`,listClassName:`listClassName`,itemClassName:`itemClassName`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,restoreStateFrom:`restoreStateFrom`,initialTopMostItemIndex:`initialTopMostItemIndex`,increaseViewportBy:`increaseViewportBy`},methods:{scrollTo:`scrollTo`,scrollBy:`scrollBy`,scrollToIndex:`scrollToIndex`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,stateChanged:`stateChanged`,readyStateChanged:`readyStateChanged`}},U.memo(function({...e}){let t=RB(`useWindowScroll`),n=RB(`customScrollParent`),r=n||t?VB:BB,i=n||t?FB:PB,a=RB(`context`);return(0,W.jsx)(r,{...e,...Rz(r,a),children:(0,W.jsxs)(i,{children:[(0,W.jsx)(MB,{}),(0,W.jsx)(jB,{}),(0,W.jsx)(NB,{})]})})})),BB=Hz({useEmitter:LB,useEmitterValue:RB,usePublisher:zB}),VB=Uz({useEmitter:LB,useEmitterValue:RB,usePublisher:zB});function HB(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,vL.WARN),t===`normal`?0:parseInt(t??`0`,10)}function UB({data:e,value:t,renderOption:n}){if(!nm(e)){let r=EI(t,e.value);return(0,W.jsx)(Np.Option,{value:e.value,disabled:e.disabled,"data-checked":r||void 0,"aria-selected":r,active:r,children:n?.({option:e,checked:r})})}let r=e.items.map(e=>(0,W.jsx)(UB,{data:e,value:t,renderOption:n},e.value));return(0,W.jsx)(Np.Group,{label:e.group,children:r})}var WB={dropdownHeightTransition:`_dropdownHeightTransition_1kps7_1`};function GB(e,t,n){return n?e&&e<=t?e:t:0}function KB({data:e,maxDropdownHeight:t,opened:n,renderOption:r,scrollAreaProps:i,value:a,withScrollArea:o=!0,withVirtualization:s}){let c=(0,U.useRef)(null),[l,u]=(0,U.useState)(0),d=an(n),f=t??220,p=e.map(e=>(0,W.jsx)(UB,{data:e,value:a,renderOption:r},nm(e)?e.group:e.value)),m=e=>{c.current?.scrollToIndex({index:e,align:`start`})},h=(e,t)=>{if(t==null)return-1;let n=Array.isArray(t);return e.findIndex(e=>n?nm(e)?t.some(t=>e.group.includes(t)):t.includes(e.value):nm(e)?e.group.includes(t):e.value===t)},g=(0,U.useCallback)((e,t,n,r,i)=>{if(e&&t&&n){let t=h(r,n);t>-1&&!i&&e&&m(t)}else e&&!n&&m(0)},[]);if((0,U.useEffect)(()=>{g(n,s,a,e,d)},[n,s,a,e,d,g]),s){let t=GB(l,f,e.length);return(0,W.jsx)(q,{className:WB.dropdownHeightTransition,style:{height:t},children:(0,W.jsx)($z,{ref:c,style:{height:`100%`},totalCount:e.length,totalListHeightChanged:u,itemContent:t=>(0,W.jsx)(UB,{data:e[t],value:a,renderOption:r},nm(e[t])?e[t].group:e[t].value)})})}return o?(0,W.jsx)(sl.Autosize,{mah:f,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...i,children:p}):(0,W.jsx)(W.Fragment,{children:p})}var qB={selectAll:`_selectAll_158re_1`};function JB({opened:e,data:t,filter:n,filterOptions:r=!0,hidden:i,hiddenWhenEmpty:a,limit:o,maxDropdownHeight:s,nothingFoundMessage:c,renderOption:l,onSelectAllToggle:u,scrollAreaProps:d,search:f,value:p,withScrollArea:m=!0,withSelectAll:h,withVirtualization:g}){OI(t);let{_}=OM(),v=typeof f==`string`&&t.every(e=>nm(e)?!0:e.label!==f)?(n||rm)({options:t,search:r?f:``,limit:o??1/0}):t,y=DI(v),b=v.filter(e=>nm(e)?!1:!e.disabled).map(e=>{if(!nm(e))return e.value}).filter(e=>typeof e==`string`),x=Array.isArray(p)?p:[],S=b.length>0&&b.every(e=>x.includes(e)),C=b.some(e=>x.includes(e))&&!S;return(0,W.jsx)(Np.Dropdown,{hidden:i||a&&y,children:(0,W.jsxs)(Np.Options,{children:[h&&(0,W.jsxs)(Eu,{gap:8,className:qB.selectAll,onClick:()=>u?.(!S),children:[(0,W.jsx)(tm,{checked:S,indeterminate:C,onChange:e=>{e.preventDefault(),u?.(!S)}}),(0,W.jsx)(Xf,{span:!0,children:_({id:`mCB6Je`})})]}),(0,W.jsx)(KB,{opened:e,data:v,maxDropdownHeight:s,renderOption:l,scrollAreaProps:d,value:p,withScrollArea:m,withVirtualization:g}),y&&c&&(0,W.jsx)(Np.Empty,{children:c})]})})}var YB=(0,U.memo)(function({allowDeselect:e=!0,autoComplete:t,chevronColor:n,classNames:r,clearable:i,clearButtonProps:a,comboboxProps:o,data:s,defaultDropdownOpened:c,defaultSearchValue:l,defaultValue:u,disabled:d,dropdownOpened:f,error:p,filter:m,form:h,hiddenInputProps:g,id:_,limit:v,loading:y,maxDropdownHeight:b,name:x,nothingFoundMessage:S,onBlur:C,onChange:w,onClear:T,onClick:E,onDropdownClose:D,onDropdownOpen:O,onFocus:k,onOptionSubmit:A,onSearchChange:j,placeholder:M,readOnly:N,rightSection:P,rightSectionPointerEvents:ee,scrollAreaProps:F,searchable:I,searchValue:te,selectFirstOptionOnChange:ne,size:re,styles:ie,unstyled:L,value:R,withScrollArea:ae,withVirtualization:oe,...se}){let ce=(0,U.useMemo)(()=>tp(s),[s]),le=(0,U.useMemo)(()=>np(ce),[ce]),ue=Lt(_),{_:de}=OM(),[z,fe,pe]=Jt({value:R,defaultValue:u,finalValue:null,onChange:w}),me=typeof z==`string`?le[z]:void 0,he=an(me),[B,ge,_e]=Jt({value:te,defaultValue:l,finalValue:me?me.label:``,onChange:j}),V=Ap({opened:f,defaultOpened:c,onDropdownOpen:()=>{O?.(),V.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{D?.(),V.resetSelectedOption()}}),ve=e=>{ge(e),V.resetSelectedOption()},ye=()=>y?(0,W.jsx)(cu,{size:`xs`}):P??(0,W.jsx)(DO,{width:20,height:20}),{resolvedClassNames:be,resolvedStyles:xe}=Hr({props:se,styles:ie,classNames:r});(0,U.useEffect)(()=>{ne&&V.selectFirstOption()},[ne,B]),(0,U.useEffect)(()=>{R===null&&ve(``),typeof R==`string`&&me&&(he?.value!==me.value||he?.label!==me.label)&&ve(me.label)},[R,me]),(0,U.useEffect)(()=>{!pe&&!_e&&ve(typeof z==`string`&&le[z]?.label||``)},[s,z]);let Se=(0,W.jsx)(Np.ClearButton,{...a,onClear:()=>{fe(null,null),ve(``),T?.()}}),Ce=i&&!!z&&!d&&!N,we=ye(),Te=ee,Ee=S??de({id:`Hz+sxK`}),De=M??de({id:`rG3WVm`});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Np,{store:V,__staticSelector:`Select`,classNames:be,styles:xe,unstyled:L,readOnly:N,onOptionSubmit:t=>{A?.(t);let n=e&&le[t].value===z?null:le[t],r=n?n.value:null;r!==z&&fe(r,n),pe||ve(typeof r==`string`&&n?.label||``),V.closeDropdown()},size:re,...o,children:[(0,W.jsx)(Np.Target,{targetType:I?`input`:`button`,autoComplete:t,children:(0,W.jsx)(Cf,{id:ue,__defaultRightSection:(0,W.jsx)(Np.Chevron,{size:re,error:p,unstyled:L,color:n}),__clearSection:Se,__clearable:Ce,rightSection:we,rightSectionPointerEvents:Te||(Ce?`all`:`none`),...se,placeholder:De,size:re,__staticSelector:`Select`,disabled:d,readOnly:N||!I,value:B,onChange:e=>{ve(e.currentTarget.value),V.openDropdown(),ne&&V.selectFirstOption()},onFocus:e=>{I&&V.openDropdown(),k?.(e)},onBlur:e=>{I&&V.closeDropdown(),ve(z==null?``:le[z]?.label||``),C?.(e)},onClick:e=>{I?V.openDropdown():V.toggleDropdown(),E?.(e)},classNames:be,styles:xe,unstyled:L,pointer:!I,error:p})}),(0,W.jsx)(JB,{opened:V.dropdownOpened,data:ce,renderOption:XA,value:z,search:I?B:void 0,limit:v,maxDropdownHeight:b,filter:m,hidden:N||d,nothingFoundMessage:Ee,withScrollArea:ae,scrollAreaProps:F,withVirtualization:oe})]}),(0,W.jsx)(Np.HiddenInput,{value:z,name:x,form:h,disabled:d,...g})]})}),XB={root:`_root_185o8_1`,input:`_input_185o8_5`,dropdown:`_dropdown_185o8_12`,section:`_section_185o8_16`,text:`_text_185o8_20`};function ZB({currentPage:e,pageSize:t,totalElements:n,paginationSizes:r,loading:i,onPageSizeChange:a}){let{_:o}=OM(),s=t*(e-1)+1,c=Math.min(n,t*e);return(0,W.jsxs)(Eu,{justify:`space-between`,align:`center`,gap:24,children:[(0,W.jsxs)(Eu,{align:`center`,gap:6,children:[(0,W.jsx)(Xf,{size:`sm`,className:XB.text,children:o({id:`0ZU/fh`})}),(0,W.jsx)(YB,{classNames:{root:XB.root,input:XB.input,section:XB.section,dropdown:XB.dropdown},data:r.map(String),value:t.toString(),onChange:(e,t)=>a(Number(t.value)),disabled:i})]}),(0,W.jsx)(Xf,{size:`sm`,className:XB.text,children:o({id:`5PgX/3`,values:{startItem:s,endItem:c,totalElements:n}})})]})}var QB={root:`_root_19e85_1`};function $B(){let{isCardView:e,currentPage:t,currentPageSize:n,totalElements:r,totalPages:i,loading:a,withServerPagination:o,handlePageChange:s,handlePageSizeChange:c}=gI(),l=TI.some(e=>e===n)?TI:[...TI,n].sort((e,t)=>e-t),u=Math.max(1,Math.ceil(r/n));return r===0?null:(0,W.jsxs)(Eu,{justify:`space-between`,align:`center`,gap:16,className:QB.root,mod:{"card-view":e},children:[(0,W.jsx)(ZB,{currentPage:t,pageSize:n,totalElements:r,paginationSizes:l,loading:a,onPageSizeChange:c}),(0,W.jsx)(xv,{total:o&&i||u,value:t,onChange:s,disabled:a})]})}function eV(){let{loading:e,isEmpty:t,withPagination:n}=gI();return(0,W.jsxs)(U.Activity,{mode:t&&!e?`hidden`:`visible`,children:[(0,W.jsx)(CI,{}),n&&(0,W.jsx)($B,{})]})}var tV={loadingCell:`_loadingCell_1ncdo_1`,clickableRow:`_clickableRow_1ncdo_5`,actionCell:`_actionCell_1ncdo_9`,selectedRow:`_selectedRow_1ncdo_15`,firstCellContent:`_firstCellContent_1ncdo_19`,collapseButton:`_collapseButton_1ncdo_25`,checkbox:`_checkbox_1ncdo_37`,checkboxInner:`_checkboxInner_1ncdo_41`,expandedRows:`_expandedRows_1ncdo_45`,expandedContent:`_expandedContent_1ncdo_52`};function nV(){let{idKey:e,paginatedData:t=[],columns:n=[],withSelection:r,selection:i=[],loading:a,withCollapsible:o,isRowCollapsible:s,withMultipleCollapse:c=!0,toggleRow:l,renderCollapsed:u,collapsedViewType:d,onRowClick:f,getRowUrl:p}=gI(),[m,h]=(0,U.useState)({}),g=e=>{h(t=>c?{...t,[e]:!t[e]}:{[e]:!t[e]})},_=(e,t)=>{let n=t[e];return n?n.toString():`-`},v=(e,t,n)=>{if(!t.accessor&&!t.render)throw Error(`Column accessor or render function is required`);return t.render?t.render(e,n):Array.isArray(t.accessor)?t.accessor.map(t=>_(t,e)).join(` `):_(t.accessor,e)};return a?(0,W.jsx)(Cb.Tbody,{children:Array.from({length:3}).map((e,t)=>(0,W.jsxs)(Cb.Tr,{children:[n.map((e,n)=>(0,W.jsx)(Cb.Td,{children:n===0&&(o||r)?(0,W.jsxs)(q,{className:tV.firstCellContent,children:[o&&(0,W.jsx)(Ly,{height:16,width:16}),r&&(0,W.jsx)(Ly,{height:20,width:20,circle:!0}),(0,W.jsx)(Ly,{height:20,style:{flex:1}})]}):(0,W.jsx)(Ly,{height:20})},`loading-${t}-${n}`)),f&&(0,W.jsx)(Cb.Td,{children:(0,W.jsx)(Ly,{height:20})})]},`loading-${t}`))}):(0,W.jsx)(Cb.Tbody,{children:t.map((t,a)=>{let c=String(t[e]),h=m[c]||!1,_=i.some(n=>n[e]===t[e]),y=o&&(s?s(t,a):!0),b=d??`table`,{handleClick:x,handleMouseDown:S}=vI(t,f,p);return(0,W.jsxs)(U.Fragment,{children:[(0,W.jsxs)(Cb.Tr,{className:wn(f&&tV.clickableRow,_&&tV.selectedRow,h&&tV.expandedRows),onClick:x,onMouseDown:S,children:[n.map((n,i)=>(0,W.jsx)(Cb.Td,{fz:`md`,lh:`md`,fw:500,children:i===0&&(y||r)?(0,W.jsxs)(q,{className:tV.firstCellContent,children:[y&&(0,W.jsx)(dl,{className:tV.collapseButton,onMouseDown:e=>{e.stopPropagation()},onClick:e=>{e.stopPropagation(),g(c)},children:h?(0,W.jsx)(_I,{width:20,height:20}):(0,W.jsx)(DO,{width:20,height:20})}),r&&(0,W.jsx)(tm,{classNames:{root:tV.checkbox,inner:tV.checkboxInner},checked:_,readOnly:!0,onClick:e=>{e.stopPropagation(),l(t,a,e)}}),v(t,n,a)]}):v(t,n,a)},`${e?String(t[e]):a}-${i}-${String(n.accessor)}`)),f&&(0,W.jsx)(Cb.Td,{className:tV.actionCell,children:(0,W.jsx)(Nm,{children:(0,W.jsx)(gu,{variant:`transparent`,children:(0,W.jsx)(tA,{})})})})]}),y&&h&&u&&b===`table`?(0,W.jsx)(U.Fragment,{children:u(t,a,{view:`table`})},`${a}-expanded`):null,y&&u&&b===`card`?(0,W.jsx)(Cb.Tr,{children:(0,W.jsx)(Cb.Td,{colSpan:n.length+ +!!f,p:0,children:(0,W.jsx)(Ji,{expanded:h,children:(0,W.jsx)(q,{className:tV.expandedContent,children:h?u(t,a,{view:`card`}):null})})})},`${a}-expanded`):null]},a)})})}var rV={checkbox:`_checkbox_oawpz_1`,textLight:`_textLight_oawpz_6`,firstHeaderContent:`_firstHeaderContent_oawpz_10`,checkboxInner:`_checkboxInner_oawpz_20`};function iV(){let{_:e}=OM(),{columns:t=[],withSelection:n,isCurrentPageSelected:r,isCurrentPageIndeterminate:i,loading:a,paginatedData:o=[],withSingleSelection:s,onRowClick:c,toggleCurrentPage:l}=gI(),u=a||!o.length,d=!!c;return(0,W.jsx)(Cb.Thead,{children:(0,W.jsxs)(Cb.Tr,{children:[t.map((e,t)=>(0,W.jsx)(Cb.Th,{className:rV.textLight,children:t===0&&n?(0,W.jsxs)(q,{className:rV.firstHeaderContent,children:[n&&!s&&(0,W.jsx)(tm,{classNames:{root:rV.checkbox,inner:rV.checkboxInner},checked:r,indeterminate:i,onChange:l,disabled:u}),e.header]}):e.header},`${String(e.accessor)}-${t}`)),d&&(0,W.jsx)(Cb.Th,{className:rV.textLight,w:80,children:e({id:`URmyfc`})})]})})}var aV={container:`_container_1xqco_1`,scrollContainer:`_scrollContainer_1xqco_5`};function oV(){let{loading:e,isEmpty:t,paginatedData:n=[],withPagination:r}=gI();return(0,W.jsxs)(U.Activity,{mode:t&&!e?`hidden`:`visible`,children:[(0,W.jsx)(Cb.ScrollContainer,{minWidth:320,classNames:{scrollContainer:aV.scrollContainer},children:(0,W.jsxs)(Cb,{highlightOnHover:n.length>0,classNames:{th:aV.th},children:[(0,W.jsx)(iV,{}),(0,W.jsx)(nV,{})]})}),r&&(0,W.jsx)($B,{})]})}var sV={root:`_root_1yqhv_1`,rootWithBorder:`_rootWithBorder_1yqhv_5`,title:`_title_1yqhv_10`,description:`_description_1yqhv_14`};function cV({className:e,icon:t,title:n,description:r,children:i,titleClassName:a,descriptionClassName:o,withBorder:s=!0,...c}){return(0,W.jsxs)(Vy,{align:`center`,gap:16,className:wn(e,sV.root,{[sV.rootWithBorder]:s}),...c,children:[t,(0,W.jsxs)(Vy,{align:`center`,gap:4,children:[n&&(0,W.jsx)(Xf,{fw:500,size:`lg`,className:wn(sV.title,a),children:n}),r&&(0,W.jsx)(Xf,{size:`lg`,className:wn(sV.description,o),children:r})]}),i]})}var lV={root:`_root_je6aq_1`,title:`_title_je6aq_5`};function uV({title:e,description:t}){let{_:n}=OM();return(0,W.jsx)(cV,{title:e??n({id:`jGE4vv`}),description:t,h:72,className:lV.root,titleClassName:lV.title})}function dV({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M7 4V20`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M17 19V4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M10 6.99998C10 6.99998 7.79053 4.00001 6.99998 4C6.20942 3.99999 4 7 4 7`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M20 17C20 17 17.7905 20 17 20C16.2094 20 14 17 14 17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function fV({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M2 4.66669H4`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2 11.3333H6`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M12 11.3333H14`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M10 4.66669H14`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M4 4.66669C4 4.04543 4 3.73481 4.10149 3.48977C4.23682 3.16307 4.49639 2.90351 4.82309 2.76818C5.06812 2.66669 5.37875 2.66669 6 2.66669C6.62125 2.66669 6.93187 2.66669 7.17693 2.76818C7.5036 2.90351 7.7632 3.16307 7.89853 3.48977C8 3.73481 8 4.04543 8 4.66669C8 5.28794 8 5.59857 7.89853 5.8436C7.7632 6.1703 7.5036 6.42987 7.17693 6.56519C6.93187 6.66669 6.62125 6.66669 6 6.66669C5.37875 6.66669 5.06812 6.66669 4.82309 6.56519C4.49639 6.42987 4.23682 6.1703 4.10149 5.8436C4 5.59857 4 5.28794 4 4.66669Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M8 11.3333C8 10.712 8 10.4014 8.10147 10.1564C8.2368 9.82971 8.4964 9.57011 8.82307 9.43478C9.06813 9.33331 9.37873 9.33331 10 9.33331C10.6213 9.33331 10.9319 9.33331 11.1769 9.43478C11.5036 9.57011 11.7632 9.82971 11.8985 10.1564C12 10.4014 12 10.712 12 11.3333C12 11.9546 12 12.2652 11.8985 12.5102C11.7632 12.8369 11.5036 13.0965 11.1769 13.2318C10.9319 13.3333 10.6213 13.3333 10 13.3333C9.37873 13.3333 9.06813 13.3333 8.82307 13.2318C8.4964 13.0965 8.2368 12.8369 8.10147 12.5102C8 12.2652 8 11.9546 8 11.3333Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}function pV({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 640 640`,width:24,height:24,fill:`currentColor`,...e,children:(0,W.jsx)(`path`,{d:`M278.6 438.6L182.6 534.6C170.1 547.1 149.8 547.1 137.3 534.6L41.3 438.6C28.8 426.1 28.8 405.8 41.3 393.3C53.8 380.8 74.1 380.8 86.6 393.3L128 434.7L128 128C128 110.3 142.3 96 160 96C177.7 96 192 110.3 192 128L192 434.7L233.4 393.3C245.9 380.8 266.2 380.8 278.7 393.3C291.2 405.8 291.2 426.1 278.7 438.6zM352 96L384 96C401.7 96 416 110.3 416 128C416 145.7 401.7 160 384 160L352 160C334.3 160 320 145.7 320 128C320 110.3 334.3 96 352 96zM352 224L448 224C465.7 224 480 238.3 480 256C480 273.7 465.7 288 448 288L352 288C334.3 288 320 273.7 320 256C320 238.3 334.3 224 352 224zM352 352L512 352C529.7 352 544 366.3 544 384C544 401.7 529.7 416 512 416L352 416C334.3 416 320 401.7 320 384C320 366.3 334.3 352 352 352zM352 480L576 480C593.7 480 608 494.3 608 512C608 529.7 593.7 544 576 544L352 544C334.3 544 320 529.7 320 512C320 494.3 334.3 480 352 480z`})})}function mV({...e}){return(0,W.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 640 640`,width:24,height:24,fill:`currentColor`,...e,children:(0,W.jsx)(`path`,{stroke:`currentColor`,d:`M278.6 438.6L182.6 534.6C170.1 547.1 149.8 547.1 137.3 534.6L41.3 438.6C28.8 426.1 28.8 405.8 41.3 393.3C53.8 380.8 74.1 380.8 86.6 393.3L128 434.7L128 128C128 110.3 142.3 96 160 96C177.7 96 192 110.3 192 128L192 434.7L233.4 393.3C245.9 380.8 266.2 380.8 278.7 393.3C291.2 405.8 291.2 426.1 278.7 438.6zM352 544C334.3 544 320 529.7 320 512C320 494.3 334.3 480 352 480L384 480C401.7 480 416 494.3 416 512C416 529.7 401.7 544 384 544L352 544zM352 416C334.3 416 320 401.7 320 384C320 366.3 334.3 352 352 352L448 352C465.7 352 480 366.3 480 384C480 401.7 465.7 416 448 416L352 416zM352 288C334.3 288 320 273.7 320 256C320 238.3 334.3 224 352 224L512 224C529.7 224 544 238.3 544 256C544 273.7 529.7 288 512 288L352 288zM352 160C334.3 160 320 145.7 320 128C320 110.3 334.3 96 352 96L576 96C593.7 96 608 110.3 608 128C608 145.7 593.7 160 576 160L352 160z`})})}var hV={selected:`_selected_gzoet_1`};function gV({value:e,onChange:t,options:n}){return(0,W.jsx)(Eu,{gap:16,children:n.map(n=>(0,W.jsx)(dy,{label:n.label,children:(0,W.jsx)(gu,{size:32,p:0,variant:`subtle`,className:wn({[hV.selected]:e===n.value}),onClick:()=>t(n.value),children:n.icon})},String(n.value)))})}function _V({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M2 18C2 16.4596 2 15.6893 2.34673 15.1235C2.54074 14.8069 2.80693 14.5407 3.12353 14.3467C3.68934 14 4.45956 14 6 14C7.54044 14 8.31066 14 8.87647 14.3467C9.19307 14.5407 9.45926 14.8069 9.65327 15.1235C10 15.6893 10 16.4596 10 18C10 19.5404 10 20.3107 9.65327 20.8765C9.45926 21.1931 9.19307 21.4593 8.87647 21.6533C8.31066 22 7.54044 22 6 22C4.45956 22 3.68934 22 3.12353 21.6533C2.80693 21.4593 2.54074 21.1931 2.34673 20.8765C2 20.3107 2 19.5404 2 18Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M14 18C14 16.4596 14 15.6893 14.3467 15.1235C14.5407 14.8069 14.8069 14.5407 15.1235 14.3467C15.6893 14 16.4596 14 18 14C19.5404 14 20.3107 14 20.8765 14.3467C21.1931 14.5407 21.4593 14.8069 21.6533 15.1235C22 15.6893 22 16.4596 22 18C22 19.5404 22 20.3107 21.6533 20.8765C21.4593 21.1931 21.1931 21.4593 20.8765 21.6533C20.3107 22 19.5404 22 18 22C16.4596 22 15.6893 22 15.1235 21.6533C14.8069 21.4593 14.5407 21.1931 14.3467 20.8765C14 20.3107 14 19.5404 14 18Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2 6C2 4.45956 2 3.68934 2.34673 3.12353C2.54074 2.80693 2.80693 2.54074 3.12353 2.34673C3.68934 2 4.45956 2 6 2C7.54044 2 8.31066 2 8.87647 2.34673C9.19307 2.54074 9.45926 2.80693 9.65327 3.12353C10 3.68934 10 4.45956 10 6C10 7.54044 10 8.31066 9.65327 8.87647C9.45926 9.19307 9.19307 9.45926 8.87647 9.65327C8.31066 10 7.54044 10 6 10C4.45956 10 3.68934 10 3.12353 9.65327C2.80693 9.45926 2.54074 9.19307 2.34673 8.87647C2 8.31066 2 7.54044 2 6Z`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M14 6C14 4.45956 14 3.68934 14.3467 3.12353C14.5407 2.80693 14.8069 2.54074 15.1235 2.34673C15.6893 2 16.4596 2 18 2C19.5404 2 20.3107 2 20.8765 2.34673C21.1931 2.54074 21.4593 2.80693 21.6533 3.12353C22 3.68934 22 4.45956 22 6C22 7.54044 22 8.31066 21.6533 8.87647C21.4593 9.19307 21.1931 9.45926 20.8765 9.65327C20.3107 10 19.5404 10 18 10C16.4596 10 15.6893 10 15.1235 9.65327C14.8069 9.45926 14.5407 9.19307 14.3467 8.87647C14 8.31066 14 7.54044 14 6Z`,stroke:`currentColor`,strokeWidth:`1.5`})]})}function vV({...e}){return(0,W.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,W.jsx)(`path`,{d:`M3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088Z`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M2.5 9H21.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2.5 13H21.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M2.5 17H21.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,W.jsx)(`path`,{d:`M12 21.5V9`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function yV(){let[e,t]=Wt({key:zT.TABLE_VIEW,defaultValue:`list`,getInitialValueInEffect:!1});return{viewType:e,isCardView:e===`grid`,setViewType:t}}function bV(){let{viewType:e,setViewType:t}=yV(),{_:n}=OM();return(0,W.jsx)(gV,{value:e,onChange:t,options:[{value:`list`,label:n({id:`mbM6E8`}),icon:(0,W.jsx)(vV,{})},{value:`grid`,label:n({id:`APYQPm`}),icon:(0,W.jsx)(_V,{})}]})}var xV={menuItem:`_menuItem_16isq_1`,menuItemSelected:`_menuItemSelected_16isq_5`,selectedSorting:`_selectedSorting_16isq_9`,cellWithCheckbox:`_cellWithCheckbox_16isq_13`,checkbox:`_checkbox_16isq_20`,checkboxInner:`_checkboxInner_16isq_24`};function SV({children:e,withSwitchActions:t=!0,...n}){let{_:r}=OM(),{title:i,isCardView:a,withSelection:o,withSingleSelection:s,loading:c,paginatedData:l=[],isCurrentPageSelected:u,isCurrentPageIndeterminate:d,renderFilterSection:f,sortState:p,sortOptions:m,toggleCurrentPage:h,handleSort:g}=gI(),[_,v]=(0,U.useState)(!1),[y,{toggle:b}]=nn(!1),x=p?.field??null,S=p?.direction??null,C=m&&m.length>0,w=m?.find(e=>e.value===x)?.label??null??r({id:`m1SiNS`}),T=e=>e===`asc`?(0,W.jsx)(pV,{width:20,height:20}):e===`desc`?(0,W.jsx)(mV,{width:20,height:20}):(0,W.jsx)(dV,{width:20,height:20}),E=e=>{if(!g)return;let t=`desc`;x===e&&(S===`desc`?t=`asc`:S===`asc`&&(t=`unsorted`)),g({field:e,direction:t})},D=()=>{v(e=>!e)},O=e=>{e.stopPropagation(),h()},k=y||x&&x!==`unsorted`,A=o&&!s&&a;return(0,W.jsxs)(Vy,{gap:16,mb:16,...n,children:[A&&i&&(0,W.jsx)(Yb,{order:3,children:i}),(0,W.jsxs)(Eu,{justify:A||i?`space-between`:`flex-end`,align:`flex-end`,children:[A?(0,W.jsxs)(q,{className:xV.cellWithCheckbox,onClick:O,children:[(0,W.jsx)(tm,{classNames:{root:xV.checkbox,inner:xV.checkboxInner},disabled:c||!l.length,checked:u,indeterminate:d,onChange:h}),(0,W.jsxs)(Xf,{fw:500,children:[r({id:`mCB6Je`}),` `]})]}):i&&(0,W.jsx)(Yb,{order:3,children:i}),(0,W.jsxs)(Eu,{gap:8,children:[e,f&&(0,W.jsx)(jm,{variant:`subtle`,size:`compact-md`,className:wn({[xV.selectedSorting]:_}),leftSection:(0,W.jsx)(fV,{}),onClick:D,children:r({id:`cSev+j`})}),C&&(0,W.jsxs)(eg,{position:`bottom-end`,width:175,onOpen:b,onClose:b,children:[(0,W.jsx)(eg.Target,{children:(0,W.jsx)(jm,{className:wn({[xV.selectedSorting]:k}),variant:`subtle`,size:`compact-md`,leftSection:T(S),children:w})}),(0,W.jsx)(eg.Dropdown,{p:2,children:m?.map(e=>{let t=x===e.value;return(0,W.jsx)(eg.Item,{classNames:{item:wn(xV.menuItem,{[xV.menuItemSelected]:t})},rightSection:t?T(S):null,onClick:()=>E(e.value),children:e.label},e.value)})})]}),t&&(0,W.jsx)(bV,{})]})]}),(0,W.jsx)(Ji,{expanded:_,children:f})]})}function CV({data:e,withClientPagination:t=!0,withServerPagination:n,page:r,pageSize:i,onPageChange:a,onPageSizeChange:o,totalPages:s,totalElements:c}){let[l,u]=(0,U.useState)(1),[d,f]=(0,U.useState)(wI.DEFAULT_PAGE_SIZE),p=a!==void 0||o!==void 0,m=n||p?r??1:l,h=n||p?i??wI.DEFAULT_PAGE_SIZE:d,g=TI.includes(h)?h:wI.DEFAULT_PAGE_SIZE,_=!n&&t,v=Math.max(1,Math.ceil(e.length/g)),y=n?s??1:v,b=Math.max(1,Math.min(m,y)),x=n?c??0:e.length;return{paginatedData:(0,U.useMemo)(()=>{if(n||!_)return e;let t=(b-1)*g,r=t+g;return e.slice(t,Math.min(r,e.length))},[e,b,g,_,n]),currentPage:b,totalPages:y,totalElements:x,handlePageChange:e=>{a?a(e):u(e)},handlePageSizeChange:e=>{o?o(e):(f(e),u(1))},pageSize:g}}var wV=/^\d{4}-\d{2}-\d{2}|^\d{2}[/.-]\d{2}[/.-]\d{4}|^\d{2}[/.-]\d{2}[/.-]\d{2}/,TV=/[^0-9.-]/g;function EV(e){return e instanceof Date?!0:typeof e==`string`?(0,Q.default)(e).isValid()&&wV.test(e):!1}function DV(e,t){return e-t}function OV(e,t){return(0,Q.default)(e).valueOf()-(0,Q.default)(t).valueOf()}function kV(e,t){let n=parseFloat(e.replace(TV,``)),r=parseFloat(t.replace(TV,``));return!isNaN(n)&&!isNaN(r)?n-r:e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}function AV(e,t){return e==null&&t==null?0:e==null?1:t==null?-1:typeof e==`number`&&typeof t==`number`?DV(e,t):EV(e)&&EV(t)?OV(e,t):typeof e==`string`&&typeof t==`string`?kV(e,t):e<t?-1:+(e>t)}function jV(e,t){return t.split(`.`).reduce((e,t)=>{if(typeof e==`object`&&e&&t in e)return e[t]},e)}function MV({data:e,sorting:t,withServerSorting:n,onPageChange:r}){let[i,a]=(0,U.useState)(null),o=t?.sortState,s=t?.onServerSort,c=s===void 0?i:o??null,l=(0,U.useMemo)(()=>(t?.sortOptions??[]).map(e=>e.value),[t?.sortOptions]);return{sortedData:(0,U.useMemo)(()=>{if(n||!c)return e;let{field:t,direction:r}=c;return r===`unsorted`||l.length>0&&!l.includes(t)?e:[...e].sort((e,n)=>{let i=AV(t.includes(`.`)?jV(e,t):e[t],t.includes(`.`)?jV(n,t):n[t]);return r===`desc`?-i:i})},[e,c,l,n]),currentSortState:c,handleSortChange:e=>{let{field:t,direction:n}=e;l.length>0&&!l.includes(t)||(r?.(1),s?s(e):a(n===`unsorted`?null:e))}}}function NV({title:e,columns:t=[],containerProps:n,data:r=[],emptyStateDescription:i,emptyStateTitle:a,idKey:o,loading:s,onSelectionChange:c,withSelection:l,selection:u=[],withSingleSelection:d,externalViewType:f,onPageChange:p,onPageSizeChange:m,page:h,pageSize:g,totalElements:_,totalPages:v,withPagination:y=!0,withServerPagination:b,withCollapsible:x,isRowCollapsible:S,renderCollapsed:C,collapsedViewType:w,withMultipleCollapse:T=!0,withinModal:E,renderHeaderActions:D,withSwitchActions:O=!0,onRowClick:k,getRowUrl:A,renderFilterSection:j,sorting:M}){let{isCardView:N}=yV(),P=f?f===`grid`:N,ee=O&&f==null,[F,I]=(0,U.useState)(null),{sortedData:te,currentSortState:ne,handleSortChange:re}=MV({data:r,sorting:M,withServerSorting:b,onPageChange:p}),{paginatedData:ie,currentPage:L,totalPages:R,totalElements:ae,handlePageChange:oe,handlePageSizeChange:se,pageSize:ce}=CV({data:te,withClientPagination:!b,withServerPagination:b,page:h,pageSize:g,onPageChange:p,onPageSizeChange:m,totalPages:v,totalElements:_}),le=(e,t,n)=>{if(d){let n=u.some(t=>t[o]===e[o]);c?.(n?[]:[e]),I(n?null:t);return}if(n.shiftKey&&F!==null){let e=Math.min(F,t),n=Math.max(F,t),r=ie.slice(e,n+1),i=[...u.filter(e=>!r.some(t=>t[o]===e[o])),...r];c?.(i);return}let r=u.some(t=>t[o]===e[o])?u.filter(t=>t[o]!==e[o]):[...u,e];I(t),c?.(r)},ue=()=>{if(d)return;let e=ie.every(e=>u.some(t=>t[o]===e[o]))?u.filter(e=>!ie.some(t=>e[o]===t[o])):[...u,...ie.filter(e=>!u.some(t=>t[o]===e[o]))];c?.(e)},de=ie.length>0&&ie.every(e=>u.some(t=>t[o]===e[o])),z=u.length>0&&ie.some(e=>u.some(t=>t[o]===e[o]))&&!de,fe={title:e,columns:t,data:ie,emptyStateDescription:i,emptyStateTitle:a,idKey:o,loading:s,onRowClick:k,getRowUrl:A,renderCollapsed:C,collapsedViewType:w,renderHeaderActions:D,selection:u,isRowCollapsible:S,withCollapsible:x,withMultipleCollapse:T,withPagination:y,withSelection:l,withServerPagination:b,withSingleSelection:d,withinModal:E,isCardView:P,isEmpty:!ie.length,checked:de,indeterminate:z,onChange:ue,disabled:s||!ie.length,sortState:ne,sortOptions:M?.sortOptions,handleSort:re,paginatedData:ie,currentPage:L,totalPages:R,totalElements:ae,currentPageSize:ce,handlePageChange:oe,handlePageSizeChange:se,toggleRow:le,toggleCurrentPage:ue,isCurrentPageSelected:de,isCurrentPageIndeterminate:z,renderFilterSection:j};return(0,W.jsx)(hI.Provider,{value:fe,children:(0,W.jsxs)(q,{...n,className:wn(aV.container,n?.className),mod:{"within-modal":E},children:[(0,W.jsx)(SV,{withSwitchActions:ee,children:D?D({selection:u}):null}),(0,W.jsx)(U.Activity,{mode:fe.isEmpty&&!s?`visible`:`hidden`,children:(0,W.jsx)(uV,{title:a,description:i})}),P?(0,W.jsx)(eV,{}):(0,W.jsx)(oV,{})]})})}var PV=NV;function FV({headers:e=[],rows:t=[]}){let n=t.map((e,t)=>{let n={id:t};return e.forEach((e,t)=>{n[`col${t}`]=e}),n}),r=e.map((e,t)=>({header:e,accessor:`col${t}`}));return n.length===0?null:(0,W.jsx)(PV,{idKey:`id`,data:n,columns:r,withPagination:!1,withSwitchActions:!1})}function IV({title:e,content:t,variant:n=`info`}){return(0,W.jsx)(Gf,{icon:(0,U.useMemo)(()=>{switch(n){case`success`:return(0,W.jsx)(kT,{});case`warning`:return(0,W.jsx)(jT,{});case`error`:return(0,W.jsx)(OT,{});default:return(0,W.jsx)(AT,{})}},[n]),title:e,color:{info:`blue`,success:`green`,warning:`yellow`,error:`red`}[n],radius:`md`,children:t})}var LV={actionButton:`_actionButton_fnn5s_1`,primaryActionButton:`_primaryActionButton_fnn5s_12`};function RV({actions:e,onActionClick:t}){return!e||e.length===0?null:(0,W.jsx)(Eu,{gap:`xs`,wrap:`wrap`,mt:`xs`,children:e.map((e,n)=>(0,W.jsx)(jm,{variant:n===0?`filled`:`outline`,size:`sm`,radius:`sm`,className:n===0?LV.primaryActionButton:LV.actionButton,onClick:()=>t?.({type:`action-click`,data:{buttonText:e.buttonText,agentMessage:e.agentMessage,targetAgent:e.targetAgent}}),children:e.buttonText},`${e.buttonText}-${n}`))})}function zV(e){return typeof e==`object`&&!!e}function BV(e){return typeof e==`object`&&!!e&&`responseList`in e}function VV(e){if(typeof e!=`object`||!e)return[];let t=e;if(!t?.activePlan?.details)return[];let n=t.activePlan.details,r={data:`Data`,voice:`Min`,sms:`SMS`};return[`data`,`voice`,`sms`].map(e=>{let t=n[e],i=typeof t==`string`?t:typeof t==`number`?String(t):`-`,a=i.trim().split(/\s+/),o=a.length>1?a.slice(0,-1).join(` `):i,s=a.length>1?a[a.length-1]:null;return{key:e,type:r[e]||e,amount:o,unit:s}})}function HV(e){if(!e)return{price:void 0,suffix:void 0};let t=e.price;if(!t)return{price:void 0,suffix:void 0};let n=t.discount??t.price;return{price:typeof n==`number`?`$${n.toFixed(2)}`:n,suffix:t.showMonthly===!1?void 0:`/mth`}}function UV(e,t){let n=BV(e)?e.responseList:void 0,r=HV(t);if(n&&n.length>1)return{overviewItems:n.map(e=>{let t=VV(e),n=zV(e)?e:void 0;return{billingAccountId:n?.billingAccountId,title:n?.activePlan?.planName,advantages:t,price:r.price,priceSuffix:r.suffix}}),isMultipleAccounts:!0};let i=n?.[0],a=VV(i),o=zV(i)?i:void 0;return{advantages:a,price:r.price,priceSuffix:r.suffix,accountData:o,isMultipleAccounts:!1}}function WV({config:e,onWidgetEvent:t}){let n=UV(e.data,e.visualizationConfig);return n.isMultipleAccounts?(0,W.jsx)(mI,{items:n.overviewItems,title:e.visualizationConfig?.title||`Select Account`,onSelectAccount:e=>{t?.({type:`select-account`,data:{billingAccountId:e}})}}):(0,W.jsx)(mI,{title:n.accountData?.activePlan?.planName||e.visualizationConfig?.title,advantages:n.advantages,price:n.price,priceSuffix:n.priceSuffix,ctaLabel:e.visualizationConfig?.cta?.label,onCtaClick:()=>{t?.({type:`cta-click`,data:{}})}})}function GV(e){return typeof e==`object`&&!!e&&`responseList`in e}function KV(e){return Array.isArray(e)&&e.length>0}function qV(e){switch(e.type){case`actions`:return KV(e.config.actions);case`chart`:case`usage-chart`:return KV(e.config.items);case`offer-card`:case`addon-card`:return KV(e.config.items)||GV(e.config.data);case`table`:return KV(e.config.items);case`highlight-box`:case`info-box`:return!!(e.config.visualizationConfig?.title||e.config.visualizationConfig?.content);case`overview-card`:case`account-overview`:return!!(GV(e.config.data)||e.config.visualizationConfig?.price||e.config.visualizationConfig?.cta||e.config.visualizationConfig?.title);default:return!0}}function JV(e,t){let n=JF(e);if(!n||!qV(n))return{kind:`fallback`,payload:e};switch(n.type){case`chart`:case`usage-chart`:return{kind:`widget`,widget:(0,W.jsx)(iI,{items:n.config.items,title:n.config.visualizationConfig?.title})};case`offer-card`:case`addon-card`:return{kind:`widget`,widget:(0,W.jsx)(sI,{items:GV(n.config.data)?n.config.data.responseList:n.config.items,title:n.config.visualizationConfig?.title,showPricing:n.config.visualizationConfig?.showPricing,onSelectOffer:e=>{t?.({type:`select-offer`,data:{offerId:e}})}})};case`overview-card`:case`account-overview`:return{kind:`widget`,widget:(0,W.jsx)(WV,{config:n.config,onWidgetEvent:t})};case`table`:return{kind:`widget`,widget:(0,W.jsx)(FV,{headers:n.config.visualizationConfig?.headers,rows:n.config.items})};case`highlight-box`:case`info-box`:return{kind:`widget`,widget:(0,W.jsx)(IV,{title:n.config.visualizationConfig?.title,content:n.config.visualizationConfig?.content,variant:n.config.visualizationConfig?.variant})};case`actions`:return{kind:`widget`,widget:(0,W.jsx)(RV,{actions:n.config.actions,onActionClick:t})};default:return{kind:`fallback`,payload:e}}}var YV=e=>e!=null&&(typeof e!=`string`||e.trim()!==``);function XV(e){if(typeof e!=`object`||!e)return!1;let t=Object.values(e);return t.length===0?!1:t.some(YV)}function ZV(e){return e.replace(/(?:\r?\n)?\s*(?:'{3}|"{3}|`{3})\s*$/i,``).replace(/(?:\r?\n)?\s*(?:'{3}|"{3}|`{3})\s*json\s*(?:'{3}|"{3}|`{3})?\s*$/i,``).trimEnd()}function QV(e){return e.replace(/\s*"structuredData"\s*:\s*$/i,``).replace(/\s*\\"structuredData\\"\s*:\s*$/i,``).trimEnd()}function $V(e){return e.replace(/\\r\\n/g,`
|
|
379
379
|
`).replace(/\\n/g,`
|
|
380
|
-
`)}function
|
|
380
|
+
`)}function eH(e){let t=e.trim();if(t.startsWith(`"`)&&t.endsWith(`"`)){let e=EH(t);if(typeof e==`string`)return e}return e}function tH(e){let t=e=>e.replace(/\\\\/g,`\\`).replace(/\\r\\n/g,`\r
|
|
381
381
|
`).replace(/\\n/g,`
|
|
382
|
-
`).replace(/\\t/g,` `).replace(/\\'/g,`'`).replace(/\\"/g,`"`).replace(/\\`/g,"`"),n=e;for(let e=0;e<3;e++){let e=t(n);if(e===n)break;n=e}return n.replace(/('{3})/g,"```").replace(/("{3})/g,"```").replace(/(`{3})/g,"```")}function
|
|
383
|
-
`).trim();e&&t.push({type:`markdown`,content:e}),r.length=0}},a=0;for(;a<n.length;){let e=n[a]??``,o=e.trim(),s=
|
|
384
|
-
`)}function
|
|
382
|
+
`).replace(/\\t/g,` `).replace(/\\'/g,`'`).replace(/\\"/g,`"`).replace(/\\`/g,"`"),n=e;for(let e=0;e<3;e++){let e=t(n);if(e===n)break;n=e}return n.replace(/('{3})/g,"```").replace(/("{3})/g,"```").replace(/(`{3})/g,"```")}function nH(e){return e.split(`|`).map(e=>e.trim()).filter(e=>e!==``)}function rH(e){return e.every(e=>/^:?-+:?$/.test(e)||/^-+$/.test(e))}function iH(e){return e.replace(/\*\*([^*]+)\*\*/g,`$1`).replace(/\*([^*]+)\*/g,`$1`).replace(/`([^`]+)`/g,`$1`).replace(/~~([^~]+)~~/g,`$1`).trim()}function aH(e){let t=[],n=e.split(/\r?\n/),r=[],i=()=>{if(r.length){let e=r.join(`
|
|
383
|
+
`).trim();e&&t.push({type:`markdown`,content:e}),r.length=0}},a=0;for(;a<n.length;){let e=n[a]??``,o=e.trim(),s=nH(e);if(!(o.startsWith(`|`)&&o.endsWith(`|`)&&s.length>=1)){r.push(e),a++;continue}let c=s;if(a++,a>=n.length){r.push(e);continue}let l=n[a]??``,u=nH(l),d=l.trim();if(!(d.startsWith(`|`)&&d.endsWith(`|`)&&u.length>=1)||!rH(u)){r.push(e);continue}a++;let f=[];for(;a<n.length;){let e=n[a]??``,t=e.trim(),r=nH(e);if(!(t.startsWith(`|`)&&t.endsWith(`|`)&&r.length>=1))break;f.push(r.map(iH)),a++}i(),t.push({type:`table`,config:{type:`table`,items:f,visualizationConfig:{headers:c.map(iH)}}})}return i(),t}var oH=/```\s*markdown-ui-widget\s*\n([\s\S]*?)```/g;function sH(e){if(!e?.trim())return[];let t=[],n=0,r;for(oH.lastIndex=0;(r=oH.exec(e))!==null;){let i=e.slice(n,r.index).trim();i&&t.push({type:`markdown`,content:i});let a=r[0],o=r[1].trim();t.push({type:`widget`,dsl:o,raw:a}),n=oH.lastIndex}let i=e.slice(n).trim();return i&&t.push({type:`markdown`,content:i}),t.length>0?t:[{type:`markdown`,content:e}]}function cH(e){let t=e.trim();if(!t||!t.startsWith(`{`))return null;let n=jH(t);if(!n||typeof n!=`object`)return null;let r=n;if(typeof r.type==`string`)return r;let i=tU(n);if(!nU(i))return null;let a=cU(i);return!a||a.type!==`widget`?null:a.config}var lH=new _E(`markdown-json-splitter`);function uH(e,t){let n=QV(t.trim());n&&e.push({type:`markdown`,content:n})}function dH(e,t){let n=fH(jH(t));return n?(e.push(n),`widget`):`consume`}function fH(e){let t=e?tU(e):null;return t&&nU(t)?cU(t):null}function pH(e){let t=[],n=0;for(;;){let r=e.slice(n),i=MH(r);if(!i)break;uH(t,ZV(r.slice(0,i.start))),dH(t,i.json);let a=r.slice(i.start+i.consumed),o=RH(a),s=LH(a.slice(o)),c=i.start+i.consumed+o+s;n+=c}let r=e.slice(n).trim();for(;r;){let e=FH(r);if(!e){IH(r)||t.push({type:`markdown`,content:r});break}uH(t,r.slice(0,e.start)),dH(t,e.fullJson),r=r.slice(e.start+e.consumed).trim()}return t}function mH(e){if(!e?.trim())return[];let t=eH(e),n=pH(tH(t));return lH.debug(`Expanded result`,{chunks:n}),n.length>0?n:[{type:`markdown`,content:t}]}function hH(e){return["```markdown-ui-widget",JSON.stringify(e),"```"].join(`
|
|
384
|
+
`)}function gH(e){let t=sH($V(e??``)),n=[];for(let e of t){if(e.type===`widget`){let t=cH(e.dsl);t?n.push(hH(t)):e.raw.trim()&&n.push(e.raw.trim());continue}let t=mH(e.content);for(let e of t){if(e.type===`widget`){let t=hH(e.config);n.push(t);continue}let t=aH(e.content);for(let e of t)e.type===`markdown`?e.content.trim()&&n.push(e.content.trim()):n.push(hH(e.config))}}return n.join(`
|
|
385
385
|
|
|
386
|
-
`).trim()}var gH=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},`a`,{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),`a`,{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=!1,S=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:x?`pure`:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),C=e(function(e){var r=b(`src`),i=`toString`,a=(``+S).split(i);n.inspectSource=function(e){return S.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||S.call(this)})}),w=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},T=function(e,t,n){if(w(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},E=`prototype`,D=function(e,r,i){var a=e&D.F,o=e&D.G,s=e&D.S,c=e&D.P,l=e&D.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[E],d=o?n:n[r]||(n[r]={}),f=d[E]||(d[E]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?T(g,t):c&&typeof g==`function`?T(Function.call,g):g,u&&C(u,p,g,e&D.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,D.F=1,D.G=2,D.S=4,D.P=8,D.B=16,D.W=32,D.U=64,D.R=128;var O=D,k=Math.ceil,A=Math.floor,j=function(e){return isNaN(e=+e)?0:(e>0?A:k)(e)},M=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},N=function(e){return function(t,n){var r=String(M(t)),i=j(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);O(O.P,`String`,{codePointAt:function(e){return N(this,e)}}),n.String.codePointAt;var P=Math.max,ee=Math.min,F=function(e,t){return e=j(e),e<0?P(e+t,0):ee(e,t)},I=String.fromCharCode,te=String.fromCodePoint;O(O.S+O.F*(!!te&&te.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],F(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?I(a):I(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var ne={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},re={isSpaceSeparator:function(e){return typeof e==`string`&&ne.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||ne.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||ne.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},ie,L,R,ae,oe,se,ce,le,ue,de=function(e,t){ie=String(e),L=`start`,R=[],ae=0,oe=1,se=0,ce=void 0,le=void 0,ue=void 0;do ce=ge(),we[L]();while(ce.type!==`eof`);return typeof t==`function`?z({"":ue},``,t):ue};function z(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=z(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=z(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var fe,pe,me,he,B;function ge(){for(fe=`default`,pe=``,me=!1,he=1;;){B=_e();var e=ve[fe]();if(e)return e}}function _e(){if(ie[ae])return String.fromCodePoint(ie.codePointAt(ae))}function V(){var e=_e();return e===`
|
|
386
|
+
`).trim()}var _H=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},`a`,{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),`a`,{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=!1,S=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:x?`pure`:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),C=e(function(e){var r=b(`src`),i=`toString`,a=(``+S).split(i);n.inspectSource=function(e){return S.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||S.call(this)})}),w=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},T=function(e,t,n){if(w(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},E=`prototype`,D=function(e,r,i){var a=e&D.F,o=e&D.G,s=e&D.S,c=e&D.P,l=e&D.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[E],d=o?n:n[r]||(n[r]={}),f=d[E]||(d[E]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?T(g,t):c&&typeof g==`function`?T(Function.call,g):g,u&&C(u,p,g,e&D.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,D.F=1,D.G=2,D.S=4,D.P=8,D.B=16,D.W=32,D.U=64,D.R=128;var O=D,k=Math.ceil,A=Math.floor,j=function(e){return isNaN(e=+e)?0:(e>0?A:k)(e)},M=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},N=function(e){return function(t,n){var r=String(M(t)),i=j(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);O(O.P,`String`,{codePointAt:function(e){return N(this,e)}}),n.String.codePointAt;var P=Math.max,ee=Math.min,F=function(e,t){return e=j(e),e<0?P(e+t,0):ee(e,t)},I=String.fromCharCode,te=String.fromCodePoint;O(O.S+O.F*(!!te&&te.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],F(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?I(a):I(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var ne={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},re={isSpaceSeparator:function(e){return typeof e==`string`&&ne.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||ne.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||ne.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},ie,L,R,ae,oe,se,ce,le,ue,de=function(e,t){ie=String(e),L=`start`,R=[],ae=0,oe=1,se=0,ce=void 0,le=void 0,ue=void 0;do ce=ge(),we[L]();while(ce.type!==`eof`);return typeof t==`function`?z({"":ue},``,t):ue};function z(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=z(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=z(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var fe,pe,me,he,B;function ge(){for(fe=`default`,pe=``,me=!1,he=1;;){B=_e();var e=ve[fe]();if(e)return e}}function _e(){if(ie[ae])return String.fromCodePoint(ie.codePointAt(ae))}function V(){var e=_e();return e===`
|
|
387
387
|
`?(oe++,se=0):e?se+=e.length:se++,e&&(ae+=e.length),e}var ve={default:function(){switch(B){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
|
|
388
388
|
`:case`\r`:case`\u2028`:case`\u2029`:V();return;case`/`:V(),fe=`comment`;return;case void 0:return V(),ye(`eof`)}if(re.isSpaceSeparator(B)){V();return}return ve[L]()},comment:function(){switch(B){case`*`:V(),fe=`multiLineComment`;return;case`/`:V(),fe=`singleLineComment`;return}throw De(V())},multiLineComment:function(){switch(B){case`*`:V(),fe=`multiLineCommentAsterisk`;return;case void 0:throw De(V())}V()},multiLineCommentAsterisk:function(){switch(B){case`*`:V();return;case`/`:V(),fe=`default`;return;case void 0:throw De(V())}V(),fe=`multiLineComment`},singleLineComment:function(){switch(B){case`
|
|
389
389
|
`:case`\r`:case`\u2028`:case`\u2029`:V(),fe=`default`;return;case void 0:return V(),ye(`eof`)}V()},value:function(){switch(B){case`{`:case`[`:return ye(`punctuator`,V());case`n`:return V(),be(`ull`),ye(`null`,null);case`t`:return V(),be(`rue`),ye(`boolean`,!0);case`f`:return V(),be(`alse`),ye(`boolean`,!1);case`-`:case`+`:V()===`-`&&(he=-1),fe=`sign`;return;case`.`:pe=V(),fe=`decimalPointLeading`;return;case`0`:pe=V(),fe=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:pe=V(),fe=`decimalInteger`;return;case`I`:return V(),be(`nfinity`),ye(`numeric`,1/0);case`N`:return V(),be(`aN`),ye(`numeric`,NaN);case`"`:case`'`:me=V()===`"`,pe=``,fe=`string`;return}throw De(V())},identifierNameStartEscape:function(){if(B!==`u`)throw De(V());V();var e=Ce();switch(e){case`$`:case`_`:break;default:if(!re.isIdStartChar(e))throw ke();break}pe+=e,fe=`identifierName`},identifierName:function(){switch(B){case`$`:case`_`:case``:case``:pe+=V();return;case`\\`:V(),fe=`identifierNameEscape`;return}if(re.isIdContinueChar(B)){pe+=V();return}return ye(`identifier`,pe)},identifierNameEscape:function(){if(B!==`u`)throw De(V());V();var e=Ce();switch(e){case`$`:case`_`:case``:case``:break;default:if(!re.isIdContinueChar(e))throw ke();break}pe+=e,fe=`identifierName`},sign:function(){switch(B){case`.`:pe=V(),fe=`decimalPointLeading`;return;case`0`:pe=V(),fe=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:pe=V(),fe=`decimalInteger`;return;case`I`:return V(),be(`nfinity`),ye(`numeric`,he*(1/0));case`N`:return V(),be(`aN`),ye(`numeric`,NaN)}throw De(V())},zero:function(){switch(B){case`.`:pe+=V(),fe=`decimalPoint`;return;case`e`:case`E`:pe+=V(),fe=`decimalExponent`;return;case`x`:case`X`:pe+=V(),fe=`hexadecimal`;return}return ye(`numeric`,he*0)},decimalInteger:function(){switch(B){case`.`:pe+=V(),fe=`decimalPoint`;return;case`e`:case`E`:pe+=V(),fe=`decimalExponent`;return}if(re.isDigit(B)){pe+=V();return}return ye(`numeric`,he*Number(pe))},decimalPointLeading:function(){if(re.isDigit(B)){pe+=V(),fe=`decimalFraction`;return}throw De(V())},decimalPoint:function(){switch(B){case`e`:case`E`:pe+=V(),fe=`decimalExponent`;return}if(re.isDigit(B)){pe+=V(),fe=`decimalFraction`;return}return ye(`numeric`,he*Number(pe))},decimalFraction:function(){switch(B){case`e`:case`E`:pe+=V(),fe=`decimalExponent`;return}if(re.isDigit(B)){pe+=V();return}return ye(`numeric`,he*Number(pe))},decimalExponent:function(){switch(B){case`+`:case`-`:pe+=V(),fe=`decimalExponentSign`;return}if(re.isDigit(B)){pe+=V(),fe=`decimalExponentInteger`;return}throw De(V())},decimalExponentSign:function(){if(re.isDigit(B)){pe+=V(),fe=`decimalExponentInteger`;return}throw De(V())},decimalExponentInteger:function(){if(re.isDigit(B)){pe+=V();return}return ye(`numeric`,he*Number(pe))},hexadecimal:function(){if(re.isHexDigit(B)){pe+=V(),fe=`hexadecimalInteger`;return}throw De(V())},hexadecimalInteger:function(){if(re.isHexDigit(B)){pe+=V();return}return ye(`numeric`,he*Number(pe))},string:function(){switch(B){case`\\`:V(),pe+=xe();return;case`"`:if(me)return V(),ye(`string`,pe);pe+=V();return;case`'`:if(!me)return V(),ye(`string`,pe);pe+=V();return;case`
|
|
@@ -396,12 +396,12 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
396
396
|
`+t+`}`}}return r.pop(),i=t,m}function g(e){if(e.length===0)return m(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!re.isIdStartChar(t))return m(e,!0);for(var n=t.length;n<e.length;n++)if(!re.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return m(e,!0);return e}function _(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=[],a=0;a<e.length;a++){var o=p(String(a),e);n.push(o===void 0?`null`:o)}var c;if(n.length===0)c=`[]`;else if(s===``)c=`[`+n.join(`,`)+`]`;else{var l=`,
|
|
397
397
|
`+i,u=n.join(l);c=`[
|
|
398
398
|
`+i+u+`,
|
|
399
|
-
`+t+`]`}return r.pop(),i=t,c}}}}))}));function
|
|
399
|
+
`+t+`]`}return r.pop(),i=t,c}}}}))}));function vH(e){let t=e.indexOf(`{`),n=e.indexOf(`[`);return t===-1?n:n===-1?t:Math.min(t,n)}function yH(e){return e===`{`||e===`[`}function bH(e){return e===`}`||e===`]`}function xH(e){return e===`}`?`{`:`[`}function SH(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(yH(t)){n.push(t);continue}if(bH(t)&&(n[n.length-1]===xH(t)&&n.pop(),n.length===0))return{end:a+1,openStack:[],inString:!1}}}return{end:null,openStack:n,inString:r}}function CH(e){let t=vH(e);if(t<0)return e;let{end:n,openStack:r,inString:i}=SH(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 wH(e,t){return SH(e,t).end}var TH=l(_H());function EH(e){try{return JSON.parse(e)}catch{return null}}function DH(e){return EH(e)??(()=>{try{return TH.default.parse(e)}catch{return null}})()}function OH(e){return e.replace(/\\r\\n/g,`
|
|
400
400
|
`).replace(/\\n/g,`
|
|
401
|
-
`).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\//g,`/`).replace(/\\\\/g,`\\`)}function
|
|
402
|
-
`)}function pU(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.structuredData&&typeof t.structuredData==`object`?t.structuredData:null;return typeof t.renderAs==`string`||typeof n?.renderAs==`string`}function mU(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:AH(t)}function hU(e,t){return(0,U.useMemo)(()=>{let n=hH(e),r=mU(n);if(r)return pU(r)?[{type:`markdown`,key:`json-0`,content:uU(fU(r))}]:[];let i=oH(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=dU(a,e.content,o);continue}try{let n=sH(e.dsl);if(!n){let t=mU(e.dsl);if(t&&!pU(t))continue;o=dU(a,t?fU(t):e.raw,o);continue}let r=qV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=dU(a,fU(r.payload),o)}catch(t){cU.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=dU(a,e.raw,o)}}return a},[e,t])}var gU={agentChatMdRenderer:`_agentChatMdRenderer_3p9l_1`},_U=(0,U.memo)(({content:e,onWidgetEvent:t})=>{let n=hU(e,t);return n.length===0?null:(0,W.jsx)(q,{className:gU.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,W.jsx)(fP,{html:e.content},e.key):(0,W.jsx)(q,{children:e.widget},e.key))})});_U.displayName=`AgentMarkdownRenderer`;function vU({mode:e=`thinking`,autoCycle:t=!0,cycleMs:n=2e3,exploringAfterMs:r=2e3,writingAfterMs:i=8e3,messages:a}){let[o,s]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(!t)return;s(0);let e=setInterval(()=>{s(e=>e+1)},n);return()=>clearInterval(e)},[t,n]);let c=(0,U.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,U.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 yU({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}=vU({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,W.jsxs)(Eu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,W.jsx)(Xf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,W.jsx)(cu,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,W.jsx)(Xf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var bU={body:`_body_oytjg_1`,messageBubble:`_messageBubble_oytjg_21`,messageItem:`_messageItem_oytjg_35`,messageItemEnter:`_messageItemEnter_oytjg_43`,messageSlideUp:`_messageSlideUp_oytjg_1`,streamingDots:`_streamingDots_oytjg_57`,streamingDot:`_streamingDot_oytjg_57`,streamingDotBounce:`_streamingDotBounce_oytjg_1`,messageItemUser:`_messageItemUser_oytjg_88`,messageItemAssistant:`_messageItemAssistant_oytjg_93`,messageBubbleUser:`_messageBubbleUser_oytjg_97`,messageText:`_messageText_oytjg_108`,messageBubbleAssistant:`_messageBubbleAssistant_oytjg_115`,messageTime:`_messageTime_oytjg_124`,messageTimeUser:`_messageTimeUser_oytjg_133`,messageTimeAssistant:`_messageTimeAssistant_oytjg_137`,messageList:`_messageList_oytjg_141`},xU=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}),SU=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:xU.format(t)};function CU({messages:e,assistantDisplayName:t,isLoading:n,error:r,scrollViewportRef:i,onWidgetEvent:a}){let o=e.filter(e=>e.sentBy!==`assistant`||e.isStreaming?!0:!!e.text.trim());return(0,W.jsx)(Vy,{className:bU.body,gap:0,children:(0,W.jsx)(sl,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:i,children:(0,W.jsxs)(Vy,{className:bU.messageList,gap:0,children:[o.map((e,n)=>{let r=e.sentBy===`user`,i=SU(e.createdAt),o=e.sentBy===`assistant`&&e.isStreaming&&e.text.length===0,s=e.sentBy===`assistant`?e.relatedAgent??t:null,c=e.sentBy===`assistant`?[s,i].filter(Boolean).join(` · `):i;return(0,W.jsxs)(q,{className:`${bU.messageItem} ${bU.messageItemEnter} ${r?bU.messageItemUser:bU.messageItemAssistant}`,style:{animationDelay:`${n*70}ms`},children:[(0,W.jsx)(gl,{className:`${bU.messageBubble} ${r?bU.messageBubbleUser:bU.messageBubbleAssistant}`,children:e.sentBy===`assistant`?o?(0,W.jsxs)(`span`,{className:bU.streamingDots,"aria-hidden":!0,children:[(0,W.jsx)(`span`,{className:bU.streamingDot}),(0,W.jsx)(`span`,{className:bU.streamingDot}),(0,W.jsx)(`span`,{className:bU.streamingDot})]}):(0,W.jsx)(_U,{content:e.text,onWidgetEvent:a}):(0,W.jsx)(Xf,{c:`inherit`,className:bU.messageText,children:e.text})}),c&&(0,W.jsx)(Xf,{size:`xs`,fw:800,className:`${bU.messageTime} ${r?bU.messageTimeUser:bU.messageTimeAssistant}`,children:c})]},e.id)}),n&&(0,W.jsx)(gl,{className:`${bU.messageBubble} ${bU.messageBubbleAssistant}`,children:(0,W.jsx)(yU,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})}),r&&(0,W.jsx)(Gf,{color:`red`,variant:`light`,radius:`md`,children:r})]})})})}var wU={root:`_root_uvs6g_1`,input:`_input_uvs6g_6`,section:`_section_uvs6g_34`};function TU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,W.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:wU.root,input:wU.input,section:wU.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function EU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...lI(e),...t,children:[(0,W.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`}),(0,W.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,W.jsx)(`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`})]})}function DU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...lI(e),...t,children:(0,W.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function OU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Uj();return(0,W.jsx)(dy,{label:e?`Stop recording`:`Voice input`,children:(0,W.jsx)(gu,{onClick:n,disabled:t,size:r??`lg`,radius:`md`,variant:e?`filled`:`subtle`,color:e?`red`:`primary`,"aria-label":e?`Stop voice recording`:`Start voice recording`,styles:{root:e?void 0:{backgroundColor:`transparent`,boxShadow:`inset 0 0 0 1px ${i.other.color[`primary-light`]}33`}},children:e?(0,W.jsx)(DU,{size:`sm`}):(0,W.jsx)(EU,{size:`sm`})})})}function kU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...lI(e),...t,children:[(0,W.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,W.jsx)(`path`,{d:`M22 2 11 13`})]})}var AU={footer:`_footer_11ov5_1`,actionGroup:`_actionGroup_11ov5_8`,replyHint:`_replyHint_11ov5_12`,poweredBy:`_poweredBy_11ov5_19`};function jU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,isVoiceSupported:i,canSend:a,onSubmit:o,onToggleVoice:s,showBusyCancel:c=!1,onCancelBusy:l}){let u=i?74:40;return(0,W.jsxs)(Vy,{className:AU.footer,gap:`sm`,children:[(0,W.jsx)(TU,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:u,rightSection:(0,W.jsxs)(Eu,{className:AU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,W.jsx)(OU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),c&&l?(0,W.jsx)(dy,{label:`Your message was sent — stop the assistant reply`,children:(0,W.jsx)(gu,{onClick:l,size:30,radius:`md`,variant:`filled`,color:`red`,"aria-label":`Stop assistant reply after your message was sent`,children:(0,W.jsx)(DU,{size:`sm`})})}):(0,W.jsx)(gu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`primary`,"aria-label":`Send message`,children:(0,W.jsx)(kU,{size:`sm`})})]})}),c?(0,W.jsx)(Xf,{size:`xs`,c:`dimmed`,ta:`center`,className:AU.replyHint,children:`Your message was sent — you can stop the incoming reply.`}):null,(0,W.jsx)(Xf,{ta:`center`,size:`xs`,c:`dimmed`,className:AU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function MU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...lI(e),...t,children:[(0,W.jsx)(`rect`,{x:`4`,y:`4`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`}),(0,W.jsx)(`rect`,{x:`4`,y:`9.75`,width:`10`,height:`2.5`,rx:`1.2`,fill:`currentColor`,opacity:`0.88`}),(0,W.jsx)(`rect`,{x:`4`,y:`15.5`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`})]})}function NU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...lI(e),...t,children:(0,W.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`})})}function PU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...lI(e),...t,children:[(0,W.jsx)(`path`,{d:`M21 12a9 9 0 1 1-3-6.7`}),(0,W.jsx)(`path`,{d:`M21 3v6h-6`})]})}var FU={header:`_header_11nfx_19`,headerLeft:`_headerLeft_11nfx_32`,headerInfo:`_headerInfo_11nfx_37`,orbContainer:`_orbContainer_11nfx_41`,orbOuter:`_orbOuter_11nfx_55`,orbPulse:`_orbPulse_11nfx_1`,orbMiddle:`_orbMiddle_11nfx_64`,orbInner:`_orbInner_11nfx_73`,orbFloat:`_orbFloat_11nfx_1`,headerMeta:`_headerMeta_11nfx_86`,statusDot:`_statusDot_11nfx_90`,statusText:`_statusText_11nfx_104`,headerActions:`_headerActions_11nfx_113`,closeButton:`_closeButton_11nfx_120`,title:`_title_11nfx_131`,topSubHeader:`_topSubHeader_11nfx_143`,subHeaderLeft:`_subHeaderLeft_11nfx_153`,subHeaderIcon:`_subHeaderIcon_11nfx_159`,subHeaderTitle:`_subHeaderTitle_11nfx_170`,subHeaderStatus:`_subHeaderStatus_11nfx_176`};function IU({panelTitle:e,isLoading:t,isOnline:n,showResetChat:r=!1,onResetChat:i,onClose:a}){let o=Uj();return(0,W.jsxs)(Ef,{className:FU.header,align:`center`,justify:`space-between`,children:[(0,W.jsxs)(Eu,{className:FU.headerLeft,wrap:`nowrap`,gap:10,align:`center`,children:[(0,W.jsxs)(q,{className:FU.orbContainer,"data-loading":t||void 0,children:[(0,W.jsx)(q,{className:FU.orbOuter}),(0,W.jsx)(q,{className:FU.orbMiddle}),(0,W.jsx)(q,{className:FU.orbInner,children:(0,W.jsx)(MU,{size:`sm`,color:o.other.color[`text-white`]})})]}),(0,W.jsxs)(Vy,{className:FU.headerInfo,gap:2,justify:`center`,children:[(0,W.jsx)(Xf,{className:FU.title,fw:800,children:e}),(0,W.jsxs)(Eu,{className:FU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,W.jsx)(q,{className:FU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,W.jsx)(Xf,{className:FU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,W.jsxs)(Eu,{className:FU.headerActions,wrap:`nowrap`,gap:6,children:[r&&i?(0,W.jsx)(dy,{label:`Reset chat and sign in again`,children:(0,W.jsx)(gu,{variant:`subtle`,size:`md`,radius:`md`,onClick:i,className:FU.closeButton,"aria-label":`Reset chat and sign in again`,children:(0,W.jsx)(PU,{size:`sm`})})}):null,(0,W.jsx)(dy,{label:`Close`,children:(0,W.jsx)(gu,{variant:`subtle`,size:`md`,radius:`md`,onClick:a,className:FU.closeButton,"aria-label":`Close agent chat`,children:(0,W.jsx)(NU,{size:`sm`})})})]})]})}function LU(e){return e.some(e=>e.sentBy===`assistant`?e.text.trim()?!0:!!(e.popup?.comparisonModal||e.popup?.title||e.popup?.subtitle||e.popup?.body):!1)}function RU({messages:e,runtimeInfo:t,error:n}){let r=t.hasCustomerToken&&t.hasGenaiToken,i=LU(e);return{hasCredentials:r,hasAssistantResponse:i,isOnline:r&&(!n||i)}}var zU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function BU({visible:e,onClose:t,messages:n,composerText:r,onComposerTextChange:i,isLoading:a,isAssistantStreaming:o=!1,error:s,canSend:c,onSubmit:l,isListening:u,isVoiceSupported:d,onToggleVoice:f,actions:p,onActionClick:m,assistantDisplayName:h,panelTitle:g,runtimeInfo:_,scrollViewportRef:v,actualWidth:y=420,floatingTop:b=`var(--mantine-custom-space-150)`,floatingHeight:x=`100%`,floatingMaxHeight:S=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,shellGap:C=`var(--mantine-custom-space-150)`,panelHeaderHeight:w=56,panelResizableWidth:T,panelBorder:E,panelBorderRadius:D,zIndex:O,chatPopupOpened:k=!1,onChatPopupClose:A,chatPopupMessage:j,chatPopupSize:M=`xl`,hostContainerSelector:N,showBusyCancel:P=!1,onCancelBusy:ee,showResetChat:F=!1,onResetChat:I}){let{isOnline:te}=RU({messages:n,runtimeInfo:_,error:s}),ne=a||o,re=(O??999999)+50,ie=`calc(${y}px + ${C})`,L=e=>{if(e.type===`action-click`&&e.data){let t=p.find(t=>t.buttonText===e.data?.buttonText);t&&m(t)}};if(!e)return null;let R=typeof D==`number`?`${D}px`:D;return(0,W.jsxs)(q,{className:zU.root,style:{width:y,maxWidth:`calc(100vw - var(--mantine-custom-space-400) - var(--mantine-custom-space-400))`,height:x,maxHeight:S,top:b,right:C,zIndex:O,"--agent-widget-panel-header-height":`${w}px`,"--agent-widget-shell-gap":C,"--agent-widget-panel-border":E,"--agent-widget-panel-radius":R},children:[T&&(0,W.jsx)(q,{onPointerDown:T.handlePointerDown,className:zU.resizeHandle,style:T.style}),(0,W.jsxs)(q,{className:zU.surface,children:[(0,W.jsx)(IU,{panelTitle:g,isLoading:ne,isOnline:te,showResetChat:F,onResetChat:I,onClose:t}),(0,W.jsx)(CU,{messages:n,assistantDisplayName:h,isLoading:a,error:s,scrollViewportRef:v,onWidgetEvent:L}),(0,W.jsx)(jU,{composerText:r,onComposerTextChange:i,isLoading:ne,isListening:u,isVoiceSupported:d,canSend:c,onSubmit:l,onToggleVoice:f,showBusyCancel:P,onCancelBusy:ee})]}),A?(0,W.jsx)(iN,{opened:k,onClose:A,message:j,isAssistantStreaming:o,size:M,zIndex:re,layoutTop:b,layoutHeight:x,layoutLeftOffset:C,layoutRightOffset:ie,hostContainerSelector:N}):null]})}function VU(e){return(0,U.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function HU(e){return typeof e==`object`&&!!e}function UU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function WU(e){if(Array.isArray(e))return e.filter(HU);if(!HU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(HU);if(HU(n)){let e=WU(n);if(e.length>0)return e}}for(let t of Object.values(e))if(Array.isArray(t)){let e=t.filter(HU);if(e.length>0)return e}return[]}function GU(e){let t=UU(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 KU(e){let t=UU(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 qU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>KU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=GU(e);return t?[t]:[]}function JU(e){return WU(e).flatMap(e=>qU(e))}var YU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},XU=pE(e=>({...YU,setRuntimeInfo:t=>e({runtimeInfo:t}),updateCustomerId:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,customerId:t}})),updateCustomerToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasCustomerToken:t}})),updateGenaiToken:t=>e(e=>({runtimeInfo:{...e.runtimeInfo,hasGenaiToken:t}})),resetRuntimeInfo:()=>e({runtimeInfo:YU.runtimeInfo})})),ZU=24e4;async function QU(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await DE.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 $U(e,t){try{let n=await DE.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 eW(e,t){try{return(await DE.post(`/agent-message`,e,{anonymous:!0,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function tW(e,t){try{return(await DE.post(`/agentic-app-chat`,e,{anonymous:!0,timeout:ZU,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function nW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await DE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function rW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await DE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var iW={loginToGenai:QU,switchTenant:$U,sendAgentMessage:eW,sendAgenticAppChat:tW,fetchAssistants:nW,fetchAgenticApps:rW};function aW({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return tS({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var oW=aW({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>iW.fetchAgenticApps(e)}),sW=aW({mutationKey:[`genai`,`assistants`],mutationFn:async e=>iW.fetchAssistants(e)});function cW(e,t){let n=typeof e==`number`&&e>0;return n&&t.length===0||n&&t.includes(e)?e:t[0]}function lW(e,t,n){let{mutateAsync:r}=sW(),{mutateAsync:i}=oW(),{isMultiAgent:a}=VU(e),[o,s]=(0,U.useState)(null),c=(0,U.useRef)(null),l=(0,U.useRef)(null),u=_T(),d=yT(),f=d?Number(d):null,p=xT();(0,U.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(JU(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=cW(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function uW(){let e=(0,U.useContext)(AM),{agentType:t}=VU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=lW(e?.agentType,e?.assistantId,!!e),i=(0,U.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 dW(){let e=(0,U.useContext)(jM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function fW(){let e=dW();return(0,U.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var pW=aW({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e,signal:t})=>iW.sendAgenticAppChat(e,{signal:t})}),mW=aW({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e,signal:t})=>iW.sendAgentMessage(e,{signal:t})});function hW(){let e=mW(),t=pW();return{sendChatMessage:(0,U.useCallback)(async n=>{let{agentType:r,message:i,selectedAgentId:a,customerId:o,customerToken:s,chatId:c,signal:l}=n;return r===`MULTI`?t.mutateAsync({payload:{message:i,app_id:a,...o?{unique_user_id:o}:{}},signal:l}):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}`}}},signal:l})},[e,t])}}function gW(e){return e.assistantId??null}function _W(e){return e.assistantLabel?.trim()||`Assistant`}function vW(e){return gW(e)?e.assistantInitialMessage??null:null}var yW=`popup`;function bW(e){return e&&typeof e==`object`?e:null}function xW(e){return typeof e==`string`&&e.trim()||null}function SW(e){return typeof e==`string`?e:null}function CW(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:Array.isArray(e)?e.map(e=>e===null||typeof e==`string`||typeof e==`number`?e:JSON.stringify(e)).filter(e=>e!==void 0):e&&typeof e==`object`?e:String(e)}function wW(e){let t=bW(e);if(!t)return null;let n=xW(t.title),r=xW(t.subtitle);if(!n||!r||!Array.isArray(t.columns)||t.columns.length===0)return null;let i=t.columns.map(e=>{let t=bW(e),n=bW(t?.header),r=bW(t?.specs),i=bW(t?.selectButton);if(!t||!n||!r)return null;let a=xW(n.label),o=xW(n.offerName),s=xW(t.columnType)??`default`;return!a||!o?null:{columnType:s,header:{label:a,offerName:o,badge:SW(n.badge)},specs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,CW(t)])),selectButton:i&&typeof i.buttonText==`string`&&typeof i.value==`string`?{buttonText:i.buttonText,value:i.value}:null}}).filter(e=>e!==null);return i.length>0?{title:n,subtitle:r,columns:i}:null}function TW(e){let t=bW(e);if(!t)return null;let n=xW(t.title),r=xW(t.subtitle),i=xW(t.body);return!n&&!r&&!i?null:{...n?{title:n}:{},...r?{subtitle:r}:{},...i?{body:i}:{}}}function EW(e){let t=xW(e.relatedAgent)??void 0,n=wW(e.comparisonModal);if(n)return{popup:{...t?{relatedAgent:t}:{},comparisonModal:n},summary:`${n.title} is ready. Open the comparison popup to review the market offers side by side.`};let r=TW(e);return r?{popup:r,summary:r.body??r.subtitle??r.title??`The popup details are ready to review.`}:null}function DW(e){return[bW(e.structuredData)?.renderAs,e.renderAs].some(e=>typeof e==`string`&&e.trim()===yW)}function OW(e){let t=bW(e.structuredData);return[bW(t?.popup),bW(e.popup),bW(t?.popupResponse),bW(e.popupResponse),t,e].filter(e=>e!==null)}function kW(e){let t=bW(e);if(!t||!DW(t))return null;for(let e of OW(t)){let t=EW(e);if(t)return t}return null}function AW(e){return e.replace(/\n{3,}/g,`
|
|
401
|
+
`).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\//g,`/`).replace(/\\\\/g,`\\`)}function kH(e){return e&&e.replace(/([{\s,])([A-Za-z0-9_@$-]+)\s*:/g,(e,t,n)=>`${t}"${n}":`)}function AH(e){let t=e.trim();t=t.replace(/[""]/g,`"`).replace(/['']/g,`'`),t=t.replace(/,\s*([}\]])/g,`$1`);try{t=kH(t)}catch{}return t=CH(t),DH(t)}function jH(e){if(!e||typeof e!=`string`)return null;let t=EH(e);if(t!=null)return t;try{let t=TH.default.parse(e);if(t!=null)return t}catch{}if(e.includes(`\\"`)||e.includes(`\\n`)||e.includes(`\\r`)||e.includes(`\\\\`)){let t=DH(OH(e));if(t!=null)return t}try{return AH(e)}catch{return null}}function MH(e){let t=vH(e);if(t<0)return null;let n=wH(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:CH(r).trim(),consumed:r.length}}var NH=`"structuredData":`,PH=`\\"structuredData\\":`;function FH(e){let t=e.indexOf(NH);if(t<0&&(t=e.indexOf(PH)),t<0)return null;let n=t+17,r=e.indexOf(`{`,n);if(r<0||r>n+10)return null;let i=wH(e,r),a,o;i===null?(a=e.slice(t,r).trim()+CH(e.slice(r)).trim(),o=e.length-t):(a=e.slice(t,i).trim(),o=i-t),t===e.indexOf(PH)&&(a=a.replace(/\\"/g,`"`));let s=`{`+a+`}`;return{start:t,fullJson:s,consumed:o}}function IH(e){let t=e.trim();if(!t||t.length<10)return!1;let n=vH(t);return n>=0&&wH(t,n)===null&&t.length-n>10}function LH(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 RH(e){return/^\s*(?:[\]}]+\s*)+/.exec(e)?.[0].length??0}function zH(e){return e&&typeof e==`object`?e:null}function BH(e){return Array.isArray(e)?e:[]}function VH(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 HH(e,t,n){let r=VH(e.used)??VH(e.currentValueRaw)??0,i=VH(e.allowance),a=VH(e.remaining),o=i??VH(e.total)??(r!=null&&a!=null?r+a:null)??VH(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?VH(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 UH(e){let t=[],n=BH(e?.responseList);for(let e of n){let n=HH(e,typeof e.type==`string`?e.type:`usage`,!0);n&&t.push(n)}return t.length>0?t:null}function WH(e){let t=e.items;if(Array.isArray(t)&&t.length>0){let e=zH(t[0]);if(e)return e}return e}function GH(e){let t=zH(e),n=zH(zH(t?.structuredData)?.data??t?.data);if(!n)return null;let r=UH(n);if(r)return r;let i=BH(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=WH(e);if(!n)continue;let r=HH(n,t);r&&a.push(r)}return a.length>0?a:null}function KH(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function qH(e){return e&&typeof e==`object`?e:null}function JH(e){if(!e||typeof e!=`object`)return null;let t=e,n=KH(t.buttonText);if(!n)return null;let r=KH(t.targetAgent)??void 0;return{buttonText:n,agentMessage:KH(t.agentMessage)??r??n,...r?{targetAgent:r}:{}}}function YH(e){let t=qH(e);if(!t)return null;let n=qH(t.structuredData)??t,r=KH(n.renderAs??t.renderAs);if(r&&r!==`actionButtons`||!Array.isArray(n.actions))return null;let i=n.actions.map(JH).filter(e=>e!==null);return i.length===0?null:{actions:i}}function XH(e){return e&&typeof e==`object`?e:null}function ZH(e){if(typeof e!=`string`)return null;switch(e.trim()){case`actionButtons`:case`actions`:return`actions`;case`chart`:return`chart`;case`usageChart`:return`usage-chart`;case`offerCard`:return`offer-card`;case`addonCard`:return`addon-card`;case`overviewCard`:return`overview-card`;case`accountOverview`:return`account-overview`;case`table`:return`table`;case`highlightBox`:return`highlight-box`;case`infoBox`:return`info-box`;case`link`:return`link`;case`card`:return`overview-card`;default:return null}}function QH(e){let t=XH(e);if(!t)return null;let n=XH(t.structuredData),r=[n?.renderAs,t.renderAs,XH(n?.visualization)?.type,XH(n?.visualizationConfig)?.visualizationType,n?.visualizationType,XH(t.visualization)?.type,XH(t.visualizationConfig)?.visualizationType,t.visualizationType];for(let e of r){let t=ZH(e);if(t)return t;if(typeof e==`string`)return e.trim()}return null}function $H(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 eU(e){let t=XH(e);if(!t)return null;let n=XH(t.structuredData),r=n?.data??t.data,i=XH(n?.visualization),a=XH(t.visualization);return{data:r,visualizationConfig:i?.config??a?.config??t.visualizationConfig,renderAs:QH(e),responseType:$H(n?.responseType??t.responseType)}}function tU(e){let t=XH(e);return!t||XH(t.structuredData)?e:typeof t.renderAs==`string`||typeof t.responseType==`string`||XH(t.visualization)||XH(t.visualizationConfig)||typeof t.visualizationType==`string`||t.data!==void 0?{structuredData:t}:e}function nU(e){let t=XH(e);return t?XH(t.structuredData)||XH(t.visualization)||XH(t.visualizationConfig)||Array.isArray(t.actions)?!0:typeof t.renderAs==`string`||typeof t.visualizationType==`string`||typeof t.responseType==`string`:!1}var rU=new _E(`widget-config-builder`);function iU(e){return e&&typeof e==`object`?e:null}function aU(e){if(!Array.isArray(e))return null;let t=e.map(e=>String(e??``).trim()).filter(Boolean);return t.length>0?t:null}function oU(e){if(!Array.isArray(e))return null;let t=e.map(e=>Array.isArray(e)?e.map(e=>String(e??``).trim()):null).filter(e=>Array.isArray(e)&&e.length>0);return t.length>0?t:null}function sU(e,t){let n=iU(e),r=iU(n?.structuredData),i=iU(t?.data),a=iU(t?.visualizationConfig),o=r??n,s=aU(a?.headers)??aU(o?.headers)??aU(o?.columns)??aU(i?.headers)??aU(i?.columns),c=oU(o?.rows)??oU(o?.items)??oU(i?.rows)??oU(i?.items)??oU(t?.data);return s||c?{headers:s??[],rows:c??[]}:null}function cU(e){let t=YH(e);if(t)return{type:`widget`,config:{type:`actions`,actions:t.actions}};let n=eU(e),r=n?.renderAs??QH(e),i={visualizationConfig:n?.visualizationConfig,responseType:n?.responseType??void 0};if(!r){let t=n?.data??e;return XV(t)?{type:`widget`,config:{type:`card`,data:t,...i}}:null}if(r===`chart`||r===`usage-chart`){let t=e?GH(e):null;return!t||t.length===0?null:{type:`widget`,config:{type:r,items:t,...i}}}if(r===`table`){let t=sU(e,n??null);return!t||t.rows.length===0?null:{type:`widget`,config:{type:`table`,items:t.rows,visualizationConfig:{...iU(i.visualizationConfig)??{},headers:t.headers},responseType:i.responseType}}}if(r===`card`||r===`link`||r===`highlightBox`||r===`offer-card`||r===`addon-card`||r===`overview-card`||r===`account-overview`||r===`info-box`){let e=n?.data;if(!XV(e))return null;let t={type:r,data:e,...i};return rU.debug(`Creating widget`,{renderAsType:r,responseType:n?.responseType,config:t}),{type:`widget`,config:t}}return{type:`widget`,config:{type:r}}}var lU=new _E(`useAgentMarkdownRendererElements`),uU={async:!1,breaks:!0,gfm:!0};function dU(e){return KF.parse(e,uU)}function fU(e,t,n){let r=dU(t);return r.trim()?(e.push({type:`markdown`,key:`md-${n}`,content:r}),n+1):n}function pU(e){return["```json",JSON.stringify(e,null,2),"```"].join(`
|
|
402
|
+
`)}function mU(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.structuredData&&typeof t.structuredData==`object`?t.structuredData:null;return typeof t.renderAs==`string`||typeof n?.renderAs==`string`}function hU(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?null:jH(t)}function gU(e,t){return(0,U.useMemo)(()=>{let n=gH(e),r=hU(n);if(r)return mU(r)?[{type:`markdown`,key:`json-0`,content:dU(pU(r))}]:[];let i=sH(n),a=[],o=0;for(let e of i){if(e.type===`markdown`){o=fU(a,e.content,o);continue}try{let n=cH(e.dsl);if(!n){let t=hU(e.dsl);if(t&&!mU(t))continue;o=fU(a,t?pU(t):e.raw,o);continue}let r=JV(n,t);if(r.kind===`widget`){a.push({type:`widget`,key:`widget-${o++}`,widget:r.widget});continue}o=fU(a,pU(r.payload),o)}catch(t){lU.error(`Failed to parse widget`,{error:t instanceof Error?t.message:String(t)}),o=fU(a,e.raw,o)}}return a},[e,t])}var _U={agentChatMdRenderer:`_agentChatMdRenderer_3p9l_1`},vU=(0,U.memo)(({content:e,onWidgetEvent:t})=>{let n=gU(e,t);return n.length===0?null:(0,W.jsx)(q,{className:_U.agentChatMdRenderer,children:n.map(e=>e.type===`markdown`?(0,W.jsx)(pP,{html:e.content},e.key):(0,W.jsx)(q,{children:e.widget},e.key))})});vU.displayName=`AgentMarkdownRenderer`;function yU({mode:e=`thinking`,autoCycle:t=!0,cycleMs:n=2e3,exploringAfterMs:r=2e3,writingAfterMs:i=8e3,messages:a}){let[o,s]=(0,U.useState)(0);(0,U.useEffect)(()=>{if(!t)return;s(0);let e=setInterval(()=>{s(e=>e+1)},n);return()=>clearInterval(e)},[t,n]);let c=(0,U.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,U.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 bU({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}=yU({mode:t,autoCycle:r,cycleMs:i,exploringAfterMs:a,writingAfterMs:o,messages:s});return(0,W.jsxs)(Eu,{gap:`sm`,wrap:`nowrap`,children:[n&&(0,W.jsx)(Xf,{size:e===`large`?`sm`:`xs`,c:`dimmed`,children:c}),(0,W.jsx)(cu,{size:e===`large`?`sm`:`xs`,type:`dots`,color:`gray`}),(0,W.jsx)(Xf,{component:`span`,style:{position:`absolute`,left:-1e4},role:`status`,"aria-live":`polite`,children:c})]})}var xU={body:`_body_oytjg_1`,messageBubble:`_messageBubble_oytjg_21`,messageItem:`_messageItem_oytjg_35`,messageItemEnter:`_messageItemEnter_oytjg_43`,messageSlideUp:`_messageSlideUp_oytjg_1`,streamingDots:`_streamingDots_oytjg_57`,streamingDot:`_streamingDot_oytjg_57`,streamingDotBounce:`_streamingDotBounce_oytjg_1`,messageItemUser:`_messageItemUser_oytjg_88`,messageItemAssistant:`_messageItemAssistant_oytjg_93`,messageBubbleUser:`_messageBubbleUser_oytjg_97`,messageText:`_messageText_oytjg_108`,messageBubbleAssistant:`_messageBubbleAssistant_oytjg_115`,messageTime:`_messageTime_oytjg_124`,messageTimeUser:`_messageTimeUser_oytjg_133`,messageTimeAssistant:`_messageTimeAssistant_oytjg_137`,messageList:`_messageList_oytjg_141`},SU=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`}),CU=e=>{if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:SU.format(t)};function wU({messages:e,assistantDisplayName:t,isLoading:n,error:r,scrollViewportRef:i,onWidgetEvent:a}){let o=e.filter(e=>e.sentBy!==`assistant`||e.isStreaming?!0:!!e.text.trim());return(0,W.jsx)(Vy,{className:xU.body,gap:0,children:(0,W.jsx)(sl,{h:`100%`,type:`always`,scrollbarSize:8,offsetScrollbars:!0,viewportRef:i,children:(0,W.jsxs)(Vy,{className:xU.messageList,gap:0,children:[o.map((e,n)=>{let r=e.sentBy===`user`,i=CU(e.createdAt),o=e.sentBy===`assistant`&&e.isStreaming&&e.text.length===0,s=e.sentBy===`assistant`?e.relatedAgent??t:null,c=e.sentBy===`assistant`?[s,i].filter(Boolean).join(` · `):i;return(0,W.jsxs)(q,{className:`${xU.messageItem} ${xU.messageItemEnter} ${r?xU.messageItemUser:xU.messageItemAssistant}`,style:{animationDelay:`${n*70}ms`},children:[(0,W.jsx)(gl,{className:`${xU.messageBubble} ${r?xU.messageBubbleUser:xU.messageBubbleAssistant}`,children:e.sentBy===`assistant`?o?(0,W.jsxs)(`span`,{className:xU.streamingDots,"aria-hidden":!0,children:[(0,W.jsx)(`span`,{className:xU.streamingDot}),(0,W.jsx)(`span`,{className:xU.streamingDot}),(0,W.jsx)(`span`,{className:xU.streamingDot})]}):(0,W.jsx)(vU,{content:e.text,onWidgetEvent:a}):(0,W.jsx)(Xf,{c:`inherit`,className:xU.messageText,children:e.text})}),c&&(0,W.jsx)(Xf,{size:`xs`,fw:800,className:`${xU.messageTime} ${r?xU.messageTimeUser:xU.messageTimeAssistant}`,children:c})]},e.id)}),n&&(0,W.jsx)(gl,{className:`${xU.messageBubble} ${xU.messageBubbleAssistant}`,children:(0,W.jsx)(bU,{messages:[`Thinking`,`Analyzing your request`,`Searching for information`,`Processing data`,`Preparing response`,`Almost there`]})}),r&&(0,W.jsx)(Gf,{color:`red`,variant:`light`,radius:`md`,children:r})]})})})}var TU={root:`_root_uvs6g_1`,input:`_input_uvs6g_6`,section:`_section_uvs6g_34`};function EU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:i,rightSection:a,rightSectionWidth:o}){return(0,W.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:TU.root,input:TU.input,section:TU.section},styles:{input:{minHeight:`100%`}},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),i())}})}function DU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...uI(e),...t,children:[(0,W.jsx)(`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`}),(0,W.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,W.jsx)(`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`})]})}function OU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...uI(e),...t,children:(0,W.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})})}function kU({isListening:e,isLoading:t,onToggleVoice:n,size:r}){let i=Uj();return(0,W.jsx)(dy,{label:e?`Stop recording`:`Voice input`,children:(0,W.jsx)(gu,{onClick:n,disabled:t,size:r??`lg`,radius:`md`,variant:e?`filled`:`subtle`,color:e?`red`:`primary`,"aria-label":e?`Stop voice recording`:`Start voice recording`,styles:{root:e?void 0:{backgroundColor:`transparent`,boxShadow:`inset 0 0 0 1px ${i.other.color[`primary-light`]}33`}},children:e?(0,W.jsx)(OU,{size:`sm`}):(0,W.jsx)(DU,{size:`sm`})})})}function AU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...uI(e),...t,children:[(0,W.jsx)(`path`,{d:`m22 2-7 20-4-9-9-4Z`}),(0,W.jsx)(`path`,{d:`M22 2 11 13`})]})}var jU={footer:`_footer_11ov5_1`,actionGroup:`_actionGroup_11ov5_8`,replyHint:`_replyHint_11ov5_12`,poweredBy:`_poweredBy_11ov5_19`};function MU({composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,isVoiceSupported:i,canSend:a,onSubmit:o,onToggleVoice:s,showBusyCancel:c=!1,onCancelBusy:l}){let u=i?74:40;return(0,W.jsxs)(Vy,{className:jU.footer,gap:`sm`,children:[(0,W.jsx)(EU,{composerText:e,onComposerTextChange:t,isLoading:n,isListening:r,onSubmit:o,rightSectionWidth:u,rightSection:(0,W.jsxs)(Eu,{className:jU.actionGroup,wrap:`nowrap`,gap:4,align:`center`,children:[i&&(0,W.jsx)(kU,{isListening:r,isLoading:n,onToggleVoice:s,size:30}),c&&l?(0,W.jsx)(dy,{label:`Your message was sent — stop the assistant reply`,children:(0,W.jsx)(gu,{onClick:l,size:30,radius:`md`,variant:`filled`,color:`red`,"aria-label":`Stop assistant reply after your message was sent`,children:(0,W.jsx)(OU,{size:`sm`})})}):(0,W.jsx)(gu,{onClick:o,disabled:!a||n,size:30,radius:`md`,variant:`primary`,"aria-label":`Send message`,children:(0,W.jsx)(AU,{size:`sm`})})]})}),c?(0,W.jsx)(Xf,{size:`xs`,c:`dimmed`,ta:`center`,className:jU.replyHint,children:`Your message was sent — you can stop the incoming reply.`}):null,(0,W.jsx)(Xf,{ta:`center`,size:`xs`,c:`dimmed`,className:jU.poweredBy,pt:2,children:`Powered by Exceeder · Etiya`})]})}function NU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 22 22`,fill:`none`,...uI(e),...t,children:[(0,W.jsx)(`rect`,{x:`4`,y:`4`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`}),(0,W.jsx)(`rect`,{x:`4`,y:`9.75`,width:`10`,height:`2.5`,rx:`1.2`,fill:`currentColor`,opacity:`0.88`}),(0,W.jsx)(`rect`,{x:`4`,y:`15.5`,width:`14`,height:`2.5`,rx:`1.2`,fill:`currentColor`})]})}function PU({size:e,...t}){return(0,W.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...uI(e),...t,children:(0,W.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`})})}function FU({size:e,...t}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...uI(e),...t,children:[(0,W.jsx)(`path`,{d:`M21 12a9 9 0 1 1-3-6.7`}),(0,W.jsx)(`path`,{d:`M21 3v6h-6`})]})}var IU={header:`_header_11nfx_19`,headerLeft:`_headerLeft_11nfx_32`,headerInfo:`_headerInfo_11nfx_37`,orbContainer:`_orbContainer_11nfx_41`,orbOuter:`_orbOuter_11nfx_55`,orbPulse:`_orbPulse_11nfx_1`,orbMiddle:`_orbMiddle_11nfx_64`,orbInner:`_orbInner_11nfx_73`,orbFloat:`_orbFloat_11nfx_1`,headerMeta:`_headerMeta_11nfx_86`,statusDot:`_statusDot_11nfx_90`,statusText:`_statusText_11nfx_104`,headerActions:`_headerActions_11nfx_113`,closeButton:`_closeButton_11nfx_120`,title:`_title_11nfx_131`,topSubHeader:`_topSubHeader_11nfx_143`,subHeaderLeft:`_subHeaderLeft_11nfx_153`,subHeaderIcon:`_subHeaderIcon_11nfx_159`,subHeaderTitle:`_subHeaderTitle_11nfx_170`,subHeaderStatus:`_subHeaderStatus_11nfx_176`};function LU({panelTitle:e,isLoading:t,isOnline:n,showResetChat:r=!1,onResetChat:i,onClose:a}){let o=Uj();return(0,W.jsxs)(Ef,{className:IU.header,align:`center`,justify:`space-between`,children:[(0,W.jsxs)(Eu,{className:IU.headerLeft,wrap:`nowrap`,gap:10,align:`center`,children:[(0,W.jsxs)(q,{className:IU.orbContainer,"data-loading":t||void 0,children:[(0,W.jsx)(q,{className:IU.orbOuter}),(0,W.jsx)(q,{className:IU.orbMiddle}),(0,W.jsx)(q,{className:IU.orbInner,children:(0,W.jsx)(NU,{size:`sm`,color:o.other.color[`text-white`]})})]}),(0,W.jsxs)(Vy,{className:IU.headerInfo,gap:2,justify:`center`,children:[(0,W.jsx)(Xf,{className:IU.title,fw:800,children:e}),(0,W.jsxs)(Eu,{className:IU.headerMeta,wrap:`nowrap`,gap:6,align:`center`,children:[(0,W.jsx)(q,{className:IU.statusDot,"data-loading":t||void 0,"data-online":n||void 0}),(0,W.jsx)(Xf,{className:IU.statusText,span:!0,children:t?`Typing…`:n?`Online`:`Offline`})]})]})]}),(0,W.jsxs)(Eu,{className:IU.headerActions,wrap:`nowrap`,gap:6,children:[r&&i?(0,W.jsx)(dy,{label:`Reset chat and sign in again`,children:(0,W.jsx)(gu,{variant:`subtle`,size:`md`,radius:`md`,onClick:i,className:IU.closeButton,"aria-label":`Reset chat and sign in again`,children:(0,W.jsx)(FU,{size:`sm`})})}):null,(0,W.jsx)(dy,{label:`Close`,children:(0,W.jsx)(gu,{variant:`subtle`,size:`md`,radius:`md`,onClick:a,className:IU.closeButton,"aria-label":`Close agent chat`,children:(0,W.jsx)(PU,{size:`sm`})})})]})]})}function RU(e){return e.some(e=>e.sentBy===`assistant`?e.text.trim()?!0:!!(e.popup?.comparisonModal||e.popup?.title||e.popup?.subtitle||e.popup?.body):!1)}function zU({messages:e,runtimeInfo:t,error:n}){let r=t.hasCustomerToken&&t.hasGenaiToken,i=RU(e);return{hasCredentials:r,hasAssistantResponse:i,isOnline:r&&(!n||i)}}var BU={root:`_root_nkl8r_1`,surface:`_surface_nkl8r_9`,resizeHandle:`_resizeHandle_nkl8r_22`};function VU({visible:e,onClose:t,messages:n,composerText:r,onComposerTextChange:i,isLoading:a,isAssistantStreaming:o=!1,error:s,canSend:c,onSubmit:l,isListening:u,isVoiceSupported:d,onToggleVoice:f,actions:p,onActionClick:m,assistantDisplayName:h,panelTitle:g,runtimeInfo:_,scrollViewportRef:v,actualWidth:y=420,floatingTop:b=`var(--mantine-custom-space-150)`,floatingHeight:x=`100%`,floatingMaxHeight:S=`calc(100vh - var(--mantine-custom-space-150) - var(--mantine-custom-space-150))`,shellGap:C=`var(--mantine-custom-space-150)`,panelHeaderHeight:w=56,panelResizableWidth:T,panelBorder:E,panelBorderRadius:D,zIndex:O,chatPopupOpened:k=!1,onChatPopupClose:A,chatPopupMessage:j,chatPopupSize:M=`xl`,hostContainerSelector:N,showBusyCancel:P=!1,onCancelBusy:ee,showResetChat:F=!1,onResetChat:I}){let{isOnline:te}=zU({messages:n,runtimeInfo:_,error:s}),ne=a||o,re=(O??999999)+50,ie=`calc(${y}px + ${C})`,L=e=>{if(e.type===`action-click`&&e.data){let t=p.find(t=>t.buttonText===e.data?.buttonText);t&&m(t)}};if(!e)return null;let R=typeof D==`number`?`${D}px`:D;return(0,W.jsxs)(q,{className:BU.root,style:{width:y,maxWidth:`calc(100vw - var(--mantine-custom-space-400) - var(--mantine-custom-space-400))`,height:x,maxHeight:S,top:b,right:C,zIndex:O,"--agent-widget-panel-header-height":`${w}px`,"--agent-widget-shell-gap":C,"--agent-widget-panel-border":E,"--agent-widget-panel-radius":R},children:[T&&(0,W.jsx)(q,{onPointerDown:T.handlePointerDown,className:BU.resizeHandle,style:T.style}),(0,W.jsxs)(q,{className:BU.surface,children:[(0,W.jsx)(LU,{panelTitle:g,isLoading:ne,isOnline:te,showResetChat:F,onResetChat:I,onClose:t}),(0,W.jsx)(wU,{messages:n,assistantDisplayName:h,isLoading:a,error:s,scrollViewportRef:v,onWidgetEvent:L}),(0,W.jsx)(MU,{composerText:r,onComposerTextChange:i,isLoading:ne,isListening:u,isVoiceSupported:d,canSend:c,onSubmit:l,onToggleVoice:f,showBusyCancel:P,onCancelBusy:ee})]}),A?(0,W.jsx)(aN,{opened:k,onClose:A,message:j,isAssistantStreaming:o,size:M,zIndex:re,layoutTop:b,layoutHeight:x,layoutLeftOffset:C,layoutRightOffset:ie,hostContainerSelector:N}):null]})}function HU(e){return(0,U.useMemo)(()=>{let t=e===`MULTI`?`MULTI`:`SINGLE`;return{agentType:t,isMultiAgent:t===`MULTI`}},[e])}function UU(e){return typeof e==`object`&&!!e}function WU(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:null}function GU(e){if(Array.isArray(e))return e.filter(UU);if(!UU(e))return[];for(let t of[`data`,`items`,`results`,`content`,`rows`,`list`,`response`]){let n=e[t];if(Array.isArray(n))return n.filter(UU);if(UU(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(UU);if(e.length>0)return e}return[]}function KU(e){let t=WU(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 qU(e){let t=WU(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 JU(e){if(Array.isArray(e.apps)&&e.apps.length>0){let t=e.apps.map(e=>qU(e)).filter(e=>e!==null);if(t.length>0)return t}let t=KU(e);return t?[t]:[]}function YU(e){return GU(e).flatMap(e=>JU(e))}var XU={runtimeInfo:{customerId:null,hasCustomerToken:!1,hasGenaiToken:!1}},ZU=pE(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})})),QU=24e4;async function $U(e,t){try{let n=new URLSearchParams;n.set(`username`,atob(e)),n.set(`password`,atob(t));let r=await DE.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 eW(e,t){try{let n=await DE.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 tW(e,t){try{return(await DE.post(`/agent-message`,e,{anonymous:!0,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function nW(e,t){try{return(await DE.post(`/agentic-app-chat`,e,{anonymous:!0,timeout:QU,...t?.signal?{signal:t.signal}:{}})).data}catch(e){throw e}}async function rW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await DE.post(`/assistant`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}async function iW(e){let{customerToken:t,tenantId:n,...r}=e;try{return(await DE.post(`/fetch-agentic-app`,r,{anonymous:!0,headers:{Authorization:`Bearer ${t}`,"x-tenant-id":String(n)}})).data}catch(e){throw e}}var aW={loginToGenai:$U,switchTenant:eW,sendAgentMessage:tW,sendAgenticAppChat:nW,fetchAssistants:rW,fetchAgenticApps:iW};function oW({mutationKey:e,mutationFn:t,defaultOptions:n={}}){return function(r){return tS({...n,...r,meta:{...n?.meta,...r?.meta},mutationKey:e,mutationFn:t})}}var sW=oW({mutationKey:[`genai`,`agentic-apps`],mutationFn:async e=>aW.fetchAgenticApps(e)}),cW=oW({mutationKey:[`genai`,`assistants`],mutationFn:async e=>aW.fetchAssistants(e)});function lW(e,t){let n=typeof e==`number`&&e>0;return n&&t.length===0||n&&t.includes(e)?e:t[0]}function uW(e,t,n){let{mutateAsync:r}=cW(),{mutateAsync:i}=sW(),{isMultiAgent:a}=HU(e),[o,s]=(0,U.useState)(null),c=(0,U.useRef)(null),l=(0,U.useRef)(null),u=_T(),d=yT(),f=d?Number(d):null,p=xT();(0,U.useEffect)(()=>{if(!n){s(null);return}if(!u||!f||Number.isNaN(f)||f<=0||!p){s(null),c.current=null,l.current=null;return}let e=`${a?`multi`:`single`}:${f}:${u}`;if(c.current===e||l.current===e)return;l.current=e;let t=!0;return(async()=>{try{let n=a?await i({page:1,limit:10,customerToken:u,tenantId:f}):await r({page:1,limit:20,agent_type:`SINGLE`,customerToken:u,tenantId:f});if(!t)return;s(YU(n)),c.current=e}catch{t&&(s([]),c.current=null)}finally{l.current===e&&(l.current=null)}})(),()=>{t=!1}},[n,i,r,u,f,a,p]);let m=o??[],h=lW(t,m.map(e=>e.assistantId));return{availableAssistants:m,selectedAssistantId:h,selectedAssistant:m.find(e=>e.assistantId===h)}}function dW(){let e=(0,U.useContext)(AM),{agentType:t}=HU(e?.agentType),{selectedAssistantId:n,selectedAssistant:r}=uW(e?.agentType,e?.assistantId,!!e),i=(0,U.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 fW(){let e=(0,U.useContext)(jM);if(!e)throw Error(`AgentRuntimeContext is missing.`);return e}function pW(){let e=fW();return(0,U.useMemo)(()=>{let t=e?.customerToken;return typeof t!=`string`||t.trim().length===0?null:t},[e?.customerToken])}var mW=oW({mutationKey:[`genai`,`agentic-app-chat`],mutationFn:async({payload:e,signal:t})=>aW.sendAgenticAppChat(e,{signal:t})}),hW=oW({mutationKey:[`genai`,`agent-message`],mutationFn:async({payload:e,signal:t})=>aW.sendAgentMessage(e,{signal:t})});function gW(){let e=hW(),t=mW();return{sendChatMessage:(0,U.useCallback)(async n=>{let{agentType:r,message:i,selectedAgentId:a,customerId:o,customerToken:s,chatId:c,signal:l}=n;return r===`MULTI`?t.mutateAsync({payload:{message:i,app_id:a,...o?{unique_user_id:o}:{}},signal:l}):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}`}}},signal:l})},[e,t])}}function _W(e){return e.assistantId??null}function vW(e){return e.assistantLabel?.trim()||`Assistant`}function yW(e){return _W(e)?e.assistantInitialMessage??null:null}var bW=`popup`;function xW(e){return e&&typeof e==`object`?e:null}function SW(e){return typeof e==`string`&&e.trim()||null}function CW(e){return typeof e==`string`?e:null}function wW(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?e:Array.isArray(e)?e.map(e=>e===null||typeof e==`string`||typeof e==`number`?e:JSON.stringify(e)).filter(e=>e!==void 0):e&&typeof e==`object`?e:String(e)}function TW(e){let t=xW(e);if(!t)return null;let n=SW(t.title),r=SW(t.subtitle);if(!n||!r||!Array.isArray(t.columns)||t.columns.length===0)return null;let i=t.columns.map(e=>{let t=xW(e),n=xW(t?.header),r=xW(t?.specs),i=xW(t?.selectButton);if(!t||!n||!r)return null;let a=SW(n.label),o=SW(n.offerName),s=SW(t.columnType)??`default`;return!a||!o?null:{columnType:s,header:{label:a,offerName:o,badge:CW(n.badge)},specs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,wW(t)])),selectButton:i&&typeof i.buttonText==`string`&&typeof i.value==`string`?{buttonText:i.buttonText,value:i.value}:null}}).filter(e=>e!==null);return i.length>0?{title:n,subtitle:r,columns:i}:null}function EW(e){let t=xW(e);if(!t)return null;let n=SW(t.title),r=SW(t.subtitle),i=SW(t.body);return!n&&!r&&!i?null:{...n?{title:n}:{},...r?{subtitle:r}:{},...i?{body:i}:{}}}function DW(e){let t=SW(e.relatedAgent)??void 0,n=TW(e.comparisonModal);if(n)return{popup:{...t?{relatedAgent:t}:{},comparisonModal:n},summary:`${n.title} is ready. Open the comparison popup to review the market offers side by side.`};let r=EW(e);return r?{popup:r,summary:r.body??r.subtitle??r.title??`The popup details are ready to review.`}:null}function OW(e){return[xW(e.structuredData)?.renderAs,e.renderAs].some(e=>typeof e==`string`&&e.trim()===bW)}function kW(e){let t=xW(e.structuredData);return[xW(t?.popup),xW(e.popup),xW(t?.popupResponse),xW(e.popupResponse),t,e].filter(e=>e!==null)}function AW(e){let t=xW(e);if(!t||!OW(t))return null;for(let e of kW(t)){let t=DW(e);if(t)return t}return null}function jW(e){return e.replace(/\n{3,}/g,`
|
|
403
403
|
|
|
404
|
-
`).trim()}function jW(e){return xW(bW(e.structuredData)?.relatedAgent)??xW(e.relatedAgent)??void 0}function MW(e,t){return{...e??{},...t,relatedAgent:t.relatedAgent??e?.relatedAgent,comparisonModal:t.comparisonModal??e?.comparisonModal}}function NW(e){let t=QV(e),n,r=null,i=0,a=[];for(;;){let e=t.slice(i),o=jH(e);if(!o)break;a.push(XV(e.slice(0,o.start)));let s=kW(AH(o.json.trim())),c=e.slice(o.start+o.consumed),l=LH(c),u=IH(c.slice(l)),d=o.start+o.consumed+l+u;s?(n=MW(n,s.popup),r??=s.summary):a.push(e.slice(o.start,d)),i+=d}return a.push(t.slice(i)),n?{displayText:AW(a.join(``).trim())||r||e,popup:n}:null}function PW(e){let t=QV(e),n=0;for(;;){let e=t.slice(n),r=jH(e);if(!r)break;let i=bW(AH(r.json.trim())),a=i?jW(i):void 0;if(a)return a;let o=e.slice(r.start+r.consumed),s=LH(o),c=IH(o.slice(s)),l=r.start+r.consumed+s+c;n+=l}let r=t.trim();if(!r||!/^[{\[]/.test(r))return;let i=bW(AH(r));return i?jW(i):void 0}function FW(e){let t=NW(e);if(t)return t;let n=e.trim();if(!n||!/^[{\[]/.test(n))return{displayText:e};let r=kW(AH(n));return r?{displayText:r.summary,popup:r.popup}:{displayText:e}}function IW(e){return e.customerId}function LW(e){return e.customerToken}function RW(e){return e.language??null}function zW(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 BW(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function VW(e){return e.match(/\S+|\s+/g)??[]}function HW(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?!1:(t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`))&&TH(t)!=null}function UW(e){return Xw.isCancel(e)}var WW=800;function GW(e){return e?HW(e)?!0:e.includes("```")?hH(e).includes("```markdown-ui-widget"):!1:!1}function KW(){let e=dW(),t=fW(),n=uW(),{agentType:r,isMultiAgent:i}=VU(n.agentType),{sendChatMessage:a}=hW(),[o,s]=(0,U.useState)([]),[c,l]=(0,U.useState)(``),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(!1),[v,y]=(0,U.useState)(null),[b,x]=(0,U.useState)(!1),[S,C]=(0,U.useState)(null),[w,T]=(0,U.useState)(!0),E=(0,U.useRef)(!1),D=(0,U.useRef)(null),O=(0,U.useRef)(!1),k=(0,U.useRef)(null),A=(0,U.useRef)(null),j=(0,U.useRef)(!0),M=(0,U.useRef)(null),N=gW(n),[P,ee]=(0,U.useState)(null);(0,U.useEffect)(()=>{P===null&&n.assistantLabel?.trim()&&ee(n.assistantLabel.trim())},[n.assistantLabel,P]);let F=P??_W(n),I=(0,U.useCallback)(()=>{D.current!==null&&(globalThis.clearTimeout(D.current),D.current=null)},[]),te=(0,U.useCallback)(()=>{M.current!==null&&(globalThis.clearTimeout(M.current),M.current=null)},[]);(0,U.useEffect)(()=>()=>{I(),te()},[I,te]);let ne=(0,U.useCallback)(e=>{j.current=e,T(e)},[]),re=(0,U.useCallback)(e=>{let t={id:BW(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),ie=(0,U.useCallback)((e,t,n,r)=>{te();let i=BW();O.current=!0,k.current=i,_(!0),y(i),s(e=>[...e,{id:i,sentBy:`assistant`,text:``,createdAt:t,...r?{relatedAgent:r}:{},isStreaming:!0,...n?{popup:n}:{}}]),n&&C(i);let a=VW(e),o=0,c=``,l=()=>{O.current=!1,k.current=null,I(),_(!1),y(null),ne(!0),s(t=>t.map(t=>t.id===i?{...t,text:e,relatedAgent:r,isStreaming:!1}:t)),n&&(te(),M.current=globalThis.setTimeout(()=>{M.current=null,x(!0)},WW))},u=()=>{if(o>=a.length){l();return}let e=a[o];if(c+=e,o+=1,GW(c)){l();return}s(e=>e.map(e=>e.id===i?{...e,text:c,isStreaming:!0}:e));let t=/^\s+$/.test(e)?6+Math.random()*8:e.endsWith(`.`)||e.endsWith(`!`)||e.endsWith(`?`)||e.endsWith(`:`)?80+Math.random()*50:25+Math.random()*20;D.current=globalThis.setTimeout(u,t)};if(a.length===0){l();return}D.current=globalThis.setTimeout(u,30)},[te,I,ne]),L=(0,U.useCallback)(()=>{te(),x(!1),C(null)},[te]),R=S?o.find(e=>e.id===S):void 0,ae=(0,U.useCallback)(()=>{if(!j.current)return;A.current?.abort(),A.current=null,I(),O.current=!1;let e=k.current;k.current=null,y(null),_(!1),te(),e&&s(t=>t.filter(t=>t.id!==e)),x(!1),C(null),p(!1),h(null),ne(!0)},[te,I,ne]),oe=(0,U.useCallback)(async(o,s)=>{if(!o.trim()||g)return;if(l(``),s?.showUserBubble!==!1&&re(s?.userBubbleText?.trim()||o),!e||!n){h(`Chat is not configured.`);return}if(!N){h(`Chat configuration is missing.`);return}let c=IW(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}A.current?.abort();let m=new AbortController;A.current=m,ne(s?.cancellable!==!1),p(!0),h(null);try{let e=zW(await a({agentType:r,message:o,selectedAgentId:N,customerId:c||void 0,customerToken:f??``,chatId:u,signal:m.signal}));if(!e){ne(!0);return}e.chatId!==null&&d(e.chatId);let t=FW(e.text),n=t.popup,i=n?.relatedAgent??PW(e.text);ie(t.displayText,e.createdAt,n,i)}catch(e){if(UW(e))return;h(sE(e)),ne(!0)}finally{p(!1),A.current===m&&(A.current=null)}},[e,n,u,re,ie,a,t,r,i,g,N,ne]);return{messages:o,composerText:c,setComposerText:l,isLoading:f,isAssistantStreaming:g,error:m,sendMessage:oe,sendInitialMessage:(0,U.useCallback)(async()=>{if(E.current||f||g||o.length>0||!e||!n||!gW(n))return!1;let t=IW(e),r=vW(n)?.trim(),i=null;return i=r?t?`${r} ${t}`.trim():r:t?`Hello, my customer id is ${t}`:`Hello`,i.trim()?(E.current=!0,await oe(i,{showUserBubble:!1,cancellable:!1}),!0):!1},[e,n,f,g,o.length,oe]),resetChat:(0,U.useCallback)(()=>{A.current?.abort(),A.current=null,te(),I(),O.current=!1,k.current=null,_(!1),y(null),x(!1),C(null),s([]),l(``),d(null),h(null),E.current=!1,ne(!0),ee(null)},[te,I,ne]),cancelAgentOperation:ae,canCancelBusyTurn:w,agentDisplayName:F,canSend:c.trim().length>0&&!g,streamingMessageId:v,chatPopupOpen:b,chatPopupMessage:R,closeChatPopup:L}}function qW(e,t){let n=(0,U.useRef)([]),[r,i]=(0,U.useState)(null),a=(0,U.useMemo)(()=>{let t=[...e].reverse().find(e=>e.sentBy===`assistant`);if(!t)return n.current;let r=pH(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]);return(0,U.useEffect)(()=>{r&&(a.some(e=>e.buttonText===r.buttonText&&e.agentMessage===r.agentMessage&&e.targetAgent===r.targetAgent)||i(null))},[a,r]),{actions:a,handleActionClick:(0,U.useCallback)(e=>{i(e),t(e.buttonText)},[t]),handleComposerTextChange:(0,U.useCallback)(e=>{r&&e.trim()!==r.buttonText.trim()&&i(null),t(e)},[r,t]),clearSelectedAction:(0,U.useCallback)(()=>{i(null)},[])}}function JW(e={}){let{axis:t=`y`,direction:n=1,onResizeChange:r}=e,[i,a]=(0,U.useState)(0),o=(0,U.useRef)({startPos:0,startOffset:0}),{startInteraction:s}=LM(),c=t===`y`?`ns-resize`:t===`x`?`ew-resize`:`nwse-resize`;return{offset:i,handlePointerDown:(0,U.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 YW=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function XW(e,t,n,r,i){let a=(0,U.useRef)(Math.max(280,t??420)),o=(0,U.useRef)(n??!1),s=(0,U.useRef)(null),c=e?.reserveLayoutSpace??!0,l=(0,U.useCallback)(()=>{let t=e?.hostContainerSelector,n=[...t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[],...YW];for(let e of n){let t=document.querySelector(e);if(t)return t}return document.body},[e?.hostContainerSelector]),u=(0,U.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=JW({axis:`x`,direction:-1,onResizeChange:(0,U.useCallback)(e=>{let n=Math.max(280,(t??420)+e);a.current=n,u(n)},[t,u])});(0,U.useEffect)(()=>{o.current=n??!1},[n]),(0,U.useEffect)(()=>{let e=Math.max(280,t??420);a.current=e,o.current&&u(e)},[t,u]),(0,U.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 ZW(){let e=dW(),{runtimeInfo:t,setRuntimeInfo:n}=XU(),r=(0,U.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=IW(e),r=await LW(e),i=_T();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,U.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function QW(){let e=dW();return(0,U.useMemo)(()=>e&&RW(e)||`en-US`,[e])}function $W(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,U.useState)(!1),[u,d]=(0,U.useState)(``),[f,p]=(0,U.useState)(!1),m=(0,U.useRef)(null),h=(0,U.useRef)(``),g=(0,U.useRef)(!1),_=(0,U.useRef)(!1),v=(0,U.useRef)(``),y=(0,U.useRef)(``),b=(0,U.useRef)(null),x=(0,U.useRef)(!1),S=(0,U.useRef)(o),C=(0,U.useRef)(c);(0,U.useEffect)(()=>{S.current=o,C.current=c}),(0,U.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,U.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,U.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,U.useCallback)(()=>{c?T():w()},[c,w,T]),reset:(0,U.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 eG={bottom:24,right:24},tG=1e4;function nG(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,hostContainerSelector:e?.hostContainerSelector,zIndex:e?.zIndex??tG,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??eG.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??eG.right}}}}function rG({isListening:e,stopListening:t,reset:n,sendMessage:r,composerText:i,setComposerText:a,startListening:o,close:s,onSubmitComplete:c}){return{handleSubmit:()=>{e&&t(),n(),r(i),c?.()},handleToggleVoice:()=>{e?t():(a(``),o())},handleClose:()=>{e&&t(),s()}}}var iG=64;function aG(e,t={}){let{enabled:n=!0,behavior:r=`smooth`}=t,i=(0,U.useRef)(null),a=(0,U.useRef)(!0);return(0,U.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{a.current=e.scrollHeight-e.scrollTop-e.clientHeight<=iG},n=()=>{t()};return e.addEventListener(`scroll`,n),()=>e.removeEventListener(`scroll`,n)},[]),(0,U.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 oG=aW({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>iW.loginToGenai(e,t)}),sG=new _E(`useGenaiLogin`),cG=null,lG=null;function uG(e=!1,t=0){let n=(0,U.useContext)(AM),{mutateAsync:r}=oG(),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(null),f=n?.serviceAccount,p=n?.serviceKey,m=n?.tenantId;return(0,U.useEffect)(()=>{(async()=>{let n=f&&p&&m?{serviceAccount:f,serviceKey:p,tenantId:m}:null;n&&d(n);let i=e||t>0,o=_T();if(o&&!i){l(o);return}if(!n)return;let c=`${n.serviceAccount}::${n.serviceKey}`;if(cG===c&&!i){lG&&l(await lG);return}i&&(cG=null,lG=null),cG=c,a(!0),s(null),lG=(async()=>(await r({serviceAccount:n.serviceAccount,serviceKey:n.serviceKey})).access_token??null)();try{l(await lG)}catch(e){sG.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),s(sE(e))}finally{lG=null,a(!1)}})()},[f,p,m,r,e,t]),{isLoggingIn:i,loginError:o,loginToken:c,genaiInit:u}}var dG=aW({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>iW.switchTenant(e,t)}),fG=new _E(`useGenaiTenantSwitch`),pG=null,mG=null;function hG(e,t,n=!1,r=0,i=!1){let{mutateAsync:a}=dG(),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(!1);return(0,U.useEffect)(()=>{(async()=>{if(!e||!t||(n||r>0)&&i)return;let o=n||r>0,c=_T();if(c&&c!==e&&!o){d(!0);return}if(mG===e&&!o){pG&&await pG,d(!!_T());return}o&&(mG=null,pG=null),mG=e,s(!0),l(null),pG=(async()=>{await a({tenant_id:t,token:e})})();try{await pG,d(!0)}catch(e){fG.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),l(sE(e))}finally{pG=null,s(!1)}})()},[e,t,a,n,r,i]),{isSwitching:o,switchError:c,hasToken:u}}function gG(e=!1,t=0){let n=uG(e,t),{isSwitching:r,switchError:i,hasToken:a}=hG(n.loginToken,n.genaiInit?.tenantId,e,t,n.isLoggingIn);return{isAuthenticating:n.isLoggingIn||r,authError:n.loginError??i,hasToken:a}}function _G(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Wt({key:n?zT.PANEL_OPEN:`panel-state-${Date.now()}`,defaultValue:t,getInitialValueInEffect:!1}),a=(0,U.useRef)(!1);return(0,U.useEffect)(()=>{r&&!a.current&&e.onOpen&&(a.current=!0,e.onOpen())},[r,e.onOpen]),(0,U.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,U.useCallback)(async()=>{i(!0),e.onOpen&&!a.current&&(a.current=!0,await e.onOpen())},[i,e.onOpen]),close:(0,U.useCallback)(()=>{i(!1)},[i]),toggle:(0,U.useCallback)(()=>{i(e=>!e)},[i]),setOpen:(0,U.useCallback)(e=>{i(e)},[i])}}function vG({runtime:e,uiOptions:t}){let n=e.forceReAuth,[r,i]=(0,U.useState)(0),a=(0,U.useRef)(0),{isAuthenticating:o,hasToken:s,authError:c}=gG(n,r),{panelWidth:l,panelHeight:u,panelHeaderHeight:d,panelTopOffset:f,panelBorder:p,panelBorderRadius:m,hostContainerSelector:h,zIndex:g,fabPosition:_}=nG(t),v=(0,U.useRef)(!1),y=(0,U.useRef)(!1),[b,x]=(0,U.useState)(!1),{messages:S,composerText:C,setComposerText:w,isLoading:T,isAssistantStreaming:E,error:D,sendMessage:O,sendInitialMessage:k,agentDisplayName:A,canSend:j,chatPopupOpen:M,chatPopupMessage:N,closeChatPopup:P,cancelAgentOperation:ee,resetChat:F,canCancelBusyTurn:I}=KW(),{actions:te,handleActionClick:ne,handleComposerTextChange:re,clearSelectedAction:ie}=qW(S,w),{runtimeInfo:L,refreshRuntimeInfo:R}=ZW();(0,U.useEffect)(()=>{r>0&&!o&&s&&a.current!==r&&(a.current=r,R())},[r,s,o,R]);let ae=(0,U.useCallback)(()=>{F(),y.current=!1,x(!0),i(e=>e+1)},[F]),{isOpen:oe,open:se,close:ce}=_G({defaultOpen:!1,persist:!0,onOpen:async()=>{v.current||(v.current=!0,await R()),y.current||x(!0)}});(0,U.useEffect)(()=>{(async()=>{b&&oe&&!o&&s&&await k()&&(y.current=!0,x(!1))})()},[oe,o,s,k,b]),(0,U.useEffect)(()=>{oe||P()},[oe,P]);let le=aG([S.length,T,S.at(-1)?.text?.length??0,E]),{isListening:ue,isSupported:de,startListening:z,stopListening:fe,reset:pe}=$W({lang:QW(),continuous:!0,pauseOnSubmit:!0,onTextChange:w}),{panelResizableWidth:me,actualWidth:he,shellGap:B,floatingTop:ge,floatingHeight:_e,floatingMaxHeight:V}=XW(t,l,oe,u,f),{handleSubmit:ve,handleToggleVoice:ye,handleClose:be}=rG({isListening:ue,stopListening:fe,reset:pe,sendMessage:O,composerText:C,setComposerText:re,startListening:z,close:ce,onSubmitComplete:ie});return(0,W.jsxs)(W.Fragment,{children:[!oe&&(0,W.jsx)(HM,{onClick:()=>void se(),zIndex:g,position:_,label:A}),oe&&(0,W.jsx)(UM.Provider,{value:{sendMessage:O},children:(0,W.jsx)(BU,{visible:!0,onClose:be,messages:S,composerText:C,onComposerTextChange:re,isLoading:T,isAssistantStreaming:E,error:D??c,canSend:j,onSubmit:ve,actions:te,onActionClick:ne,isListening:ue,isVoiceSupported:de,onToggleVoice:ye,assistantDisplayName:A,panelTitle:A,runtimeInfo:L,scrollViewportRef:le,actualWidth:he,floatingTop:ge,floatingHeight:_e,floatingMaxHeight:V,shellGap:B,panelHeaderHeight:d,panelResizableWidth:me,panelBorder:p,panelBorderRadius:m,zIndex:g,chatPopupOpened:M,onChatPopupClose:P,chatPopupMessage:N,chatPopupSize:`2xl`,hostContainerSelector:h,showBusyCancel:(T||E)&&I,onCancelBusy:ee,showResetChat:!0,onResetChat:ae})})]})}function yG(e){return(0,W.jsx)(vG,{...e})}function bG(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function xG(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var SG=(0,U.forwardRef)((e,t)=>{let{config:n,runtime:r,uiOptions:i,className:a,style:o,rootElement:s}=e,c=(0,U.useRef)(null),l=xG(n);Pe.locale||Pe.activate(`en`),OE(l,n);let u=(0,U.useMemo)(()=>TM({themeName:i?.themeName}),[i?.themeName]);return(0,W.jsx)(IM,{appConfig:l,config:n,runtime:r,theme:(0,U.useMemo)(()=>i?.theme?Vr(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,W.jsx)(`div`,{className:a,ref:e=>{c.current=e,bG(t,e)},style:o,children:(0,W.jsx)(yG,{config:n,runtime:r,uiOptions:i})})})});SG.displayName=`Widget`;var CG=`:root,
|
|
404
|
+
`).trim()}function MW(e){return SW(xW(e.structuredData)?.relatedAgent)??SW(e.relatedAgent)??void 0}function NW(e,t){return{...e??{},...t,relatedAgent:t.relatedAgent??e?.relatedAgent,comparisonModal:t.comparisonModal??e?.comparisonModal}}function PW(e){let t=$V(e),n,r=null,i=0,a=[];for(;;){let e=t.slice(i),o=MH(e);if(!o)break;a.push(ZV(e.slice(0,o.start)));let s=AW(jH(o.json.trim())),c=e.slice(o.start+o.consumed),l=RH(c),u=LH(c.slice(l)),d=o.start+o.consumed+l+u;s?(n=NW(n,s.popup),r??=s.summary):a.push(e.slice(o.start,d)),i+=d}return a.push(t.slice(i)),n?{displayText:jW(a.join(``).trim())||r||e,popup:n}:null}function FW(e){let t=$V(e),n=0;for(;;){let e=t.slice(n),r=MH(e);if(!r)break;let i=xW(jH(r.json.trim())),a=i?MW(i):void 0;if(a)return a;let o=e.slice(r.start+r.consumed),s=RH(o),c=LH(o.slice(s)),l=r.start+r.consumed+s+c;n+=l}let r=t.trim();if(!r||!/^[{\[]/.test(r))return;let i=xW(jH(r));return i?MW(i):void 0}function IW(e){let t=PW(e);if(t)return t;let n=e.trim();if(!n||!/^[{\[]/.test(n))return{displayText:e};let r=AW(jH(n));return r?{displayText:r.summary,popup:r.popup}:{displayText:e}}function LW(e){return e.customerId}function RW(e){return e.customerToken}function zW(e){return e.language??null}function BW(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 VW(){let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`}function HW(e){return e.match(/\S+|\s+/g)??[]}function UW(e){let t=e.trim();return!t||!/^[{\[]/.test(t)?!1:(t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`))&&EH(t)!=null}function WW(e){return Xw.isCancel(e)}var GW=800;function KW(e){return e?UW(e)?!0:e.includes("```")?gH(e).includes("```markdown-ui-widget"):!1:!1}function qW(){let e=fW(),t=pW(),n=dW(),{agentType:r,isMultiAgent:i}=HU(n.agentType),{sendChatMessage:a}=gW(),[o,s]=(0,U.useState)([]),[c,l]=(0,U.useState)(``),[u,d]=(0,U.useState)(null),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(null),[g,_]=(0,U.useState)(!1),[v,y]=(0,U.useState)(null),[b,x]=(0,U.useState)(!1),[S,C]=(0,U.useState)(null),[w,T]=(0,U.useState)(!0),E=(0,U.useRef)(!1),D=(0,U.useRef)(null),O=(0,U.useRef)(!1),k=(0,U.useRef)(null),A=(0,U.useRef)(null),j=(0,U.useRef)(!0),M=(0,U.useRef)(null),N=_W(n),[P,ee]=(0,U.useState)(null);(0,U.useEffect)(()=>{P===null&&n.assistantLabel?.trim()&&ee(n.assistantLabel.trim())},[n.assistantLabel,P]);let F=P??vW(n),I=(0,U.useCallback)(()=>{D.current!==null&&(globalThis.clearTimeout(D.current),D.current=null)},[]),te=(0,U.useCallback)(()=>{M.current!==null&&(globalThis.clearTimeout(M.current),M.current=null)},[]);(0,U.useEffect)(()=>()=>{I(),te()},[I,te]);let ne=(0,U.useCallback)(e=>{j.current=e,T(e)},[]),re=(0,U.useCallback)(e=>{let t={id:VW(),sentBy:`user`,text:e};s(e=>[...e,t])},[]),ie=(0,U.useCallback)((e,t,n,r)=>{te();let i=VW();O.current=!0,k.current=i,_(!0),y(i),s(e=>[...e,{id:i,sentBy:`assistant`,text:``,createdAt:t,...r?{relatedAgent:r}:{},isStreaming:!0,...n?{popup:n}:{}}]),n&&C(i);let a=HW(e),o=0,c=``,l=()=>{O.current=!1,k.current=null,I(),_(!1),y(null),ne(!0),s(t=>t.map(t=>t.id===i?{...t,text:e,relatedAgent:r,isStreaming:!1}:t)),n&&(te(),M.current=globalThis.setTimeout(()=>{M.current=null,x(!0)},GW))},u=()=>{if(o>=a.length){l();return}let e=a[o];if(c+=e,o+=1,KW(c)){l();return}s(e=>e.map(e=>e.id===i?{...e,text:c,isStreaming:!0}:e));let t=/^\s+$/.test(e)?6+Math.random()*8:e.endsWith(`.`)||e.endsWith(`!`)||e.endsWith(`?`)||e.endsWith(`:`)?80+Math.random()*50:25+Math.random()*20;D.current=globalThis.setTimeout(u,t)};if(a.length===0){l();return}D.current=globalThis.setTimeout(u,30)},[te,I,ne]),L=(0,U.useCallback)(()=>{te(),x(!1),C(null)},[te]),R=S?o.find(e=>e.id===S):void 0,ae=(0,U.useCallback)(()=>{if(!j.current)return;A.current?.abort(),A.current=null,I(),O.current=!1;let e=k.current;k.current=null,y(null),_(!1),te(),e&&s(t=>t.filter(t=>t.id!==e)),x(!1),C(null),p(!1),h(null),ne(!0)},[te,I,ne]),oe=(0,U.useCallback)(async(o,s)=>{if(!o.trim()||g)return;if(l(``),s?.showUserBubble!==!1&&re(s?.userBubbleText?.trim()||o),!e||!n){h(`Chat is not configured.`);return}if(!N){h(`Chat configuration is missing.`);return}let c=LW(e),f=i?null:t;if(!i&&!f){h(`Missing customer token.`);return}A.current?.abort();let m=new AbortController;A.current=m,ne(s?.cancellable!==!1),p(!0),h(null);try{let e=BW(await a({agentType:r,message:o,selectedAgentId:N,customerId:c||void 0,customerToken:f??``,chatId:u,signal:m.signal}));if(!e){ne(!0);return}e.chatId!==null&&d(e.chatId);let t=IW(e.text),n=t.popup,i=n?.relatedAgent??FW(e.text);ie(t.displayText,e.createdAt,n,i)}catch(e){if(WW(e))return;h(sE(e)),ne(!0)}finally{p(!1),A.current===m&&(A.current=null)}},[e,n,u,re,ie,a,t,r,i,g,N,ne]);return{messages:o,composerText:c,setComposerText:l,isLoading:f,isAssistantStreaming:g,error:m,sendMessage:oe,sendInitialMessage:(0,U.useCallback)(async()=>{if(E.current||f||g||o.length>0||!e||!n||!_W(n))return!1;let t=LW(e),r=yW(n)?.trim(),i=null;return i=r?t?`${r} ${t}`.trim():r:t?`Hello, my customer id is ${t}`:`Hello`,i.trim()?(E.current=!0,await oe(i,{showUserBubble:!1,cancellable:!1}),!0):!1},[e,n,f,g,o.length,oe]),resetChat:(0,U.useCallback)(()=>{A.current?.abort(),A.current=null,te(),I(),O.current=!1,k.current=null,_(!1),y(null),x(!1),C(null),s([]),l(``),d(null),h(null),E.current=!1,ne(!0),ee(null)},[te,I,ne]),cancelAgentOperation:ae,canCancelBusyTurn:w,agentDisplayName:F,canSend:c.trim().length>0&&!g,streamingMessageId:v,chatPopupOpen:b,chatPopupMessage:R,closeChatPopup:L}}function JW(e,t){let n=(0,U.useRef)([]),[r,i]=(0,U.useState)(null),a=(0,U.useMemo)(()=>{let t=[...e].reverse().find(e=>e.sentBy===`assistant`);if(!t)return n.current;let r=mH(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]);return(0,U.useEffect)(()=>{r&&(a.some(e=>e.buttonText===r.buttonText&&e.agentMessage===r.agentMessage&&e.targetAgent===r.targetAgent)||i(null))},[a,r]),{actions:a,handleActionClick:(0,U.useCallback)(e=>{i(e),t(e.buttonText)},[t]),handleComposerTextChange:(0,U.useCallback)(e=>{r&&e.trim()!==r.buttonText.trim()&&i(null),t(e)},[r,t]),clearSelectedAction:(0,U.useCallback)(()=>{i(null)},[])}}function YW(e={}){let{axis:t=`y`,direction:n=1,onResizeChange:r}=e,[i,a]=(0,U.useState)(0),o=(0,U.useRef)({startPos:0,startOffset:0}),{startInteraction:s}=RM(),c=t===`y`?`ns-resize`:t===`x`?`ew-resize`:`nwse-resize`;return{offset:i,handlePointerDown:(0,U.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 XW=[`#root main`,`#root`,`main`,`.main-content`,`#app`,`body`];function ZW(e,t,n,r,i){let a=(0,U.useRef)(Math.max(280,t??420)),o=(0,U.useRef)(n??!1),s=(0,U.useRef)(null),c=e?.reserveLayoutSpace??!0,l=(0,U.useCallback)(()=>{let t=e?.hostContainerSelector,n=[...t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[],...XW];for(let e of n){let t=document.querySelector(e);if(t)return t}return document.body},[e?.hostContainerSelector]),u=(0,U.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=YW({axis:`x`,direction:-1,onResizeChange:(0,U.useCallback)(e=>{let n=Math.max(280,(t??420)+e);a.current=n,u(n)},[t,u])});(0,U.useEffect)(()=>{o.current=n??!1},[n]),(0,U.useEffect)(()=>{let e=Math.max(280,t??420);a.current=e,o.current&&u(e)},[t,u]),(0,U.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 QW(){let e=fW(),{runtimeInfo:t,setRuntimeInfo:n}=ZU(),r=(0,U.useCallback)(async()=>{if(!e){n({customerId:null,hasCustomerToken:!1,hasGenaiToken:!1});return}let t=LW(e),r=await RW(e),i=_T();n({customerId:t,hasCustomerToken:!!r,hasGenaiToken:!!i})},[e,n]);return(0,U.useEffect)(()=>{r()},[e,r]),{runtimeInfo:t,refreshRuntimeInfo:r}}function $W(){let e=fW();return(0,U.useMemo)(()=>e&&zW(e)||`en-US`,[e])}function eG(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,U.useState)(!1),[u,d]=(0,U.useState)(``),[f,p]=(0,U.useState)(!1),m=(0,U.useRef)(null),h=(0,U.useRef)(``),g=(0,U.useRef)(!1),_=(0,U.useRef)(!1),v=(0,U.useRef)(``),y=(0,U.useRef)(``),b=(0,U.useRef)(null),x=(0,U.useRef)(!1),S=(0,U.useRef)(o),C=(0,U.useRef)(c);(0,U.useEffect)(()=>{S.current=o,C.current=c}),(0,U.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,U.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,U.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,U.useCallback)(()=>{c?T():w()},[c,w,T]),reset:(0,U.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 tG={bottom:24,right:24},nG=1e4;function rG(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,hostContainerSelector:e?.hostContainerSelector,zIndex:e?.zIndex??nG,fabPosition:{...typeof e?.fabTopOffset==`number`?{top:e.fabTopOffset}:{bottom:e?.fabBottomOffset??tG.bottom},...typeof e?.fabLeftOffset==`number`?{left:e.fabLeftOffset}:{right:e?.fabRightOffset??tG.right}}}}function iG({isListening:e,stopListening:t,reset:n,sendMessage:r,composerText:i,setComposerText:a,startListening:o,close:s,onSubmitComplete:c}){return{handleSubmit:()=>{e&&t(),n(),r(i),c?.()},handleToggleVoice:()=>{e?t():(a(``),o())},handleClose:()=>{e&&t(),s()}}}var aG=64;function oG(e,t={}){let{enabled:n=!0,behavior:r=`smooth`}=t,i=(0,U.useRef)(null),a=(0,U.useRef)(!0);return(0,U.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>{a.current=e.scrollHeight-e.scrollTop-e.clientHeight<=aG},n=()=>{t()};return e.addEventListener(`scroll`,n),()=>e.removeEventListener(`scroll`,n)},[]),(0,U.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 sG=oW({mutationKey:[`genai`,`login`],mutationFn:async({serviceAccount:e,serviceKey:t})=>aW.loginToGenai(e,t)}),cG=new _E(`useGenaiLogin`),lG=null,uG=null;function dG(e=!1,t=0){let n=(0,U.useContext)(AM),{mutateAsync:r}=sG(),[i,a]=(0,U.useState)(!1),[o,s]=(0,U.useState)(null),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(null),f=n?.serviceAccount,p=n?.serviceKey,m=n?.tenantId;return(0,U.useEffect)(()=>{(async()=>{let n=f&&p&&m?{serviceAccount:f,serviceKey:p,tenantId:m}:null;n&&d(n);let i=e||t>0,o=_T();if(o&&!i){l(o);return}if(!n)return;let c=`${n.serviceAccount}::${n.serviceKey}`;if(lG===c&&!i){uG&&l(await uG);return}i&&(lG=null,uG=null),lG=c,a(!0),s(null),uG=(async()=>(await r({serviceAccount:n.serviceAccount,serviceKey:n.serviceKey})).access_token??null)();try{l(await uG)}catch(e){cG.error(`GenAI login failed`,{error:e instanceof Error?e.message:String(e)}),s(sE(e))}finally{uG=null,a(!1)}})()},[f,p,m,r,e,t]),{isLoggingIn:i,loginError:o,loginToken:c,genaiInit:u}}var fG=oW({mutationKey:[`genai`,`tenant-switch`],mutationFn:async({tenant_id:e,token:t})=>aW.switchTenant(e,t)}),pG=new _E(`useGenaiTenantSwitch`),mG=null,hG=null;function gG(e,t,n=!1,r=0,i=!1){let{mutateAsync:a}=fG(),[o,s]=(0,U.useState)(!1),[c,l]=(0,U.useState)(null),[u,d]=(0,U.useState)(!1);return(0,U.useEffect)(()=>{(async()=>{if(!e||!t||(n||r>0)&&i)return;let o=n||r>0,c=_T();if(c&&c!==e&&!o){d(!0);return}if(hG===e&&!o){mG&&await mG,d(!!_T());return}o&&(hG=null,mG=null),hG=e,s(!0),l(null),mG=(async()=>{await a({tenant_id:t,token:e})})();try{await mG,d(!0)}catch(e){pG.error(`GenAI tenant switch failed`,{error:e instanceof Error?e.message:String(e)}),l(sE(e))}finally{mG=null,s(!1)}})()},[e,t,a,n,r,i]),{isSwitching:o,switchError:c,hasToken:u}}function _G(e=!1,t=0){let n=dG(e,t),{isSwitching:r,switchError:i,hasToken:a}=gG(n.loginToken,n.genaiInit?.tenantId,e,t,n.isLoggingIn);return{isAuthenticating:n.isLoggingIn||r,authError:n.loginError??i,hasToken:a}}function vG(e={}){let{defaultOpen:t=!1,persist:n=!0}=e,[r,i]=Wt({key:n?zT.PANEL_OPEN:`panel-state-${Date.now()}`,defaultValue:t,getInitialValueInEffect:!1}),a=(0,U.useRef)(!1);return(0,U.useEffect)(()=>{r&&!a.current&&e.onOpen&&(a.current=!0,e.onOpen())},[r,e.onOpen]),(0,U.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,U.useCallback)(async()=>{i(!0),e.onOpen&&!a.current&&(a.current=!0,await e.onOpen())},[i,e.onOpen]),close:(0,U.useCallback)(()=>{i(!1)},[i]),toggle:(0,U.useCallback)(()=>{i(e=>!e)},[i]),setOpen:(0,U.useCallback)(e=>{i(e)},[i])}}function yG({runtime:e,uiOptions:t}){let n=e.forceReAuth,[r,i]=(0,U.useState)(0),a=(0,U.useRef)(0),{isAuthenticating:o,hasToken:s,authError:c}=_G(n,r),{panelWidth:l,panelHeight:u,panelHeaderHeight:d,panelTopOffset:f,panelBorder:p,panelBorderRadius:m,hostContainerSelector:h,zIndex:g,fabPosition:_}=rG(t),v=(0,U.useRef)(!1),y=(0,U.useRef)(!1),[b,x]=(0,U.useState)(!1),{messages:S,composerText:C,setComposerText:w,isLoading:T,isAssistantStreaming:E,error:D,sendMessage:O,sendInitialMessage:k,agentDisplayName:A,canSend:j,chatPopupOpen:M,chatPopupMessage:N,closeChatPopup:P,cancelAgentOperation:ee,resetChat:F,canCancelBusyTurn:I}=qW(),{actions:te,handleActionClick:ne,handleComposerTextChange:re,clearSelectedAction:ie}=JW(S,w),{runtimeInfo:L,refreshRuntimeInfo:R}=QW();(0,U.useEffect)(()=>{r>0&&!o&&s&&a.current!==r&&(a.current=r,R())},[r,s,o,R]);let ae=(0,U.useCallback)(()=>{F(),y.current=!1,x(!0),i(e=>e+1)},[F]),{isOpen:oe,open:se,close:ce}=vG({defaultOpen:!1,persist:!0,onOpen:async()=>{v.current||(v.current=!0,await R()),y.current||x(!0)}});(0,U.useEffect)(()=>{(async()=>{b&&oe&&!o&&s&&await k()&&(y.current=!0,x(!1))})()},[oe,o,s,k,b]),(0,U.useEffect)(()=>{oe||P()},[oe,P]);let le=oG([S.length,T,S.at(-1)?.text?.length??0,E]),{isListening:ue,isSupported:de,startListening:z,stopListening:fe,reset:pe}=eG({lang:$W(),continuous:!0,pauseOnSubmit:!0,onTextChange:w}),{panelResizableWidth:me,actualWidth:he,shellGap:B,floatingTop:ge,floatingHeight:_e,floatingMaxHeight:V}=ZW(t,l,oe,u,f),{handleSubmit:ve,handleToggleVoice:ye,handleClose:be}=iG({isListening:ue,stopListening:fe,reset:pe,sendMessage:O,composerText:C,setComposerText:re,startListening:z,close:ce,onSubmitComplete:ie});return(0,W.jsxs)(W.Fragment,{children:[!oe&&(0,W.jsx)(UM,{onClick:()=>void se(),zIndex:g,position:_,label:A}),oe&&(0,W.jsx)(WM.Provider,{value:{sendMessage:O},children:(0,W.jsx)(VU,{visible:!0,onClose:be,messages:S,composerText:C,onComposerTextChange:re,isLoading:T,isAssistantStreaming:E,error:D??c,canSend:j,onSubmit:ve,actions:te,onActionClick:ne,isListening:ue,isVoiceSupported:de,onToggleVoice:ye,assistantDisplayName:A,panelTitle:A,runtimeInfo:L,scrollViewportRef:le,actualWidth:he,floatingTop:ge,floatingHeight:_e,floatingMaxHeight:V,shellGap:B,panelHeaderHeight:d,panelResizableWidth:me,panelBorder:p,panelBorderRadius:m,zIndex:g,chatPopupOpened:M,onChatPopupClose:P,chatPopupMessage:N,chatPopupSize:`2xl`,hostContainerSelector:h,showBusyCancel:(T||E)&&I,onCancelBusy:ee,showResetChat:!0,onResetChat:ae})})]})}function bG(e){return(0,W.jsx)(yG,{...e})}function xG(e,t){if(typeof e==`function`){e(t);return}e&&(e.current=t)}function SG(e){return{url:{app:e.app??``,api:e.api??``,apiPaths:{crm:``,uiAuthz:``}},keycloak:{url:``,realm:``,clientId:``},features:{enableThemeManager:!0}}}var CG=(0,U.forwardRef)((e,t)=>{let{config:n,runtime:r,uiOptions:i,className:a,style:o,rootElement:s}=e,c=(0,U.useRef)(null),l=SG(n);Pe.locale||Pe.activate(`en`),OE(l,n);let u=(0,U.useMemo)(()=>TM({themeName:i?.themeName}),[i?.themeName]);return(0,W.jsx)(LM,{appConfig:l,config:n,runtime:r,theme:(0,U.useMemo)(()=>i?.theme?Vr(u,i.theme):u,[i?.theme,u]),rootElement:s??c.current,children:(0,W.jsx)(`div`,{className:a,ref:e=>{c.current=e,xG(t,e)},style:o,children:(0,W.jsx)(bG,{config:n,runtime:r,uiOptions:i})})})});CG.displayName=`Widget`;var wG=`:root,
|
|
405
405
|
:host {
|
|
406
406
|
color-scheme: var(--mantine-color-scheme);
|
|
407
407
|
}
|
|
@@ -8690,4 +8690,4 @@ fieldset:disabled .m_38aeed47:where(:not([data-inverted])),
|
|
|
8690
8690
|
@use '../internal/styles/font' as *;
|
|
8691
8691
|
@use '../internal/styles/variables' as *;
|
|
8692
8692
|
@use '../internal/styles/_mantine.scss' as *;
|
|
8693
|
-
`,
|
|
8693
|
+
`,TG=`data-widget-mount-root`,EG=`data-widget-style-root`,DG=`data-widget-adopted-style-root`;function OG(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 kG(e,t){return e.shadowRoot??e.attachShadow({mode:t})}function AG(e,t){let n=e.querySelector(`style[${EG}]`);return n||(n=document.createElement(`style`),n.setAttribute(EG,`true`)),n.textContent!==t&&(n.textContent=t),e.append(n),n}function jG(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 MG(e){let t=Array.from(document.querySelectorAll(`style, link[rel="stylesheet"]`)),n=new Set;t.forEach((t,r)=>{let i=jG(t,r);n.add(i);let a=`${t.tagName.toLowerCase()}[${DG}="${i}"]`,o=e.querySelector(a);if(t instanceof HTMLLinkElement){let n=o instanceof HTMLLinkElement?o:document.createElement(`link`);n.setAttribute(DG,i),n.rel=`stylesheet`,n.href=t.href,o||e.append(n);return}let s=o instanceof HTMLStyleElement?o:document.createElement(`style`);s.setAttribute(DG,i),s.textContent!==t.textContent&&(s.textContent=t.textContent),o||e.append(s)}),e.querySelectorAll(`style[${DG}], link[${DG}]`).forEach(e=>{let t=e.getAttribute(DG);(!t||!n.has(t))&&e.remove()})}function NG(e){let t=e.querySelector(`div[${TG}]`);return t||(t=document.createElement(`div`),t.setAttribute(TG,`true`),e.append(t)),t}function PG(e,t,n){let{target:r,mode:i,styles:a,...o}=n;e.render((0,W.jsx)(CG,{...o,rootElement:t}))}function FG(e){queueMicrotask(()=>{e.host.isConnected&&MG(e)})}function IG(e){let t=OG(e.target),n=kG(t,e.mode??`open`),r=NG(n),i=(0,S.createRoot)(r),a=e;return MG(n),AG(n,a.styles??wG),PG(i,t,a),FG(n),T(t,C,{runtime:a.runtime}),{host:t,shadowRoot:n,update(e){a={...a,...e},MG(n),AG(n,a.styles??wG),PG(i,t,a),FG(n)},unmount(){i.unmount(),r.remove(),T(t,w,{runtime:a.runtime})}}}var LG=`bstp-agent-widget`;function RG(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=IG({target:this,config:t.config,runtime:t.runtime,uiOptions:t.uiOptions,mode:t.mode,styles:t.styles});return}this.mountedWidget.update(t)}}}}function zG(e={}){let{tagName:t=LG,...n}=e,r=customElements.get(t);if(r)return r;let i=RG(n);return customElements.define(t,i),i}var{APP_INITIALIZER:BG,InjectionToken:VG,makeEnvironmentProviders:HG}=u,UG=new VG(`WIDGET_ELEMENT_CONFIG`);function WG(e={}){typeof customElements>`u`||zG(e)}function GG(){let e=u.provideAppInitializer;return typeof e==`function`?e(()=>{WG(u.inject(UG,{optional:!0})??{})}):{provide:BG,multi:!0,useFactory:e=>()=>{WG(e??{})},deps:[UG]}}function KG(e={}){return HG([{provide:UG,useValue:e},GG()])}function qG(e){return e?.tagName??`bstp-agent-widget`}exports.WIDGET_ELEMENT_CONFIG=UG,exports.getWidgetElementTagName=qG,exports.provideWidgetElement=KG;
|