fge-auth-component 5.2.2 → 5.2.3

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.
@@ -2948,24 +2948,6 @@ we.interceptors.request.use((t) => {
2948
2948
  }
2949
2949
  return o && (t.headers.Authorization = `Bearer ${o}`), e.apiBaseURLAuthNv && !io() && (t.withCredentials = !0), t;
2950
2950
  });
2951
- we.interceptors.response.use(
2952
- (t) => t.data.error ? Promise.reject({
2953
- error: !0,
2954
- message: t.data.message,
2955
- response: t.data.response || {},
2956
- status: t.data.status || 500
2957
- }) : t.data,
2958
- (t) => {
2959
- var r, a;
2960
- const e = (r = t.response) == null ? void 0 : r.data, n = ((a = t.response) == null ? void 0 : a.status) ?? 500, o = typeof (e == null ? void 0 : e.message) == "string" && e.message || t.message || "Ha ocurrido un error";
2961
- return Promise.reject({
2962
- error: !0,
2963
- message: o,
2964
- response: e ?? t.response ?? {},
2965
- status: n
2966
- });
2967
- }
2968
- );
2969
2951
  const zh = async (t) => we.post("v1/auth/login", t).then((e) => e).catch((e) => {
2970
2952
  var n;
2971
2953
  throw (n = e.response) != null && n.data ? e.response.data : e;
@@ -3573,7 +3555,26 @@ function Ap(t, e = {}) {
3573
3555
  }
3574
3556
  let x1 = !1;
3575
3557
  function dp() {
3576
- x1 || (x1 = !0, Ap(we));
3558
+ x1 || (x1 = !0, Ap(we), we.interceptors.response.use(
3559
+ (t) => t.data.error ? Promise.reject({
3560
+ error: !0,
3561
+ message: t.data.message,
3562
+ response: t.data.response || {},
3563
+ status: t.data.status || 500
3564
+ }) : t.data,
3565
+ (t) => {
3566
+ var r, a;
3567
+ if (t && typeof t == "object" && t.error === !0 && "status" in t)
3568
+ return Promise.reject(t);
3569
+ const e = (r = t.response) == null ? void 0 : r.data, n = ((a = t.response) == null ? void 0 : a.status) ?? 500, o = typeof (e == null ? void 0 : e.message) == "string" && e.message || t.message || "Ha ocurrido un error";
3570
+ return Promise.reject({
3571
+ error: !0,
3572
+ message: o,
3573
+ response: e ?? t.response ?? {},
3574
+ status: n
3575
+ });
3576
+ }
3577
+ ));
3577
3578
  }
3578
3579
  function wr(t, e) {
3579
3580
  return t - e * Math.floor(t / e);
@@ -14,7 +14,7 @@ This will fail in production.`);l=pa,l._s.has(a)||(i?vs(a,e,o,l):qu(a,o,l),proce
14
14
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const a=new this(e);return r.forEach(o=>a.set(o)),a}static accessor(e){const a=(this[fd]=this[fd]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=wa(s);a[l]||(n3(o,s),a[l]=!0)}return I.isArray(e)?e.forEach(i):i(e),this}}ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I.reduceDescriptors(ct.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(a){this[r]=a}}}),I.freezeMethods(ct);function Ms(t,e){const r=this||ya,a=e||r,o=ct.from(a.headers);let i=a.data;return I.forEach(t,function(l){i=l.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function pd(t){return!!(t&&t.__CANCEL__)}function xr(t,e,r){ye.call(this,t??"canceled",ye.ERR_CANCELED,e,r),this.name="CanceledError"}I.inherits(xr,ye,{__CANCEL__:!0});function md(t,e,r){const a=r.config.validateStatus;!r.status||!a||a(r.status)?t(r):e(new ye("Request failed with status code "+r.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function r3(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function a3(t,e){t=t||10;const r=new Array(t),a=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),d=a[i];s||(s=u),r[o]=c,a[o]=u;let A=i,p=0;for(;A!==o;)p+=r[A++],A=A%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const m=d&&u-d;return m?Math.round(p*1e3/m):void 0}}function o3(t,e){let r=0,a=1e3/e,o,i;const s=(u,d=Date.now())=>{r=d,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),A=d-r;A>=a?s(u,d):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},a-A)))},()=>o&&s(o)]}const Eo=(t,e,r=3)=>{let a=0;const o=a3(50,250);return o3(i=>{const s=i.loaded,l=i.lengthComputable?i.total:void 0,c=s-a,u=o(c),d=s<=l;a=s;const A={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-s)/u:void 0,event:i,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(A)},r)},hd=(t,e)=>{const r=t!=null;return[a=>e[0]({lengthComputable:r,total:t,loaded:a}),e[1]]},gd=t=>(...e)=>I.asap(()=>t(...e)),i3=Mt.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let a;function o(i){let s=i;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return a=o(window.location.href),function(s){const l=I.isString(s)?o(s):s;return l.protocol===a.protocol&&l.host===a.host}}():function(){return function(){return!0}}(),s3=Mt.hasStandardBrowserEnv?{write(t,e,r,a,o,i){const s=[t+"="+encodeURIComponent(e)];I.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),I.isString(a)&&s.push("path="+a),I.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function l3(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function c3(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function vd(t,e){return t&&!l3(e)?c3(t,e):e}const yd=t=>t instanceof ct?{...t}:t;function Nn(t,e){e=e||{};const r={};function a(u,d,A){return I.isPlainObject(u)&&I.isPlainObject(d)?I.merge.call({caseless:A},u,d):I.isPlainObject(d)?I.merge({},d):I.isArray(d)?d.slice():d}function o(u,d,A){if(I.isUndefined(d)){if(!I.isUndefined(u))return a(void 0,u,A)}else return a(u,d,A)}function i(u,d){if(!I.isUndefined(d))return a(void 0,d)}function s(u,d){if(I.isUndefined(d)){if(!I.isUndefined(u))return a(void 0,u)}else return a(void 0,d)}function l(u,d,A){if(A in e)return a(u,d);if(A in t)return a(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,d)=>o(yd(u),yd(d),!0)};return I.forEach(Object.keys(Object.assign({},t,e)),function(d){const A=c[d]||o,p=A(t[d],e[d],d);I.isUndefined(p)&&A!==l||(r[d]=p)}),r}const wd=t=>{const e=Nn({},t);let{data:r,withXSRFToken:a,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:l}=e;e.headers=s=ct.from(s),e.url=cd(vd(e.baseURL,e.url),t.params,t.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(I.isFormData(r)){if(Mt.hasStandardBrowserEnv||Mt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...d]=c?c.split(";").map(A=>A.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Mt.hasStandardBrowserEnv&&(a&&I.isFunction(a)&&(a=a(e)),a||a!==!1&&i3(e.url))){const u=o&&i&&s3.read(i);u&&s.set(o,u)}return e},u3=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,a){const o=wd(t);let i=o.data;const s=ct.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=o,d,A,p,m,g;function b(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function k(){if(!y)return;const f=ct.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:f,config:t,request:y};md(function(C){r(C),b()},function(C){a(C),b()},w),y=null}"onloadend"in y?y.onloadend=k:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(k)},y.onabort=function(){y&&(a(new ye("Request aborted",ye.ECONNABORTED,t,y)),y=null)},y.onerror=function(){a(new ye("Network Error",ye.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const w=o.transitional||dd;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),a(new ye(v,w.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,t,y)),y=null},i===void 0&&s.setContentType(null),"setRequestHeader"in y&&I.forEach(s.toJSON(),function(v,w){y.setRequestHeader(w,v)}),I.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),l&&l!=="json"&&(y.responseType=o.responseType),u&&([p,g]=Eo(u,!0),y.addEventListener("progress",p)),c&&y.upload&&([A,m]=Eo(c),y.upload.addEventListener("progress",A),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(d=f=>{y&&(a(!f||f.type?new xr(null,t,y):f),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const h=r3(o.url);if(h&&Mt.protocols.indexOf(h)===-1){a(new ye("Unsupported protocol "+h+":",ye.ERR_BAD_REQUEST,t));return}y.send(i||null)})},d3=(t,e)=>{let r=new AbortController,a;const o=function(c){if(!a){a=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof ye?u:new xr(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{o(new ye(`timeout ${e} of ms exceeded`,ye.ETIMEDOUT))},e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",o):c.unsubscribe(o))}),t=null)};t.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=s,[l,()=>{i&&clearTimeout(i),i=null}]},A3=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let a=0,o;for(;a<r;)o=a+e,yield t.slice(a,o),a=o},f3=async function*(t,e,r){for await(const a of t)yield*A3(ArrayBuffer.isView(a)?a:await r(String(a)),e)},bd=(t,e,r,a,o)=>{const i=f3(t,e,o);let s=0,l,c=u=>{l||(l=!0,a&&a(u))};return new ReadableStream({async pull(u){try{const{done:d,value:A}=await i.next();if(d){c(),u.close();return}let p=A.byteLength;if(r){let m=s+=p;r(m)}u.enqueue(new Uint8Array(A))}catch(d){throw c(d),d}},cancel(u){return c(u),i.return()}},{highWaterMark:2})},ko=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Cd=ko&&typeof ReadableStream=="function",Ps=ko&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Ed=(t,...e)=>{try{return!!t(...e)}catch{return!1}},p3=Cd&&Ed(()=>{let t=!1;const e=new Request(Mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),kd=64*1024,_s=Cd&&Ed(()=>I.isReadableStream(new Response("").body)),xo={stream:_s&&(t=>t.body)};ko&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!xo[e]&&(xo[e]=I.isFunction(t[e])?r=>r[e]():(r,a)=>{throw new ye(`Response type '${e}' is not supported`,ye.ERR_NOT_SUPPORT,a)})})})(new Response);const m3=async t=>{if(t==null)return 0;if(I.isBlob(t))return t.size;if(I.isSpecCompliantForm(t))return(await new Request(t).arrayBuffer()).byteLength;if(I.isArrayBufferView(t)||I.isArrayBuffer(t))return t.byteLength;if(I.isURLSearchParams(t)&&(t=t+""),I.isString(t))return(await Ps(t)).byteLength},h3=async(t,e)=>{const r=I.toFiniteNumber(t.getContentLength());return r??m3(e)},Rs={http:Um,xhr:u3,fetch:ko&&(async t=>{let{url:e,method:r,data:a,signal:o,cancelToken:i,timeout:s,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:A="same-origin",fetchOptions:p}=wd(t);u=u?(u+"").toLowerCase():"text";let[m,g]=o||i||s?d3([o,i],s):[],b,y;const k=()=>{!b&&setTimeout(()=>{m&&m.unsubscribe()}),b=!0};let h;try{if(c&&p3&&r!=="get"&&r!=="head"&&(h=await h3(d,a))!==0){let E=new Request(e,{method:"POST",body:a,duplex:"half"}),C;if(I.isFormData(a)&&(C=E.headers.get("content-type"))&&d.setContentType(C),E.body){const[D,T]=hd(h,Eo(gd(c)));a=bd(E.body,kd,D,T,Ps)}}I.isString(A)||(A=A?"include":"omit"),y=new Request(e,{...p,signal:m,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:a,duplex:"half",credentials:A});let f=await fetch(y);const v=_s&&(u==="stream"||u==="response");if(_s&&(l||v)){const E={};["status","statusText","headers"].forEach(x=>{E[x]=f[x]});const C=I.toFiniteNumber(f.headers.get("content-length")),[D,T]=l&&hd(C,Eo(gd(l),!0))||[];f=new Response(bd(f.body,kd,D,()=>{T&&T(),v&&k()},Ps),E)}u=u||"text";let w=await xo[I.findKey(xo,u)||"text"](f,t);return!v&&k(),g&&g(),await new Promise((E,C)=>{md(E,C,{data:w,headers:ct.from(f.headers),status:f.status,statusText:f.statusText,config:t,request:y})})}catch(f){throw k(),f&&f.name==="TypeError"&&/fetch/i.test(f.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,t,y),{cause:f.cause||f}):ye.from(f,f&&f.code,t,y)}})};I.forEach(Rs,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const xd=t=>`- ${t}`,g3=t=>I.isFunction(t)||t===null||t===!1,Bd={getAdapter:t=>{t=I.isArray(t)?t:[t];const{length:e}=t;let r,a;const o={};for(let i=0;i<e;i++){r=t[i];let s;if(a=r,!g3(r)&&(a=Rs[(s=String(r)).toLowerCase()],a===void 0))throw new ye(`Unknown adapter '${s}'`);if(a)break;o[s||"#"+i]=a}if(!a){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
15
15
  `+i.map(xd).join(`
16
16
  `):" "+xd(i[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return a},adapters:Rs};function Ls(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xr(null,t)}function Sd(t){return Ls(t),t.headers=ct.from(t.headers),t.data=Ms.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Bd.getAdapter(t.adapter||ya.adapter)(t).then(function(a){return Ls(t),a.data=Ms.call(t,t.transformResponse,a),a.headers=ct.from(a.headers),a},function(a){return pd(a)||(Ls(t),a&&a.response&&(a.response.data=Ms.call(t,t.transformResponse,a.response),a.response.headers=ct.from(a.response.headers))),Promise.reject(a)})}const Td="1.7.4",Fs={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Fs[t]=function(a){return typeof a===t||"a"+(e<1?"n ":" ")+t}});const Dd={};Fs.transitional=function(e,r,a){function o(i,s){return"[Axios v"+Td+"] Transitional option '"+i+"'"+s+(a?". "+a:"")}return(i,s,l)=>{if(e===!1)throw new ye(o(s," has been removed"+(r?" in "+r:"")),ye.ERR_DEPRECATED);return r&&!Dd[s]&&(Dd[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,l):!0}};function v3(t,e,r){if(typeof t!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const a=Object.keys(t);let o=a.length;for(;o-- >0;){const i=a[o],s=e[i];if(s){const l=t[i],c=l===void 0||s(l,i,t);if(c!==!0)throw new ye("option "+i+" must be "+c,ye.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ye("Unknown option "+i,ye.ERR_BAD_OPTION)}}const Us={assertOptions:v3,validators:Fs},yn=Us.validators;class er{constructor(e){this.defaults=e,this.interceptors={request:new ud,response:new ud}}async request(e,r){try{return await this._request(e,r)}catch(a){if(a instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=`
17
- `+i):a.stack=i}catch{}}throw a}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Nn(this.defaults,r);const{transitional:a,paramsSerializer:o,headers:i}=r;a!==void 0&&Us.assertOptions(a,{silentJSONParsing:yn.transitional(yn.boolean),forcedJSONParsing:yn.transitional(yn.boolean),clarifyTimeoutError:yn.transitional(yn.boolean)},!1),o!=null&&(I.isFunction(o)?r.paramsSerializer={serialize:o}:Us.assertOptions(o,{encode:yn.function,serialize:yn.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&I.merge(i.common,i[r.method]);i&&I.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=ct.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(c=c&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let d,A=0,p;if(!c){const g=[Sd.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,u),p=g.length,d=Promise.resolve(r);A<p;)d=d.then(g[A++],g[A++]);return d}p=l.length;let m=r;for(A=0;A<p;){const g=l[A++],b=l[A++];try{m=g(m)}catch(y){b.call(this,y);break}}try{d=Sd.call(this,m)}catch(g){return Promise.reject(g)}for(A=0,p=u.length;A<p;)d=d.then(u[A++],u[A++]);return d}getUri(e){e=Nn(this.defaults,e);const r=vd(e.baseURL,e.url);return cd(r,e.params,e.paramsSerializer)}}I.forEach(["delete","get","head","options"],function(e){er.prototype[e]=function(r,a){return this.request(Nn(a||{},{method:e,url:r,data:(a||{}).data}))}}),I.forEach(["post","put","patch"],function(e){function r(a){return function(i,s,l){return this.request(Nn(l||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}er.prototype[e]=r(),er.prototype[e+"Form"]=r(!0)});class Zs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const a=this;this.promise.then(o=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](o);a._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(o);return s.cancel=function(){a.unsubscribe(i)},s},e(function(i,s,l){a.reason||(a.reason=new xr(i,s,l),r(a.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;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new Zs(function(o){e=o}),cancel:e}}}function y3(t){return function(r){return t.apply(null,r)}}function w3(t){return I.isObject(t)&&t.isAxiosError===!0}const Hs={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};Object.entries(Hs).forEach(([t,e])=>{Hs[e]=t});function Od(t){const e=new er(t),r=Ju(er.prototype.request,e);return I.extend(r,er.prototype,e,{allOwnKeys:!0}),I.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Od(Nn(t,o))},r}const qe=Od(ya);qe.Axios=er,qe.CanceledError=xr,qe.CancelToken=Zs,qe.isCancel=pd,qe.VERSION=Td,qe.toFormData=bo,qe.AxiosError=ye,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=y3,qe.isAxiosError=w3,qe.mergeConfig=Nn,qe.AxiosHeaders=ct,qe.formToJSON=t=>Ad(I.isHTMLForm(t)?new FormData(t):t),qe.getAdapter=Bd.getAdapter,qe.HttpStatusCode=Hs,qe.default=qe;const se=qe.create({headers:{"Content-Type":"application/json","Cache-Control":"no-cache"},timeout:15e3});se.interceptors.request.use(t=>{const e=Me(),r=e.apiBaseURLAuthNv?`${e.apiBaseURLAuthNv}`:`${e.apiBaseURL}/api`;t.baseURL=r;let a=e.userState.token;if(!a&&vn()){const o=ks();o&&(a=o)}return a&&(t.headers.Authorization=`Bearer ${a}`),e.apiBaseURLAuthNv&&!vn()&&(t.withCredentials=!0),t}),se.interceptors.response.use(t=>t.data.error?Promise.reject({error:!0,message:t.data.message,response:t.data.response||{},status:t.data.status||500}):t.data,t=>{var o,i;const e=(o=t.response)==null?void 0:o.data,r=((i=t.response)==null?void 0:i.status)??500,a=typeof(e==null?void 0:e.message)=="string"&&e.message||t.message||"Ha ocurrido un error";return Promise.reject({error:!0,message:a,response:e??t.response??{},status:r})});const b3=async t=>se.post("v1/auth/login",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),$t=async()=>await se.post("v1/auth/me").then(e=>e.response).catch(e=>{throw e.response?e.response:e}),C3=async(t,e)=>await se.post("v1/qr-auth/generar",{aplicacion:t,deviceId:e}).then(a=>a.response.data).catch(a=>{throw a.response?a.response:a}),E3=async(t,e,r,a)=>await se.post("v1/qr-auth/autorizar",{token:t,sessionId:e,usuarioId:a,deviceId:r}).then(i=>i.response.data).catch(i=>{throw i.response?i.response:i}),Vd=async t=>await se.post("v1/auth/usuario/enviar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),k3=async t=>await se.post("v1/auth/enviar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),Id=async t=>await se.post("v1/auth/usuario/confirmar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),x3=async t=>await se.post("v1/auth/confirmar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),B3=async t=>se.post("v1/auth/enviar-codigo-medio",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),Md=async t=>se.post("v1/auth/2fa-generar-codigo",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),Pd=async t=>se.post("v1/2fa/generar",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),S3=async t=>se.post("v1/auth/confirmar-codigo-medio",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),T3=async t=>se.post("v1/auth/login/confirmation",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),D3=async t=>se.post("v1/auth/verificar-totp",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),O3=async t=>se.post("v1/2fa/push/generar",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),V3=async t=>se.post("v1/2fa/push/estado",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),I3=async t=>se.post("v1/auth/push/confirmar-login",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),M3=async t=>se.post("v1/auth/2fa-push-generar",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),P3=async t=>se.post("v1/auth/2fa-push-estado",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),_3=async t=>se.post("v1/auth/2fa-push-confirmar-login",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),R3=async()=>se.post("v1/perfil-persona/logout").then(t=>t).catch(t=>{var e;throw(e=t.response)!=null&&e.data?t.response.data:t}),L3=async()=>se.post("v1/auth/logout").then(t=>t).catch(t=>{var e;throw(e=t.response)!=null&&e.data?t.response.data:t}),F3=async t=>se.post("v1/auth/token/refresh",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e});let _d=!1,Br=!1;const Me=zu("LOGIN_STORE",()=>{const t=n.ref("LOGIN_STORE"),e=n.ref("login"),r=n.ref({token:void 0,refreshToken:void 0,user:void 0,funcionario:void 0,isAuth:!1,apps:[],roles:[],permisos:[],fechaCambioPassword:void 0,diasVidaPassword:void 0,cambiarPassword:!1,forzarCambioPassword:!1}),a=n.ref(null),o=n.ref(""),i=n.ref(""),s=n.ref(!1),l=n.ref(""),c=n.ref(""),u=n.ref(""),d=n.ref(""),A=n.ref(""),p=n.ref(""),m=n.ref(!1),g=n.ref("0.0.1"),b=n.ref(!1),y=n.ref(!1),k=S=>(S??"").toString().trim(),h=S=>{const z=k(S),X=z?ys(z):null;return{cookieKey:z,cookieValue:X}},f=S=>{const{cookieValue:z}=h(S);return z?(c.value=z,z):c.value},v=()=>{e.value="login"},w=()=>{e.value="registrar"},E=()=>{e.value="recuperar-password"},C=async S=>{var Z,Q,W,ee,O,K;let z=S;const{cookieKey:X,cookieValue:ie}=h(S.usuario),pe=ie??c.value;if(ie&&(c.value=ie),i.value){const{usuario:q,...U}=z;z={numeroDocumento:q,deviceId:pe,...U}}const F=await b3({...z,codigoDispositivo:pe||void 0,aplicacion:u.value,verificarSiFuncionario:m.value});if(typeof((Z=F.response)==null?void 0:Z.mediosVerificados)=="object")return F.response;if(i.value){if(((W=(Q=F.response)==null?void 0:Q.data)==null?void 0:W.mediosVerificados.length)>0)return F;if(vn()){const q=(ee=F.response)==null?void 0:ee.accessToken;q&&(gn(q),r.value={...r.value,token:q});const U=await $t();L(U,(O=F.response)==null?void 0:O.accessToken,(K=F.response)==null?void 0:K.tokenRefresh)}else{const q=await $t();L(q)}}else P(F.response);return ie&&pe&&X&&await le({usuario:X,value:pe}),i.value?F:F.response},D=async(S,z,X)=>{var pe,F;const ie=await E3(S,z,c.value,X);if(i.value){const Z=await $t();vn()?L(Z,(pe=ie.response)==null?void 0:pe.accessToken,(F=ie.response)==null?void 0:F.tokenRefresh):L(Z)}return ie.response},T=async S=>{const z=f(S.usuario),X=await T3({...S,codigoDispositivo:z,aplicacion:u.value,verificarSiFuncionario:m.value});P(X.response),S.esDispositivoConfianza&&le({usuario:S.usuario,value:z})},x=async S=>{var ie,pe,F;const z=f(S.numeroDocumento),X=await D3({...S,deviceId:z});if(vn()){const Z=(ie=X.response)==null?void 0:ie.accessToken;Z&&(gn(Z),r.value={...r.value,token:Z});const Q=await $t();L(Q,(pe=X.response)==null?void 0:pe.accessToken,(F=X.response)==null?void 0:F.tokenRefresh)}else{const Z=await $t();L(Z)}S.dispositivoConfianza&&le({usuario:S.numeroDocumento,value:z})},B=async S=>{var ie,pe,F;const z=f(S.numeroDocumento),X=await I3({usuarioId:S.usuarioId,challengeId:S.challengeId,aplicacion:S.aplicacion,deviceId:z,esDispositivoConfianza:S.esDispositivoConfianza??!1});if(vn()){const Z=(ie=X.response)==null?void 0:ie.accessToken;Z&&(gn(Z),r.value={...r.value,token:Z});const Q=await $t();L(Q,(pe=X.response)==null?void 0:pe.accessToken,(F=X.response)==null?void 0:F.tokenRefresh)}else{const Z=await $t();L(Z)}S.esDispositivoConfianza&&le({usuario:S.numeroDocumento,value:z})},V=async S=>{const z=f(S.usuario),X=await _3({usuarioId:S.usuarioId,challengeId:S.challengeId,aplicacion:S.aplicacion,codigoDispositivo:z,esDispositivoConfianza:S.esDispositivoConfianza??!1});P(X.response),S.esDispositivoConfianza&&le({usuario:S.usuario,value:z})},$=async S=>{var ie,pe,F;const z=i.value?S.numeroDocumento:S.usuario,X=f(z);if(i.value){const Z=await Id({...S,isLogin:!0,deviceId:X});if(vn()){const Q=(ie=Z.response)==null?void 0:ie.accessToken;Q&&(gn(Q),r.value={...r.value,token:Q});const W=await $t();L(W,(pe=Z.response)==null?void 0:pe.accessToken,(F=Z.response)==null?void 0:F.tokenRefresh)}else{const Q=await $t();L(Q)}S.dispositivoConfianza&&le({usuario:S.numeroDocumento,value:X})}else{const Z=await S3({...S,codigoDispositivo:X});P(Z.response),S.esDispositivoConfianza&&le({usuario:S.usuario,value:X})}},P=(S,z)=>{var Q,W,ee,O,K,q;const X=S.accessToken||S.token;X&&gn(X);const ie=(Q=S.usuario)!=null&&Q.whatsapp&&Number(S.usuario.whatsapp)===1?1:void 0,pe=(W=S.usuario)!=null&&W.telegram&&Number(S.usuario.telegram)===1?1:void 0,F=(ee=S.usuario)!=null&&ee.emailValidado&&Number(S.usuario.emailValidado)===1?1:void 0,Z=(O=S.usuario)!=null&&O.sms&&Number(S.usuario.sms)===1?1:void 0;r.value={token:X,refreshToken:S.tokenRefresh,funcionario:S!=null&&S.funcionario?S.funcionario:void 0,user:{...S.usuario,nombreCompleto:(q=(K=S==null?void 0:S.usuario)==null?void 0:K.nombreCompleto)==null?void 0:q.toLowerCase(),fotoUrl:`${p.value}/personas/fotosegip/${S.usuario.fotoRuta}?rand=${Math.random()*100}`,whatsapp:ie,telegram:pe,sms:Z,emailValidado:F},isNvAuth:!1,isAuth:!0,apps:S.apps,roles:S.roles,permisos:S.permisos,fechaCambioPassword:S.fechaCambioPassword,diasVidaPassword:S.diasVidaPassword,forzarCambioPassword:S.obligarCambio&&y.value,forzarActivar2FA:S.obligar2FA,cambiarPassword:S.cambiarPassword},!Br&&!i.value&&X&&S.tokenRefresh&&op(X,S.tokenRefresh)},L=(S,z,X)=>{var ie,pe,F,Z,Q;z&&gn(z),r.value={token:z,refreshToken:X,...S,funcionario:{...S.funcionario,funcionarioId:((ie=S.funcionario)==null?void 0:ie.id)??0,estado:0,latitud:void 0,longitud:void 0,divisiones:void 0,organizaciones:void 0,fechaIngresoInstitucion:"",aniosAntiguedad:0,idFirma:void 0,sinControlAsistencia:0,conInamovilidad:0,usuarioId:S.id??0,division:((pe=S.funcionario)==null?void 0:pe.divisionNombre)??"",cargo:(F=S.funcionario)==null?void 0:F.cargoNombre,cargoId:0,divisionId:0,oficinaId:0,municipio:"",municipioId:0,entidad:((Z=S.funcionario)==null?void 0:Z.entidadNombre)??"",entidadId:0,institucionId:0,institucion:((Q=S.funcionario)==null?void 0:Q.institucionNombre)??"",departamento:"",departamentoId:0},user:(()=>{var me,De,et,lt,gt,zt,Kt,H,ce,Ae,ne,Ee,R,Ie,tt,Le,ke,be,Xn;let W,ee,O,K,q="";S.usuarioMediosVerificados&&S.usuarioMediosVerificados.length>0&&S.usuarioMediosVerificados.forEach(jt=>{jt.medio===1?(W=1,jt.default&&(q="whatsapp")):jt.medio===2?(ee=1,jt.default&&(q="telegram")):jt.medio===3?(O=1,jt.default&&(q="email")):jt.medio===5&&(K=1,jt.default&&(q="sms"))});let U;return(me=S.perfilPersona)!=null&&me.nacimiento&&(typeof S.perfilPersona.nacimiento=="string"?U=S.perfilPersona.nacimiento:S.perfilPersona.nacimiento instanceof Date?U=S.perfilPersona.nacimiento.toISOString():U=(et=(De=S.perfilPersona.nacimiento)==null?void 0:De.toISOString)==null?void 0:et.call(De)),{id:S.id??0,ci:((lt=S.perfilPersona)==null?void 0:lt.ci)??"",nombre:((gt=S.perfilPersona)==null?void 0:gt.nombre)??"",paterno:((zt=S.perfilPersona)==null?void 0:zt.paterno)??"",profesion:((Kt=S.perfilPersona)==null?void 0:Kt.profesion)??"",materno:((H=S.perfilPersona)==null?void 0:H.materno)??"",perfilPersonaId:((ce=S.perfilPersona)==null?void 0:ce.id)??0,personaId:((Ae=S.perfilPersona)==null?void 0:Ae.id)??0,msPersonaId:((ne=S.perfilPersona)==null?void 0:ne.msPersonaId)??0,nacimiento:U??"",sexo:((Ee=S.perfilPersona)==null?void 0:Ee.sexo)??"",direccion:((R=S.perfilPersona)==null?void 0:R.direccion)??"",fotoUrl:`${p.value}/personas/fotosegip/${S.perfilPersona.msFileFoto}?rand=${Math.random()*100}`,celular:((Ie=S.perfilPersona)==null?void 0:Ie.celular)??0,email:((tt=S.perfilPersona)==null?void 0:tt.email)??"",nacionalidad:((ke=(Le=S.perfilPersona)==null?void 0:Le.pais)==null?void 0:ke.nombre)??"",foto:((be=S.perfilPersona)==null?void 0:be.msFileFoto)??"",fotoRuta:"",whatsapp:W,telegram:ee,sms:K,emailValidado:O,dobleAutenticacion:S.dobleAutenticacion??0,notificacionDefault:q,nombreCompleto:S.nombreCompleto??"",ciudadanoDigital:((Xn=S.perfilPersona)==null?void 0:Xn.esCiudadanoDigital)===1}})(),isNvAuth:!0,isAuth:!0,apps:S.apps,roles:S.roles,permisos:S.permisos,fechaCambioPassword:S.fechaCambioPassword??"",diasVidaPassword:S.diasVidaPassword,forzarCambioPassword:S.forzarCambioPassword,forzarActivar2FA:S.forzarActivar2FA,cambiarPassword:S.cambiarPassword}},re=()=>Qp(),G=S=>{if(!(S.type!=="tokens-updated"||!S.token&&!S.refreshToken)){Br=!0;try{S.token&&gn(S.token),r.value={...r.value,...S.token?{token:S.token}:{},...S.refreshToken?{refreshToken:S.refreshToken}:{},isAuth:!0}}finally{Br=!1}}},_=()=>{_d||typeof window>"u"||i.value||(_d=!0,ku(),so(),Cu(S=>{if(!i.value){if(S.type==="session-cleared"){Br=!0;try{J({fromTabSync:!0})}finally{Br=!1}return}G(S)}}))},J=S=>{Wp(),Jp(),r.value={token:void 0,refreshToken:void 0,user:void 0,funcionario:void 0,isAuth:!1,apps:[],roles:[],permisos:[],fechaCambioPassword:void 0,diasVidaPassword:void 0,forzarCambioPassword:!1,cambiarPassword:!1},a.value=null,!(S!=null&&S.fromTabSync)&&!Br&&!i.value&&ip()},ae=S=>{var z;r.value={...r.value,user:{...r.value.user,...S,fotoUrl:S!=null&&S.fotoRuta?`${p.value}/personas/fotosegip/${S==null?void 0:S.fotoRuta}?rand=${Math.random()*100}`:(z=r.value.user)==null?void 0:z.fotoUrl}}},ge=()=>{r.value={...r.value,forzarActivar2FA:!1}},ve=()=>{J()},le=async({usuario:S,value:z,days:X=7})=>{const ie=k(S);ie&&ws({name:ie,value:z,days:X,domain:zp()})};return{id:t,currentPage:e,binnacleId:a,apiBaseURL:o,isRegister:s,apiBaseURLAuthNv:i,apiWebSocketURL:l,webSocketToken:d,deviceId:c,aplicacion:u,enableChangePassword:b,enableForceChangePwd:y,userState:r,tgBot:A,systemVer:g,verificarFunc:m,onAutorizarQrNv:D,goLoginPage:v,goRegistrarPage:w,goRecuperarCont:E,onLogin:C,on2AuthLogin:T,on2AuthLoginNv:x,onConfirmarPushLoginNv:B,onConfirmarPushLogin:V,onLoginCiudadania:async S=>{try{if(a.value=S.binnacleId,i.value){const z=S.accessToken;z&&(gn(z),r.value={...r.value,token:z});const X=await $t();L(X,S.accessToken,S.tokenRefresh)}else P(S)}catch(z){console.error(z)}},setConfigs:({newBaseURL:S,newBaseURLAuthNv:z,newIsRegister:X,newWebSocketUrl:ie,newWebSocketToken:pe,newAplicacion:F,newRrhhUrl:Z,verificarSiFuncionario:Q,telegramBot:W,systemVersion:ee,enableChangePasswordMsg:O,enableForceChangePassword:K})=>{o.value=S,u.value=F,s.value=X||!1,l.value=ie||"",d.value=pe||"",i.value=z||"",c.value=re(),p.value=Z,m.value=Q||!1,A.value=W,g.value=ee||"0.0.1",b.value=!!O,y.value=!!K,_()},setDispositivoConfianzaCookie:le,clearUserData:J,updateUserData:ae,disable2FAStore:ge,onRefreshToken:async()=>{if(!i.value)return jp(async()=>{var ie,pe,F,Z;const S=((ie=r.value.token)==null?void 0:ie.trim())??"",z=((pe=r.value.refreshToken)==null?void 0:pe.trim())??"";if(!z)throw new bs;const X=await up();if(!X.acquired){if(await Eu(S,z,15e3,()=>({token:r.value.token,refreshToken:r.value.refreshToken})))return;throw new Cs}try{const Q=((F=r.value.token)==null?void 0:F.trim())??"",W=((Z=r.value.refreshToken)==null?void 0:Z.trim())??"";if(!W)throw new bs;const O=(await F3({token:Q,tokenRefresh:W})).response,K=(O==null?void 0:O.accessToken)||(O==null?void 0:O.token),q=O==null?void 0:O.tokenRefresh;if(!K||!q)throw new Cs;P(O)}finally{lp(X.owner)}})},initializeTokensFromStorage:()=>{if(ku(),_(),i.value){const z=ks();z&&(r.value={...r.value,token:z,isAuth:!0});return}const S=Gp(r.value.refreshToken);if(S.shouldClear){J();return}S.isAuth&&(r.value={...r.value,token:S.accessToken??r.value.token,refreshToken:S.refreshToken??r.value.refreshToken,isAuth:!0})},on2AuthNuevoServicioLogin:$,logoutStore:ve,resolveDeviceIdFromCookie:f}});function Rd(t,e={}){let r=!1,a=[];const o=()=>{a.forEach(i=>i()),a=[]};t.interceptors.response.use(i=>i,async i=>{var A;const s=Me();if(s.apiBaseURLAuthNv)return Promise.reject(i);const l=()=>({token:s.userState.token,refreshToken:s.userState.refreshToken}),c=hu(i);if(!c||!mu(i)||c._retry||gu(c))return Promise.reject(i);c._retry=!0;const u=s.userState.token,d=s.userState.refreshToken;if(await Eu(u,d,500,l),s.userState.token&&s.userState.token!==u)return io(c,s.userState.token),t(c);if(!r){r=!0;try{return await s.onRefreshToken(),o(),io(c,s.userState.token),t(c)}catch(p){a=[];const m=s.userState.token;return u!==void 0&&m!==void 0&&u!==m||(A=e.onRefreshFailed)==null||A.call(e,p),Promise.reject(p)}finally{r=!1}}return new Promise((p,m)=>{a.push(()=>{s.userState.token?(io(c,s.userState.token),p(t(c))):m(i)})})})}let Ld=!1;function U3(){Ld||(Ld=!0,Rd(se))}function Sr(t,e){return t-e*Math.floor(t/e)}const Fd=1721426;function tr(t,e,r,a){e=ba(t,e);let o=e-1,i=-2;return r<=2?i=0:wn(e)&&(i=-1),Fd-1+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+a)}function wn(t){return t%4===0&&(t%100!==0||t%400===0)}function ba(t,e){return t==="BC"?1-e:e}function Bo(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const Z3={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Pt{fromJulianDay(e){let r=e,a=r-Fd,o=Math.floor(a/146097),i=Sr(a,146097),s=Math.floor(i/36524),l=Sr(i,36524),c=Math.floor(l/1461),u=Sr(l,1461),d=Math.floor(u/365),A=o*400+s*100+c*4+d+(s!==4&&d!==4?1:0),[p,m]=Bo(A),g=r-tr(p,m,1,1),b=2;r<tr(p,m,3,1)?b=0:wn(m)&&(b=1);let y=Math.floor(((g+b)*12+373)/367),k=r-tr(p,m,y,1)+1;return new ze(p,m,y,k)}toJulianDay(e){return tr(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Z3[wn(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return wn(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const H3={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Tr(t,e){return e=ut(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Q3(t,e){return e=ut(e,t.calendar),t=ka(t),e=ka(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function Ca(t,e){return t.calendar.identifier===e.calendar.identifier&&t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Ud(t,e){return t=ka(t),e=ka(e),t.calendar.identifier===e.calendar.identifier&&t.era===e.era&&t.year===e.year&&t.month===e.month}function q3(t,e){return Tr(t,Hd(e))}function Zd(t,e){let r=t.calendar.toJulianDay(t),a=Math.ceil(r+1-J3(e))%7;return a<0&&(a+=7),a}function z3(t){return an(Date.now(),t)}function Hd(t){return W3(z3(t))}function Qd(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function K3(t,e){return qd(t)-qd(e)}function qd(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Qs=null;function Ea(){return Qs==null&&(Qs=new Intl.DateTimeFormat().resolvedOptions().timeZone),Qs}function ka(t){return t.subtract({days:t.day-1})}function zd(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const Kd=new Map;function j3(t){if(Intl.Locale){let r=Kd.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&Kd.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function J3(t){let e=j3(t);return e&&H3[e]||0}function Dr(t){t=ut(t,new Pt);let e=ba(t.era,t.year);return jd(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function jd(t,e,r,a,o,i,s){let l=new Date;return l.setUTCHours(a,o,i,s),l.setUTCFullYear(t,e-1,r),l.getTime()}function qs(t,e){if(e==="UTC")return 0;if(t>0&&e===Ea())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:a,day:o,hour:i,minute:s,second:l}=$d(t,e);return jd(r,a,o,i,s,l,0)-Math.floor(t/1e3)*1e3}const Jd=new Map;function $d(t,e){let r=Jd.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Jd.set(e,r));let a=r.formatToParts(new Date(t)),o={};for(let i of a)i.type!=="literal"&&(o[i.type]=i.value);return{year:o.era==="BC"||o.era==="B"?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:o.hour==="24"?0:+o.hour,minute:+o.minute,second:+o.second}}const Xd=864e5;function $3(t,e,r,a){return(r===a?[r]:[r,a]).filter(i=>X3(t,e,i))}function X3(t,e,r){let a=$d(r,e);return t.year===a.year&&t.month===a.month&&t.day===a.day&&t.hour===a.hour&&t.minute===a.minute&&t.second===a.second}function rn(t,e,r="compatible"){let a=Or(t);if(e==="UTC")return Dr(a);if(e===Ea()&&r==="compatible"){a=ut(a,new Pt);let c=new Date,u=ba(a.era,a.year);return c.setFullYear(u,a.month-1,a.day),c.setHours(a.hour,a.minute,a.second,a.millisecond),c.getTime()}let o=Dr(a),i=qs(o-Xd,e),s=qs(o+Xd,e),l=$3(a,e,o-i,o-s);if(l.length===1)return l[0];if(l.length>1)switch(r){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(o-i,o-s);case"compatible":case"later":return Math.max(o-i,o-s);case"reject":throw new RangeError("No such absolute time found")}}function Wd(t,e,r="compatible"){return new Date(rn(t,e,r))}function an(t,e){let r=qs(t,e),a=new Date(t+r),o=a.getUTCFullYear(),i=a.getUTCMonth()+1,s=a.getUTCDate(),l=a.getUTCHours(),c=a.getUTCMinutes(),u=a.getUTCSeconds(),d=a.getUTCMilliseconds();return new Ir(o,i,s,e,r,l,c,u,d)}function W3(t){return new ze(t.calendar,t.era,t.year,t.month,t.day)}function Or(t,e){let r=0,a=0,o=0,i=0;if("timeZone"in t)({hour:r,minute:a,second:o,millisecond:i}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:a,second:o,millisecond:i}=e),new Vr(t.calendar,t.era,t.year,t.month,t.day,r,a,o,i)}function ut(t,e){if(t.calendar.identifier===e.identifier)return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),a=t.copy();return a.calendar=e,a.era=r.era,a.year=r.year,a.month=r.month,a.day=r.day,nr(a),a}function Y3(t,e,r){if(t instanceof Ir)return t.timeZone===e?t:N3(t,e);let a=rn(t,e,r);return an(a,e)}function G3(t){let e=Dr(t)-t.offset;return new Date(e)}function N3(t,e){let r=Dr(t)-t.offset;return ut(an(r,e),t.calendar)}const xa=36e5;function So(t,e){let r=t.copy(),a="hour"in r?rh(r,e):0;zs(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,Ks(r),Yd(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=a,eh(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var i,s;let c=(i=(s=r.calendar).isInverseEra)===null||i===void 0?void 0:i.call(s,r);r.year=o,r.month=c?1:r.calendar.getMonthsInYear(r),r.day=c?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function zs(t,e){var r,a;!((r=(a=t.calendar).isInverseEra)===null||r===void 0)&&r.call(a,t)&&(e=-e),t.year+=e}function Ks(t){for(;t.month<1;)zs(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,zs(t,1)}function eh(t){for(;t.day<1;)t.month--,Ks(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,Ks(t)}function Yd(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function nr(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),Yd(t)}function Gd(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function Nd(t,e){return So(t,Gd(e))}function js(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),nr(r),r}function To(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),nh(r),r}function th(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Do(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Do(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Do(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Do(t.hour,24),e}function nh(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Do(t,e){let r=t%e;return r<0&&(r+=e),r}function rh(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,th(t)}function Js(t,e,r,a){let o=t.copy();switch(e){case"era":{let l=t.calendar.getEras(),c=l.indexOf(t.era);if(c<0)throw new Error("Invalid era: "+t.era);c=on(c,r,0,l.length-1,a==null?void 0:a.round),o.era=l[c],nr(o);break}case"year":var i,s;!((i=(s=o.calendar).isInverseEra)===null||i===void 0)&&i.call(s,o)&&(r=-r),o.year=on(t.year,r,-1/0,9999,a==null?void 0:a.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,t);break;case"month":o.month=on(t.month,r,1,t.calendar.getMonthsInYear(t),a==null?void 0:a.round);break;case"day":o.day=on(t.day,r,1,t.calendar.getDaysInMonth(t),a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(o),nr(o),o}function e1(t,e,r,a){let o=t.copy();switch(e){case"hour":{let i=t.hour,s=0,l=23;if((a==null?void 0:a.hourCycle)===12){let c=i>=12;s=c?12:0,l=c?23:11}o.hour=on(i,r,s,l,a==null?void 0:a.round);break}case"minute":o.minute=on(t.minute,r,0,59,a==null?void 0:a.round);break;case"second":o.second=on(t.second,r,0,59,a==null?void 0:a.round);break;case"millisecond":o.millisecond=on(t.millisecond,r,0,999,a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return o}function on(t,e,r,a,o=!1){if(o){t+=Math.sign(e),t<r&&(t=a);let i=Math.abs(e);e>0?t=Math.ceil(t/i)*i:t=Math.floor(t/i)*i,t>a&&(t=r)}else t+=e,t<r?t=a-(r-t-1):t>a&&(t=r+(t-a-1));return t}function t1(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let o=So(Or(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=rn(o,t.timeZone)}else r=Dr(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let a=an(r,t.timeZone);return ut(a,t.calendar)}function ah(t,e){return t1(t,Gd(e))}function oh(t,e,r,a){switch(e){case"hour":{let o=0,i=23;if((a==null?void 0:a.hourCycle)===12){let g=t.hour>=12;o=g?12:0,i=g?23:11}let s=Or(t),l=ut(To(s,{hour:o}),new Pt),c=[rn(l,t.timeZone,"earlier"),rn(l,t.timeZone,"later")].filter(g=>an(g,t.timeZone).day===l.day)[0],u=ut(To(s,{hour:i}),new Pt),d=[rn(u,t.timeZone,"earlier"),rn(u,t.timeZone,"later")].filter(g=>an(g,t.timeZone).day===u.day).pop(),A=Dr(t)-t.offset,p=Math.floor(A/xa),m=A%xa;return A=on(p,r,Math.floor(c/xa),Math.floor(d/xa),a==null?void 0:a.round)*xa+m,ut(an(A,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return e1(t,e,r,a);case"era":case"year":case"month":case"day":{let o=Js(Or(t),e,r,a),i=rn(o,t.timeZone);return ut(an(i,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function ih(t,e,r){let a=Or(t),o=To(js(a,e),e);if(o.compare(a)===0)return t;let i=rn(o,t.timeZone,r);return ut(an(i,t.timeZone),t.calendar)}function sh(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function n1(t){let e=ut(t,new Pt);return`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function r1(t){return`${n1(t)}T${sh(t)}`}function lh(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),a=t%36e5/6e4;return`${e}${String(r).padStart(2,"0")}:${String(a).padStart(2,"0")}`}function ch(t){return`${r1(t)}${lh(t.offset)}[${t.timeZone}]`}function uh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $s(t,e,r){uh(t,e),e.set(t,r)}function Xs(t){let e=typeof t[0]=="object"?t.shift():new Pt,r;if(typeof t[0]=="string")r=t.shift();else{let s=e.getEras();r=s[s.length-1]}let a=t.shift(),o=t.shift(),i=t.shift();return[e,r,a,o,i]}var dh=new WeakMap;class ze{copy(){return this.era?new ze(this.calendar,this.era,this.year,this.month,this.day):new ze(this.calendar,this.year,this.month,this.day)}add(e){return So(this,e)}subtract(e){return Nd(this,e)}set(e){return js(this,e)}cycle(e,r,a){return Js(this,e,r,a)}toDate(e){return Wd(this,e)}toString(){return n1(this)}compare(e){return Qd(this,e)}constructor(...e){$s(this,dh,{writable:!0,value:void 0});let[r,a,o,i,s]=Xs(e);this.calendar=r,this.era=a,this.year=o,this.month=i,this.day=s,nr(this)}}var Ah=new WeakMap;class Vr{copy(){return this.era?new Vr(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Vr(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return So(this,e)}subtract(e){return Nd(this,e)}set(e){return js(To(this,e),e)}cycle(e,r,a){switch(e){case"era":case"year":case"month":case"day":return Js(this,e,r,a);default:return e1(this,e,r,a)}}toDate(e,r){return Wd(this,e,r)}toString(){return r1(this)}compare(e){let r=Qd(this,e);return r===0?K3(this,Or(e)):r}constructor(...e){$s(this,Ah,{writable:!0,value:void 0});let[r,a,o,i,s]=Xs(e);this.calendar=r,this.era=a,this.year=o,this.month=i,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,nr(this)}}var fh=new WeakMap;class Ir{copy(){return this.era?new Ir(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ir(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return t1(this,e)}subtract(e){return ah(this,e)}set(e,r){return ih(this,e,r)}cycle(e,r,a){return oh(this,e,r,a)}toDate(){return G3(this)}toString(){return ch(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Y3(e,this.timeZone).toDate().getTime()}constructor(...e){$s(this,fh,{writable:!0,value:void 0});let[r,a,o,i,s]=Xs(e),l=e.shift(),c=e.shift();this.calendar=r,this.era=a,this.year=o,this.month=i,this.day=s,this.timeZone=l,this.offset=c,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,nr(this)}}const Mr=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],ph=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Oo=[1867,1911,1925,1988,2018],bn=["meiji","taisho","showa","heisei","reiwa"];function a1(t){const e=Mr.findIndex(([r,a,o])=>t.year<r||t.year===r&&t.month<a||t.year===r&&t.month===a&&t.day<o);return e===-1?Mr.length-1:e===0?0:e-1}function Ws(t){let e=Oo[bn.indexOf(t.era)];if(!e)throw new Error("Unknown era: "+t.era);return new ze(t.year+e,t.month,t.day)}class mh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=a1(r);return new ze(this,bn[a],r.year-Oo[a],r.month,r.day)}toJulianDay(e){return super.toJulianDay(Ws(e))}balanceDate(e){let r=Ws(e),a=a1(r);bn[a]!==e.era&&(e.era=bn[a],e.year=r.year-Oo[a]),this.constrainDate(e)}constrainDate(e){let r=bn.indexOf(e.era),a=ph[r];if(a!=null){let[o,i,s]=a,l=o-Oo[r];e.year=Math.max(1,Math.min(l,e.year)),e.year===l&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(s,e.day)))}if(e.year===1&&r>=0){let[,o,i]=Mr[r];e.month=Math.max(o,e.month),e.month===o&&(e.day=Math.max(i,e.day))}}getEras(){return bn}getYearsInEra(e){let r=bn.indexOf(e.era),a=Mr[r],o=Mr[r+1];if(o==null)return 9999-a[0]+1;let i=o[0]-a[0];return(e.month<o[1]||e.month===o[1]&&e.day<o[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(Ws(e))}getMinimumMonthInYear(e){let r=o1(e);return r?r[1]:1}getMinimumDayInMonth(e){let r=o1(e);return r&&e.month===r[1]?r[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function o1(t){if(t.year===1){let e=bn.indexOf(t.era);return Mr[e]}}const i1=-543;class hh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=ba(r.era,r.year);return new ze(this,a-i1,r.month,r.day)}toJulianDay(e){return super.toJulianDay(s1(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(s1(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function s1(t){let[e,r]=Bo(t.year+i1);return new ze(e,r,t.month,t.day)}const Vo=1911;function l1(t){return t.era==="minguo"?t.year+Vo:1-t.year+Vo}function c1(t){let e=t-Vo;return e>0?["minguo",e]:["before_minguo",1-e]}class gh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=ba(r.era,r.year),[o,i]=c1(a);return new ze(this,o,i,r.month,r.day)}toJulianDay(e){return super.toJulianDay(u1(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[r,a]=c1(l1(e));e.era=r,e.year=a}isInverseEra(e){return e.era==="before_minguo"}getDaysInMonth(e){return super.getDaysInMonth(u1(e))}getYearsInEra(e){return e.era==="before_minguo"?9999:9999-Vo}constructor(...e){super(...e),this.identifier="roc"}}function u1(t){let[e,r]=Bo(l1(t));return new ze(e,r,t.month,t.day)}const d1=1948320,A1=[0,31,62,93,124,155,186,216,246,276,306,336];class vh{fromJulianDay(e){let r=e-d1,a=1+Math.floor((33*r+3)/12053),o=365*(a-1)+Math.floor((8*a+21)/33),i=r-o,s=i<216?Math.floor(i/31):Math.floor((i-6)/30),l=i-A1[s]+1;return new ze(this,a,s+1,l)}toJulianDay(e){let r=d1-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return r+=A1[e.month-1],r+=e.day,r}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||Sr(25*e.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Ys=78,f1=80;class yh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=r.year-Ys,o=e-tr(r.era,r.year,1,1),i;o<f1?(a--,i=wn(r.year-1)?31:30,o+=i+155+90+10):(i=wn(r.year)?31:30,o-=f1);let s,l;if(o<i)s=1,l=o+1;else{let c=o-i;c<155?(s=Math.floor(c/31)+2,l=c%31+1):(c-=155,s=Math.floor(c/30)+7,l=c%30+1)}return new ze(this,a,s,l)}toJulianDay(e){let r=e.year+Ys,[a,o]=Bo(r),i,s;return wn(o)?(i=31,s=tr(a,o,3,21)):(i=30,s=tr(a,o,3,22)),e.month===1?s+e.day-1:(s+=i+Math.min(e.month-2,5)*31,e.month>=8&&(s+=(e.month-7)*30),s+=e.day-1,s)}getDaysInMonth(e){return e.month===1&&wn(e.year+Ys)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}const Io=1948440,p1=1948439,kt=1300,Pr=1600,wh=460322;function Mo(t,e,r,a){return a+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+t-1}function m1(t,e,r){let a=Math.floor((30*(r-e)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+Mo(e,a,1,1)))/29.5)+1),i=r-Mo(e,a,o,1)+1;return new ze(t,a,o,i)}function h1(t){return(14+11*t)%30<11}class Gs{fromJulianDay(e){return m1(this,Io,e)}toJulianDay(e){return Mo(Io,e.year,e.month,e.day)}getDaysInMonth(e){let r=29+e.month%2;return e.month===12&&h1(e.year)&&r++,r}getMonthsInYear(){return 12}getDaysInYear(e){return h1(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class bh extends Gs{fromJulianDay(e){return m1(this,p1,e)}toJulianDay(e){return Mo(p1,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}const Ch="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Ns,_r;function Po(t){return wh+_r[t-kt]}function Ba(t,e){let r=t-kt,a=1<<11-(e-1);return Ns[r]&a?30:29}function g1(t,e){let r=Po(t);for(let a=1;a<e;a++)r+=Ba(t,a);return r}function v1(t){return _r[t+1-kt]-_r[t-kt]}class Eh extends Gs{fromJulianDay(e){let r=e-Io,a=Po(kt),o=Po(Pr);if(r<a||r>o)return super.fromJulianDay(e);{let i=kt-1,s=1,l=1;for(;l>0;){i++,l=r-Po(i)+1;let c=v1(i);if(l===c){s=12;break}else if(l<c){let u=Ba(i,s);for(s=1;l>u;)l-=u,s++,u=Ba(i,s);break}}return new ze(this,i,s,r-g1(i,s)+1)}}toJulianDay(e){return e.year<kt||e.year>Pr?super.toJulianDay(e):Io+g1(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<kt||e.year>Pr?super.getDaysInMonth(e):Ba(e.year,e.month)}getDaysInYear(e){return e.year<kt||e.year>Pr?super.getDaysInYear(e):v1(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",Ns||(Ns=new Uint16Array(Uint8Array.from(atob(Ch),e=>e.charCodeAt(0)).buffer)),!_r){_r=new Uint32Array(Pr-kt+1);let e=0;for(let r=kt;r<=Pr;r++){_r[r-kt]=e;for(let a=1;a<=12;a++)e+=Ba(r,a)}}}}const y1=347997,w1=1080,b1=24*w1,kh=29,xh=12*w1+793,Bh=kh*b1+xh;function rr(t){return Sr(t*7+1,19)<7}function _o(t){let e=Math.floor((235*t-234)/19),r=12084+13753*e,a=e*29+Math.floor(r/25920);return Sr(3*(a+1),7)<3&&(a+=1),a}function Sh(t){let e=_o(t-1),r=_o(t);return _o(t+1)-r===356?2:r-e===382?1:0}function Sa(t){return _o(t)+Sh(t)}function C1(t){return Sa(t+1)-Sa(t)}function Th(t){let e=C1(t);switch(e>380&&(e-=30),e){case 353:return 0;case 354:return 1;case 355:return 2}}function Ro(t,e){if(e>=6&&!rr(t)&&e++,e===4||e===7||e===9||e===11||e===13)return 29;let r=Th(t);return e===2?r===2?30:29:e===3?r===0?29:30:e===6?rr(t)?30:0:30}class Dh{fromJulianDay(e){let r=e-y1,a=r*b1/Bh,o=Math.floor((19*a+234)/235)+1,i=Sa(o),s=Math.floor(r-i);for(;s<1;)o--,i=Sa(o),s=Math.floor(r-i);let l=1,c=0;for(;c<s;)c+=Ro(o,l),l++;l--,c-=Ro(o,l);let u=s-c;return new ze(this,o,l,u)}toJulianDay(e){let r=Sa(e.year);for(let a=1;a<e.month;a++)r+=Ro(e.year,a);return r+e.day+y1}getDaysInMonth(e){return Ro(e.year,e.month)}getMonthsInYear(e){return rr(e.year)?13:12}getDaysInYear(e){return C1(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,r){r.year!==e.year&&(rr(r.year)&&!rr(e.year)&&r.month>6?e.month--:!rr(r.year)&&rr(e.year)&&r.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}const el=1723856,E1=1824665,tl=5500;function Lo(t,e,r,a){return t+365*e+Math.floor(e/4)+30*(r-1)+a-1}function nl(t,e){let r=Math.floor(4*(e-t)/1461),a=1+Math.floor((e-Lo(t,r,1,1))/30),o=e+1-Lo(t,r,a,1);return[r,a,o]}function k1(t){return Math.floor(t%4/3)}function x1(t,e){return e%13!==0?30:k1(t)+5}class rl{fromJulianDay(e){let[r,a,o]=nl(el,e),i="AM";return r<=0&&(i="AA",r+=tl),new ze(this,i,r,a,o)}toJulianDay(e){let r=e.year;return e.era==="AA"&&(r-=tl),Lo(el,r,e.month,e.day)}getDaysInMonth(e){return x1(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+k1(e.year)}getYearsInEra(e){return e.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class Oh extends rl{fromJulianDay(e){let[r,a,o]=nl(el,e);return r+=tl,new ze(this,"AA",r,a,o)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class Vh extends rl{fromJulianDay(e){let[r,a,o]=nl(E1,e),i="CE";return r<=0&&(i="BCE",r=1-r),new ze(this,i,r,a,o)}toJulianDay(e){let r=e.year;return e.era==="BCE"&&(r=1-r),Lo(E1,r,e.month,e.day)}getDaysInMonth(e){let r=e.year;return e.era==="BCE"&&(r=1-r),x1(r,e.month)}isInverseEra(e){return e.era==="BCE"}balanceDate(e){e.year<=0&&(e.era=e.era==="BCE"?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return e.era==="BCE"?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}function Ih(t){switch(t){case"buddhist":return new hh;case"ethiopic":return new rl;case"ethioaa":return new Oh;case"coptic":return new Vh;case"hebrew":return new Dh;case"indian":return new yh;case"islamic-civil":return new Gs;case"islamic-tbla":return new bh;case"islamic-umalqura":return new Eh;case"japanese":return new mh;case"persian":return new vh;case"roc":return new gh;case"gregory":default:return new Pt}}let al=new Map;class sn{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let a=this.formatter.formatToParts(e),o=this.formatter.formatToParts(r);return[...a.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return _h()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Rh(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,r={}){this.formatter=B1(e,r),this.options=r}}const Mh={true:{ja:"h11"},false:{}};function B1(t,e={}){if(typeof e.hour12=="boolean"&&Ph()){e={...e};let o=Mh[String(e.hour12)][t.split("-")[0]],i=e.hour12?"h12":"h23";e.hourCycle=o??i,delete e.hour12}let r=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(al.has(r))return al.get(r);let a=new Intl.DateTimeFormat(t,e);return al.set(r,a),a}let ol=null;function Ph(){return ol==null&&(ol=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),ol}let il=null;function _h(){return il==null&&(il=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),il}function Rh(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=B1(t,{...e,timeZone:void 0}),a=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(a===0&&o===23)return"h23";if(a===24&&o===23)return"h24";if(a===0&&o===11)return"h11";if(a===12&&o===11)return"h12";throw new Error("Unexpected hour cycle result")}function Lh(t,e){const r=[];for(let a=0;a<t.length;a+=e)r.push(t.slice(a,a+e));return r}function xt(t,e=Ea()){return Fo(t)?t.toDate():t.toDate(e)}function Fh(t){return t instanceof Vr}function Fo(t){return t instanceof Ir}function sl(t){return Fh(t)||Fo(t)}function Xt(t){if(t instanceof Date){const e=t.getFullYear(),r=t.getMonth()+1;return new Date(e,r,0).getDate()}else return t.set({day:100}).day}function Rr(t,e){return t.compare(e)<0}function Uo(t,e){return t.compare(e)>0}function Uh(t,e,r){const a=Zd(t,r);return e>a?t.subtract({days:a+7-e}):e===a?t:t.subtract({days:a-e})}function Zh(t,e,r){const a=Zd(t,r),o=e===0?6:e-1;return a===o?t:a>o?t.add({days:7-a+o}):t.add({days:o-a})}function S1(t,e){const r=[];let a=t.add({days:1});const o=e;for(;a.compare(o)<0;)r.push(a),a=a.add({days:1});return r}function ll(t){const{dateObj:e,weekStartsOn:r,fixedWeeks:a,locale:o}=t,i=Xt(e),s=Array.from({length:i},(y,k)=>e.set({day:k+1})),l=ka(e),c=zd(e),u=Uh(l,r,o),d=Zh(c,r,o),A=S1(u.subtract({days:1}),l),p=S1(c,d.add({days:1})),m=A.length+s.length+p.length;if(a&&m<42){const y=42-m;let k=p[p.length-1];k||(k=zd(e));const h=Array.from({length:y},(f,v)=>{const w=v+1;return k.add({days:w})});p.push(...h)}const g=A.concat(s,p),b=Lh(g,7);return{value:e,cells:g,rows:b}}function ar(t){const{numberOfMonths:e,dateObj:r,...a}=t,o=[];if(!e||e===1)return o.push(ll({...a,dateObj:r})),o;o.push(ll({...a,dateObj:r}));for(let i=1;i<e;i++){const s=r.add({months:i});o.push(ll({...a,dateObj:s}))}return o}const Hh=["top","right","bottom","left"],Wt=Math.min,yt=Math.max,Zo=Math.round,Ho=Math.floor,Cn=t=>({x:t,y:t}),Qh={left:"right",right:"left",bottom:"top",top:"bottom"},qh={start:"end",end:"start"};function cl(t,e,r){return yt(t,Wt(e,r))}function ln(t,e){return typeof t=="function"?t(e):t}function cn(t){return t.split("-")[0]}function Lr(t){return t.split("-")[1]}function ul(t){return t==="x"?"y":"x"}function dl(t){return t==="y"?"height":"width"}function En(t){return["top","bottom"].includes(cn(t))?"y":"x"}function Al(t){return ul(En(t))}function zh(t,e,r){r===void 0&&(r=!1);const a=Lr(t),o=Al(t),i=dl(o);let s=o==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Qo(s)),[s,Qo(s)]}function Kh(t){const e=Qo(t);return[fl(t),e,fl(e)]}function fl(t){return t.replace(/start|end/g,e=>qh[e])}function jh(t,e,r){const a=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:a:e?a:o;case"left":case"right":return e?i:s;default:return[]}}function Jh(t,e,r,a){const o=Lr(t);let i=jh(cn(t),r==="start",a);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(fl)))),i}function Qo(t){return t.replace(/left|right|bottom|top/g,e=>Qh[e])}function $h(t){return{top:0,right:0,bottom:0,left:0,...t}}function T1(t){return typeof t!="number"?$h(t):{top:t,right:t,bottom:t,left:t}}function qo(t){const{x:e,y:r,width:a,height:o}=t;return{width:a,height:o,top:r,left:e,right:e+a,bottom:r+o,x:e,y:r}}function D1(t,e,r){let{reference:a,floating:o}=t;const i=En(e),s=Al(e),l=dl(s),c=cn(e),u=i==="y",d=a.x+a.width/2-o.width/2,A=a.y+a.height/2-o.height/2,p=a[l]/2-o[l]/2;let m;switch(c){case"top":m={x:d,y:a.y-o.height};break;case"bottom":m={x:d,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:A};break;case"left":m={x:a.x-o.width,y:A};break;default:m={x:a.x,y:a.y}}switch(Lr(e)){case"start":m[s]-=p*(r&&u?-1:1);break;case"end":m[s]+=p*(r&&u?-1:1);break}return m}const Xh=async(t,e,r)=>{const{placement:a="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:A}=D1(u,a,c),p=a,m={},g=0;for(let b=0;b<l.length;b++){const{name:y,fn:k}=l[b],{x:h,y:f,data:v,reset:w}=await k({x:d,y:A,initialPlacement:a,placement:p,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:t,floating:e}});d=h??d,A=f??A,m={...m,[y]:{...m[y],...v}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:d,y:A}=D1(u,p,c)),b=-1)}return{x:d,y:A,placement:p,strategy:o,middlewareData:m}};async function Ta(t,e){var r;e===void 0&&(e={});const{x:a,y:o,platform:i,rects:s,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:A="floating",altBoundary:p=!1,padding:m=0}=ln(e,t),g=T1(m),y=l[p?A==="floating"?"reference":"floating":A],k=qo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),h=A==="floating"?{x:a,y:o,width:s.floating.width,height:s.floating.height}:s.reference,f=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),v=await(i.isElement==null?void 0:i.isElement(f))?await(i.getScale==null?void 0:i.getScale(f))||{x:1,y:1}:{x:1,y:1},w=qo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:f,strategy:c}):h);return{top:(k.top-w.top+g.top)/v.y,bottom:(w.bottom-k.bottom+g.bottom)/v.y,left:(k.left-w.left+g.left)/v.x,right:(w.right-k.right+g.right)/v.x}}const Wh=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:a,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=e,{element:u,padding:d=0}=ln(t,e)||{};if(u==null)return{};const A=T1(d),p={x:r,y:a},m=Al(o),g=dl(m),b=await s.getDimensions(u),y=m==="y",k=y?"top":"left",h=y?"bottom":"right",f=y?"clientHeight":"clientWidth",v=i.reference[g]+i.reference[m]-p[m]-i.floating[g],w=p[m]-i.reference[m],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let C=E?E[f]:0;(!C||!await(s.isElement==null?void 0:s.isElement(E)))&&(C=l.floating[f]||i.floating[g]);const D=v/2-w/2,T=C/2-b[g]/2-1,x=Wt(A[k],T),B=Wt(A[h],T),V=x,$=C-b[g]-B,P=C/2-b[g]/2+D,L=cl(V,P,$),re=!c.arrow&&Lr(o)!=null&&P!==L&&i.reference[g]/2-(P<V?x:B)-b[g]/2<0,G=re?P<V?P-V:P-$:0;return{[m]:p[m]+G,data:{[m]:L,centerOffset:P-L-G,...re&&{alignmentOffset:G}},reset:re}}}),Yh=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,a;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:A=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...y}=ln(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const k=cn(o),h=En(l),f=cn(l)===l,v=await(c.isRTL==null?void 0:c.isRTL(u.floating)),w=p||(f||!b?[Qo(l)]:Kh(l)),E=g!=="none";!p&&E&&w.push(...Jh(l,b,g,v));const C=[l,...w],D=await Ta(e,y),T=[];let x=((a=i.flip)==null?void 0:a.overflows)||[];if(d&&T.push(D[k]),A){const P=zh(o,s,v);T.push(D[P[0]],D[P[1]])}if(x=[...x,{placement:o,overflows:T}],!T.every(P=>P<=0)){var B,V;const P=(((B=i.flip)==null?void 0:B.index)||0)+1,L=C[P];if(L)return{data:{index:P,overflows:x},reset:{placement:L}};let re=(V=x.filter(G=>G.overflows[0]<=0).sort((G,_)=>G.overflows[1]-_.overflows[1])[0])==null?void 0:V.placement;if(!re)switch(m){case"bestFit":{var $;const G=($=x.filter(_=>{if(E){const J=En(_.placement);return J===h||J==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(J=>J>0).reduce((J,ae)=>J+ae,0)]).sort((_,J)=>_[1]-J[1])[0])==null?void 0:$[0];G&&(re=G);break}case"initialPlacement":re=l;break}if(o!==re)return{reset:{placement:re}}}return{}}}};function O1(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function V1(t){return Hh.some(e=>t[e]>=0)}const Gh=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:a="referenceHidden",...o}=ln(t,e);switch(a){case"referenceHidden":{const i=await Ta(e,{...o,elementContext:"reference"}),s=O1(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:V1(s)}}}case"escaped":{const i=await Ta(e,{...o,altBoundary:!0}),s=O1(i,r.floating);return{data:{escapedOffsets:s,escaped:V1(s)}}}default:return{}}}}};async function Nh(t,e){const{placement:r,platform:a,elements:o}=t,i=await(a.isRTL==null?void 0:a.isRTL(o.floating)),s=cn(r),l=Lr(r),c=En(r)==="y",u=["left","top"].includes(s)?-1:1,d=i&&c?-1:1,A=ln(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...A};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const e5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,a;const{x:o,y:i,placement:s,middlewareData:l}=e,c=await Nh(e,t);return s===((r=l.offset)==null?void 0:r.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},t5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:a,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:k,y:h}=y;return{x:k,y:h}}},...c}=ln(t,e),u={x:r,y:a},d=await Ta(e,c),A=En(cn(o)),p=ul(A);let m=u[p],g=u[A];if(i){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",h=m+d[y],f=m-d[k];m=cl(h,m,f)}if(s){const y=A==="y"?"top":"left",k=A==="y"?"bottom":"right",h=g+d[y],f=g-d[k];g=cl(h,g,f)}const b=l.fn({...e,[p]:m,[A]:g});return{...b,data:{x:b.x-r,y:b.y-a}}}}},n5=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:a,placement:o,rects:i,middlewareData:s}=e,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=ln(t,e),d={x:r,y:a},A=En(o),p=ul(A);let m=d[p],g=d[A];const b=ln(l,e),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const f=p==="y"?"height":"width",v=i.reference[p]-i.floating[f]+y.mainAxis,w=i.reference[p]+i.reference[f]-y.mainAxis;m<v?m=v:m>w&&(m=w)}if(u){var k,h;const f=p==="y"?"width":"height",v=["top","left"].includes(cn(o)),w=i.reference[A]-i.floating[f]+(v&&((k=s.offset)==null?void 0:k[A])||0)+(v?0:y.crossAxis),E=i.reference[A]+i.reference[f]+(v?0:((h=s.offset)==null?void 0:h[A])||0)-(v?y.crossAxis:0);g<w?g=w:g>E&&(g=E)}return{[p]:m,[A]:g}}}},r5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:a,platform:o,elements:i}=e,{apply:s=()=>{},...l}=ln(t,e),c=await Ta(e,l),u=cn(r),d=Lr(r),A=En(r)==="y",{width:p,height:m}=a.floating;let g,b;u==="top"||u==="bottom"?(g=u,b=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,g=d==="end"?"top":"bottom");const y=m-c.top-c.bottom,k=p-c.left-c.right,h=Wt(m-c[g],y),f=Wt(p-c[b],k),v=!e.middlewareData.shift;let w=h,E=f;if(A?E=d||v?Wt(f,k):k:w=d||v?Wt(h,y):y,v&&!d){const D=yt(c.left,0),T=yt(c.right,0),x=yt(c.top,0),B=yt(c.bottom,0);A?E=p-2*(D!==0||T!==0?D+T:yt(c.left,c.right)):w=m-2*(x!==0||B!==0?x+B:yt(c.top,c.bottom))}await s({...e,availableWidth:E,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}};function or(t){return pl(t)?(t.nodeName||"").toLowerCase():"#document"}function wt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function un(t){var e;return(e=(pl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pl(t){return t instanceof Node||t instanceof wt(t).Node}function _t(t){return t instanceof Element||t instanceof wt(t).Element}function Yt(t){return t instanceof HTMLElement||t instanceof wt(t).HTMLElement}function I1(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof wt(t).ShadowRoot}function Da(t){const{overflow:e,overflowX:r,overflowY:a,display:o}=Rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+r)&&!["inline","contents"].includes(o)}function a5(t){return["table","td","th"].includes(or(t))}function zo(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ml(t){const e=hl(),r=_t(t)?Rt(t):t;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(a=>(r.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(r.contain||"").includes(a))}function o5(t){let e=kn(t);for(;Yt(e)&&!Fr(e);){if(ml(e))return e;if(zo(e))return null;e=kn(e)}return null}function hl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(t){return["html","body","#document"].includes(or(t))}function Rt(t){return wt(t).getComputedStyle(t)}function Ko(t){return _t(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kn(t){if(or(t)==="html")return t;const e=t.assignedSlot||t.parentNode||I1(t)&&t.host||un(t);return I1(e)?e.host:e}function M1(t){const e=kn(t);return Fr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Yt(e)&&Da(e)?e:M1(e)}function Oa(t,e,r){var a;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=M1(t),i=o===((a=t.ownerDocument)==null?void 0:a.body),s=wt(o);if(i){const l=gl(s);return e.concat(s,s.visualViewport||[],Da(o)?o:[],l&&r?Oa(l):[])}return e.concat(o,Oa(o,[],r))}function gl(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function P1(t){const e=Rt(t);let r=parseFloat(e.width)||0,a=parseFloat(e.height)||0;const o=Yt(t),i=o?t.offsetWidth:r,s=o?t.offsetHeight:a,l=Zo(r)!==i||Zo(a)!==s;return l&&(r=i,a=s),{width:r,height:a,$:l}}function vl(t){return _t(t)?t:t.contextElement}function Ur(t){const e=vl(t);if(!Yt(e))return Cn(1);const r=e.getBoundingClientRect(),{width:a,height:o,$:i}=P1(e);let s=(i?Zo(r.width):r.width)/a,l=(i?Zo(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const i5=Cn(0);function _1(t){const e=wt(t);return!hl()||!e.visualViewport?i5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function s5(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==wt(t)?!1:e}function ir(t,e,r,a){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),i=vl(t);let s=Cn(1);e&&(a?_t(a)&&(s=Ur(a)):s=Ur(t));const l=s5(i,r,a)?_1(i):Cn(0);let c=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,A=o.height/s.y;if(i){const p=wt(i),m=a&&_t(a)?wt(a):a;let g=p,b=gl(g);for(;b&&a&&m!==g;){const y=Ur(b),k=b.getBoundingClientRect(),h=Rt(b),f=k.left+(b.clientLeft+parseFloat(h.paddingLeft))*y.x,v=k.top+(b.clientTop+parseFloat(h.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,A*=y.y,c+=f,u+=v,g=wt(b),b=gl(g)}}return qo({width:d,height:A,x:c,y:u})}function l5(t){let{elements:e,rect:r,offsetParent:a,strategy:o}=t;const i=o==="fixed",s=un(a),l=e?zo(e.floating):!1;if(a===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Cn(1);const d=Cn(0),A=Yt(a);if((A||!A&&!i)&&((or(a)!=="body"||Da(s))&&(c=Ko(a)),Yt(a))){const p=ir(a);u=Ur(a),d.x=p.x+a.clientLeft,d.y=p.y+a.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x,y:r.y*u.y-c.scrollTop*u.y+d.y}}function c5(t){return Array.from(t.getClientRects())}function R1(t){return ir(un(t)).left+Ko(t).scrollLeft}function u5(t){const e=un(t),r=Ko(t),a=t.ownerDocument.body,o=yt(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),i=yt(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let s=-r.scrollLeft+R1(t);const l=-r.scrollTop;return Rt(a).direction==="rtl"&&(s+=yt(e.clientWidth,a.clientWidth)-o),{width:o,height:i,x:s,y:l}}function d5(t,e){const r=wt(t),a=un(t),o=r.visualViewport;let i=a.clientWidth,s=a.clientHeight,l=0,c=0;if(o){i=o.width,s=o.height;const u=hl();(!u||u&&e==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:l,y:c}}function A5(t,e){const r=ir(t,!0,e==="fixed"),a=r.top+t.clientTop,o=r.left+t.clientLeft,i=Yt(t)?Ur(t):Cn(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,c=o*i.x,u=a*i.y;return{width:s,height:l,x:c,y:u}}function L1(t,e,r){let a;if(e==="viewport")a=d5(t,r);else if(e==="document")a=u5(un(t));else if(_t(e))a=A5(e,r);else{const o=_1(t);a={...e,x:e.x-o.x,y:e.y-o.y}}return qo(a)}function F1(t,e){const r=kn(t);return r===e||!_t(r)||Fr(r)?!1:Rt(r).position==="fixed"||F1(r,e)}function f5(t,e){const r=e.get(t);if(r)return r;let a=Oa(t,[],!1).filter(l=>_t(l)&&or(l)!=="body"),o=null;const i=Rt(t).position==="fixed";let s=i?kn(t):t;for(;_t(s)&&!Fr(s);){const l=Rt(s),c=ml(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Da(s)&&!c&&F1(t,s))?a=a.filter(d=>d!==s):o=l,s=kn(s)}return e.set(t,a),a}function p5(t){let{element:e,boundary:r,rootBoundary:a,strategy:o}=t;const s=[...r==="clippingAncestors"?zo(e)?[]:f5(e,this._c):[].concat(r),a],l=s[0],c=s.reduce((u,d)=>{const A=L1(e,d,o);return u.top=yt(A.top,u.top),u.right=Wt(A.right,u.right),u.bottom=Wt(A.bottom,u.bottom),u.left=yt(A.left,u.left),u},L1(e,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function m5(t){const{width:e,height:r}=P1(t);return{width:e,height:r}}function h5(t,e,r){const a=Yt(e),o=un(e),i=r==="fixed",s=ir(t,!0,i,e);let l={scrollLeft:0,scrollTop:0};const c=Cn(0);if(a||!a&&!i)if((or(e)!=="body"||Da(o))&&(l=Ko(e)),a){const A=ir(e,!0,i,e);c.x=A.x+e.clientLeft,c.y=A.y+e.clientTop}else o&&(c.x=R1(o));const u=s.left+l.scrollLeft-c.x,d=s.top+l.scrollTop-c.y;return{x:u,y:d,width:s.width,height:s.height}}function yl(t){return Rt(t).position==="static"}function U1(t,e){return!Yt(t)||Rt(t).position==="fixed"?null:e?e(t):t.offsetParent}function Z1(t,e){const r=wt(t);if(zo(t))return r;if(!Yt(t)){let o=kn(t);for(;o&&!Fr(o);){if(_t(o)&&!yl(o))return o;o=kn(o)}return r}let a=U1(t,e);for(;a&&a5(a)&&yl(a);)a=U1(a,e);return a&&Fr(a)&&yl(a)&&!ml(a)?r:a||o5(t)||r}const g5=async function(t){const e=this.getOffsetParent||Z1,r=this.getDimensions,a=await r(t.floating);return{reference:h5(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function v5(t){return Rt(t).direction==="rtl"}const y5={convertOffsetParentRelativeRectToViewportRelativeRect:l5,getDocumentElement:un,getClippingRect:p5,getOffsetParent:Z1,getElementRects:g5,getClientRects:c5,getDimensions:m5,getScale:Ur,isElement:_t,isRTL:v5};function w5(t,e){let r=null,a;const o=un(t);function i(){var l;clearTimeout(a),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:A,height:p}=t.getBoundingClientRect();if(l||e(),!A||!p)return;const m=Ho(d),g=Ho(o.clientWidth-(u+A)),b=Ho(o.clientHeight-(d+p)),y=Ho(u),h={rootMargin:-m+"px "+-g+"px "+-b+"px "+-y+"px",threshold:yt(0,Wt(1,c))||1};let f=!0;function v(w){const E=w[0].intersectionRatio;if(E!==c){if(!f)return s();E?s(!1,E):a=setTimeout(()=>{s(!1,1e-7)},1e3)}f=!1}try{r=new IntersectionObserver(v,{...h,root:o.ownerDocument})}catch{r=new IntersectionObserver(v,h)}r.observe(t)}return s(!0),i}function b5(t,e,r,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,u=vl(t),d=o||i?[...u?Oa(u):[],...Oa(e)]:[];d.forEach(k=>{o&&k.addEventListener("scroll",r,{passive:!0}),i&&k.addEventListener("resize",r)});const A=u&&l?w5(u,r):null;let p=-1,m=null;s&&(m=new ResizeObserver(k=>{let[h]=k;h&&h.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var f;(f=m)==null||f.observe(e)})),r()}),u&&!c&&m.observe(u),m.observe(e));let g,b=c?ir(t):null;c&&y();function y(){const k=ir(t);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&r(),b=k,g=requestAnimationFrame(y)}return r(),()=>{var k;d.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),A==null||A(),(k=m)==null||k.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const C5=e5,E5=t5,H1=Yh,k5=r5,x5=Gh,B5=Wh,S5=n5,T5=(t,e,r)=>{const a=new Map,o={platform:y5,...r},i={...o.platform,_c:a};return Xh(t,e,{...o,platform:i})};function D5(t){return t!=null&&typeof t=="object"&&"$el"in t}function wl(t){if(D5(t)){const e=t.$el;return pl(e)&&or(e)==="#comment"?null:e}return t}function Zr(t){return typeof t=="function"?t():n.unref(t)}function O5(t){return{name:"arrow",options:t,fn(e){const r=wl(Zr(t.element));return r==null?{}:B5({element:r,padding:t.padding}).fn(e)}}}function Q1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function q1(t,e){const r=Q1(t);return Math.round(e*r)/r}function V5(t,e,r){r===void 0&&(r={});const a=r.whileElementsMounted,o=n.computed(()=>{var C;return(C=Zr(r.open))!=null?C:!0}),i=n.computed(()=>Zr(r.middleware)),s=n.computed(()=>{var C;return(C=Zr(r.placement))!=null?C:"bottom"}),l=n.computed(()=>{var C;return(C=Zr(r.strategy))!=null?C:"absolute"}),c=n.computed(()=>{var C;return(C=Zr(r.transform))!=null?C:!0}),u=n.computed(()=>wl(t.value)),d=n.computed(()=>wl(e.value)),A=n.ref(0),p=n.ref(0),m=n.ref(l.value),g=n.ref(s.value),b=n.shallowRef({}),y=n.ref(!1),k=n.computed(()=>{const C={position:m.value,left:"0",top:"0"};if(!d.value)return C;const D=q1(d.value,A.value),T=q1(d.value,p.value);return c.value?{...C,transform:"translate("+D+"px, "+T+"px)",...Q1(d.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:D+"px",top:T+"px"}});let h;function f(){u.value==null||d.value==null||T5(u.value,d.value,{middleware:i.value,placement:s.value,strategy:l.value}).then(C=>{A.value=C.x,p.value=C.y,m.value=C.strategy,g.value=C.placement,b.value=C.middlewareData,y.value=!0})}function v(){typeof h=="function"&&(h(),h=void 0)}function w(){if(v(),a===void 0){f();return}if(u.value!=null&&d.value!=null){h=a(u.value,d.value,f);return}}function E(){o.value||(y.value=!1)}return n.watch([i,s,l],f,{flush:"sync"}),n.watch([u,d],w,{flush:"sync"}),n.watch(o,E,{flush:"sync"}),n.getCurrentScope()&&n.onScopeDispose(v),{x:n.shallowReadonly(A),y:n.shallowReadonly(p),strategy:n.shallowReadonly(m),placement:n.shallowReadonly(g),middlewareData:n.shallowReadonly(b),isPositioned:n.shallowReadonly(y),floatingStyles:k,update:f}}function He(t,e){const r=typeof t=="string"&&!e?`${t}Context`:e,a=Symbol(r);return[o=>{const i=n.inject(a,o);if(i||i===null)return i;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(n.provide(a,o),o)]}function z1(t,e,r){const a=r.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),a.dispatchEvent(o)}function K1(t){return t==null}function bl(t){const{defaultValue:e,defaultPlaceholder:r,granularity:a="day",locale:o="en"}=t;if(Array.isArray(e)&&e.length)return e.at(-1).copy();if(e&&!Array.isArray(e))return e.copy();if(r)return r.copy();const i=new Date,s=i.getFullYear(),l=i.getMonth()+1,c=i.getDate(),u=["hour","minute","second"],d=new sn(o),A=Ih(d.resolvedOptions().calendar);return u.includes(a??"day")?ut(new Vr(s,l,c,0,0,0),A):ut(new ze(s,l,c),A)}const I5=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],M5=["year","month","day"],Cl={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function P5(t){if(j1(t))return Cl[t];{const e=F5(t);return j1(e)?Cl[e]:Cl.en}}function El(t,e,r){return _5(t)?P5(r)[t]:L5(t)?e:R5(t)?"––":""}function j1(t){return I5.includes(t)}function _5(t){return M5.includes(t)}function R5(t){return t==="hour"||t==="minute"||t==="second"}function L5(t){return t==="era"||t==="dayPeriod"}function F5(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const kl=["day","month","year"],J1=["hour","minute","second","dayPeriod"],$1=[...kl,...J1];function U5(t){return kl.includes(t)}function X1(t){return $1.includes(t)}function Z5(t,e){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:e===24?"h24":void 0,hour12:e===24?!1:void 0};return t==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),t==="hour"&&(delete r.minute,delete r.second),t==="minute"&&delete r.second,r}function H5(t){const e=t.querySelector("[data-selected]");if(e)return e.focus();const r=t.querySelector("[data-today]");if(r)return r.focus();const a=t.querySelector("[data-radix-vue-calendar-day]");if(a)return a.focus()}function Q5(t,e){var r;const a=n.shallowRef();return n.watchEffect(()=>{a.value=t()},{...e,flush:(r=void 0)!=null?r:"sync"}),n.readonly(a)}function Va(t){return n.getCurrentScope()?(n.onScopeDispose(t),!0):!1}function q5(){const t=new Set,e=r=>{t.delete(r)};return{on:r=>{t.add(r);const a=()=>e(r);return Va(a),{off:a}},off:e,trigger:(...r)=>Promise.all(Array.from(t).map(a=>a(...r)))}}function z5(t){let e=!1,r;const a=n.effectScope(!0);return(...o)=>(e||(r=a.run(()=>t(...o)),e=!0),r)}function W1(t){let e=0,r,a;const o=()=>{e-=1,a&&e<=0&&(a.stop(),r=void 0,a=void 0)};return(...i)=>(e+=1,r||(a=n.effectScope(!0),r=a.run(()=>t(...i))),Va(o),r)}function xn(t){return typeof t=="function"?t():n.unref(t)}const dn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K5=t=>typeof t<"u",j5=Object.prototype.toString,J5=t=>j5.call(t)==="[object Object]",$5=()=>{},Y1=X5();function X5(){var t,e;return dn&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function W5(t){return n.getCurrentInstance()}function G1(t,e=1e4){return n.customRef((r,a)=>{let o=xn(t),i;const s=()=>setTimeout(()=>{o=xn(t),a()},xn(e));return Va(()=>{clearTimeout(i)}),{get(){return r(),o},set(l){o=l,a(),clearTimeout(i),i=s()}}})}function Y5(t,e){W5()&&n.onBeforeUnmount(t,e)}function N1(t,e,r={}){const{immediate:a=!0}=r,o=n.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function l(){o.value=!1,s()}function c(...u){s(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,t(...u)},xn(e))}return a&&(o.value=!0,dn&&c()),Va(l),{isPending:n.readonly(o),start:c,stop:l}}function Bn(t){var e;const r=xn(t);return(e=r==null?void 0:r.$el)!=null?e:r}const xl=dn?window:void 0;function Sn(...t){let e,r,a,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,a,o]=t,e=xl):[e,r,a,o]=t,!e)return $5;Array.isArray(r)||(r=[r]),Array.isArray(a)||(a=[a]);const i=[],s=()=>{i.forEach(d=>d()),i.length=0},l=(d,A,p,m)=>(d.addEventListener(A,p,m),()=>d.removeEventListener(A,p,m)),c=n.watch(()=>[Bn(e),xn(o)],([d,A])=>{if(s(),!d)return;const p=J5(A)?{...A}:A;i.push(...r.flatMap(m=>a.map(g=>l(d,m,g,p))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return Va(u),u}function G5(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function N5(...t){let e,r,a={};t.length===3?(e=t[0],r=t[1],a=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],a=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:o=xl,eventName:i="keydown",passive:s=!1,dedupe:l=!1}=a,c=G5(e);return Sn(o,i,u=>{u.repeat&&xn(l)||c(u)&&r(u)},s)}function e4(){const t=n.ref(!1),e=n.getCurrentInstance();return e&&n.onMounted(()=>{t.value=!0},e),t}function t4(t){return JSON.parse(JSON.stringify(t))}function We(t,e,r,a={}){var o,i,s;const{clone:l=!1,passive:c=!1,eventName:u,deep:d=!1,defaultValue:A,shouldEmit:p}=a,m=n.getCurrentInstance(),g=r||(m==null?void 0:m.emit)||((o=m==null?void 0:m.$emit)==null?void 0:o.bind(m))||((s=(i=m==null?void 0:m.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(m==null?void 0:m.proxy));let b=u;e||(e="modelValue"),b=b||`update:${e.toString()}`;const y=f=>l?typeof l=="function"?l(f):t4(f):f,k=()=>K5(t[e])?y(t[e]):A,h=f=>{p?p(f)&&g(b,f):g(b,f)};if(c){const f=k(),v=n.ref(f);let w=!1;return n.watch(()=>t[e],E=>{w||(w=!0,v.value=y(E),n.nextTick(()=>w=!1))}),n.watch(v,E=>{!w&&(E!==t[e]||d)&&h(E)},{deep:d}),v}else return n.computed({get(){return k()},set(f){h(f)}})}function Bl(t){return t?t.flatMap(e=>e.type===n.Fragment?Bl(e.children):[e]):[]}function dt(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const n4=["INPUT","TEXTAREA"];function r4(t,e,r,a={}){if(!e||a.enableIgnoredElement&&n4.includes(e.nodeName))return null;const{arrowKeyOptions:o="both",attributeName:i="[data-radix-vue-collection-item]",itemsArray:s=[],loop:l=!0,dir:c="ltr",preventScroll:u=!0,focus:d=!1}=a,[A,p,m,g,b,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],k=m||g,h=A||p;if(!b&&!y&&(!k&&!h||o==="vertical"&&h||o==="horizontal"&&k))return null;const f=r?Array.from(r.querySelectorAll(i)):s;if(!f.length)return null;u&&t.preventDefault();let v=null;return h||k?v=eA(f,e,{goForward:k?g:c==="ltr"?A:p,loop:l}):b?v=f.at(0)||null:y&&(v=f.at(-1)||null),d&&(v==null||v.focus()),v}function eA(t,e,r,a=t.length){if(--a===0)return null;const o=t.indexOf(e),i=r.goForward?o+1:o-1;if(!r.loop&&(i<0||i>=t.length))return null;const s=(i+t.length)%t.length,l=t[s];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?eA(t,l,r,a):l:null}function Sl(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Tl(t,e,r=".",a){if(!Sl(e))return Tl(t,{},r);const o=Object.assign({},e);for(const i in t){if(i==="__proto__"||i==="constructor")continue;const s=t[i];s!=null&&(Array.isArray(s)&&Array.isArray(o[i])?o[i]=[...s,...o[i]]:Sl(s)&&Sl(o[i])?o[i]=Tl(s,o[i],(r?`${r}.`:"")+i.toString()):o[i]=s)}return o}function a4(t){return(...e)=>e.reduce((r,a)=>Tl(r,a,""),{})}const o4=a4(),[Dl,aO]=He("ConfigProvider");let i4="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",s4=(t=21)=>{let e="",r=t;for(;r--;)e+=i4[Math.random()*64|0];return e};const l4=W1(()=>{const t=n.ref(new Map),e=n.ref(),r=n.computed(()=>{for(const s of t.value.values())if(s)return!0;return!1}),a=Dl({scrollBody:n.ref(!0)});let o=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",Y1&&(o==null||o()),e.value=void 0};return n.watch(r,(s,l)=>{var c;if(!dn)return;if(!s){l&&i();return}e.value===void 0&&(e.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,d={padding:u,margin:0},A=(c=a.scrollBody)!=null&&c.value?typeof a.scrollBody.value=="object"?o4({padding:a.scrollBody.value.padding===!0?u:a.scrollBody.value.padding,margin:a.scrollBody.value.margin===!0?u:a.scrollBody.value.margin},d):d:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=typeof A.padding=="number"?`${A.padding}px`:String(A.padding),document.body.style.marginRight=typeof A.margin=="number"?`${A.margin}px`:String(A.margin),document.body.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),Y1&&(o=Sn(document,"touchmove",p=>c4(p),{passive:!1})),n.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Ol(t){const e=s4(6),r=l4();r.value.set(e,t??!1);const a=n.computed({get:()=>r.value.get(e)??!1,set:o=>r.value.set(e,o)});return Y5(()=>{r.value.delete(e)}),a}function tA(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const r=t.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:tA(r)}}function c4(t){const e=t||window.event,r=e.target;return r instanceof Element&&tA(r)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const u4="data-radix-vue-collection-item";function d4(t,e=u4){const r=Symbol();return{createCollection:a=>{const o=n.ref([]);function i(){const s=Bn(a);return s?o.value=Array.from(s.querySelectorAll(`[${e}]:not([data-disabled])`)):o.value=[]}return n.onBeforeUpdate(()=>{o.value=[]}),n.onMounted(i),n.onUpdated(i),n.watch(()=>a==null?void 0:a.value,i,{immediate:!0}),n.provide(r,o),o},injectCollection:()=>n.inject(r,n.ref([]))}}function nA(t){const e=n.ref(t);function r(){return e.value}function a(b){e.value=b}function o(b,y){return new sn(e.value,y).format(b)}function i(b,y=!0){return sl(b)&&y?o(xt(b),{dateStyle:"long",timeStyle:"long"}):o(xt(b),{dateStyle:"long"})}function s(b,y={}){return new sn(e.value,{month:"long",year:"numeric",...y}).format(b)}function l(b,y={}){return new sn(e.value,{month:"long",...y}).format(b)}function c(){const b=Hd(Ea());return[1,2,3,4,5,6,7,8,9,10,11,12].map(y=>({label:l(xt(b.set({month:y}))),value:y}))}function u(b,y={}){return new sn(e.value,{year:"numeric",...y}).format(b)}function d(b,y){return Fo(b)?new sn(e.value,{...y,timeZone:b.timeZone}).formatToParts(xt(b)):new sn(e.value,y).formatToParts(xt(b))}function A(b,y="narrow"){return new sn(e.value,{weekday:y}).format(b)}function p(b){var y;return((y=new sn(e.value,{hour:"numeric",minute:"numeric"}).formatToParts(b).find(k=>k.type==="dayPeriod"))==null?void 0:y.value)==="PM"?"PM":"AM"}const m={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function g(b,y,k={}){const h={...m,...k},f=d(b,h).find(v=>v.type===y);return f?f.value:""}return{setLocale:a,getLocale:r,fullMonth:l,fullYear:u,fullMonthAndYear:s,toParts:d,custom:o,part:g,dayPeriod:p,selectedDate:i,dayOfWeek:A,getMonths:c}}function sr(t){const e=Dl({dir:n.ref("ltr")});return n.computed(()=>{var r;return(t==null?void 0:t.value)||((r=e.dir)==null?void 0:r.value)||"ltr"})}function Ia(t){const e=n.getCurrentInstance(),r=e==null?void 0:e.type.emits,a={};return r!=null&&r.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),r==null||r.forEach(o=>{a[n.toHandlerKey(n.camelize(o))]=(...i)=>t(o,...i)}),a}let Vl=0;function rA(){n.watchEffect(t=>{if(!dn)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??aA()),document.body.insertAdjacentElement("beforeend",e[1]??aA()),Vl++,t(()=>{Vl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Vl--})})}function aA(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function Il(t){return n.computed(()=>{var e;return xn(t)?!!((e=Bn(t))!=null&&e.closest("form")):!0})}function Ml(t){const e=n.getCurrentInstance(),r=Object.keys((e==null?void 0:e.type.props)??{}).reduce((o,i)=>{const s=(e==null?void 0:e.type.props[i]).default;return s!==void 0&&(o[i]=s),o},{}),a=n.toRef(t);return n.computed(()=>{const o={},i=(e==null?void 0:e.vnode.props)??{};return Object.keys(i).forEach(s=>{o[n.camelize(s)]=i[s]}),Object.keys({...r,...o}).reduce((s,l)=>(a.value[l]!==void 0&&(s[l]=a.value[l]),s),{})})}function An(t,e){const r=Ml(t),a=e?Ia(e):{};return n.computed(()=>({...r.value,...a}))}function fe(){const t=n.getCurrentInstance(),e=n.ref(),r=n.computed(()=>{var s,l;return["#text","#comment"].includes((s=e.value)==null?void 0:s.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:Bn(e)}),a=Object.assign({},t.exposed),o={};for(const s in t.props)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>t.props[s]});if(Object.keys(a).length>0)for(const s in a)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>a[s]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=o;function i(s){e.value=s,s&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>s instanceof Element?s:s.$el}),t.exposed=o)}return{forwardRef:i,currentRef:e,currentElement:r}}function A4(t,e){const r=G1(!1,300),a=n.ref(null),o=q5();function i(){a.value=null,r.value=!1}function s(l,c){const u=l.currentTarget,d={x:l.clientX,y:l.clientY},A=f4(d,u.getBoundingClientRect()),p=p4(d,A),m=m4(c.getBoundingClientRect()),g=g4([...p,...m]);a.value=g,r.value=!0}return n.watchEffect(l=>{if(t.value&&e.value){const c=d=>s(d,e.value),u=d=>s(d,t.value);t.value.addEventListener("pointerleave",c),e.value.addEventListener("pointerleave",u),l(()=>{var d,A;(d=t.value)==null||d.removeEventListener("pointerleave",c),(A=e.value)==null||A.removeEventListener("pointerleave",u)})}}),n.watchEffect(l=>{var c;if(a.value){const u=d=>{var A,p;if(!a.value)return;const m=d.target,g={x:d.clientX,y:d.clientY},b=((A=t.value)==null?void 0:A.contains(m))||((p=e.value)==null?void 0:p.contains(m)),y=!h4(g,a.value),k=!!m.closest("[data-grace-area-trigger]");b?i():(y||k)&&(i(),o.trigger())};(c=t.value)==null||c.ownerDocument.addEventListener("pointermove",u),l(()=>{var d;return(d=t.value)==null?void 0:d.ownerDocument.removeEventListener("pointermove",u)})}}),{isPointerInTransit:r,onPointerExit:o.on}}function f4(t,e){const r=Math.abs(e.top-t.y),a=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,a,o,i)){case i:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function p4(t,e,r=5){const a=[];switch(e){case"top":a.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":a.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":a.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":a.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return a}function m4(t){const{top:e,right:r,bottom:a,left:o}=t;return[{x:o,y:e},{x:r,y:e},{x:r,y:a},{x:o,y:a}]}function h4(t,e){const{x:r,y:a}=t;let o=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const l=e[i].x,c=e[i].y,u=e[s].x,d=e[s].y;c>a!=d>a&&r<(u-l)*(a-c)/(d-c)+l&&(o=!o)}return o}function g4(t){const e=t.slice();return e.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),v4(e)}function v4(t){if(t.length<=1)return t.slice();const e=[];for(let a=0;a<t.length;a++){const o=t[a];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))e.pop();else break}e.push(o)}e.pop();const r=[];for(let a=t.length-1;a>=0;a--){const o=t[a];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var y4=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Hr=new WeakMap,jo=new WeakMap,Jo={},Pl=0,oA=function(t){return t&&(t.host||oA(t.parentNode))},w4=function(t,e){return e.map(function(r){if(t.contains(r))return r;var a=oA(r);return a&&t.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},b4=function(t,e,r,a){var o=w4(e,Array.isArray(t)?t:[t]);Jo[r]||(Jo[r]=new WeakMap);var i=Jo[r],s=[],l=new Set,c=new Set(o),u=function(A){!A||l.has(A)||(l.add(A),u(A.parentNode))};o.forEach(u);var d=function(A){!A||c.has(A)||Array.prototype.forEach.call(A.children,function(p){if(l.has(p))d(p);else try{var m=p.getAttribute(a),g=m!==null&&m!=="false",b=(Hr.get(p)||0)+1,y=(i.get(p)||0)+1;Hr.set(p,b),i.set(p,y),s.push(p),b===1&&g&&jo.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(a,"true")}catch(k){console.error("aria-hidden: cannot operate on ",p,k)}})};return d(e),l.clear(),Pl++,function(){s.forEach(function(A){var p=Hr.get(A)-1,m=i.get(A)-1;Hr.set(A,p),i.set(A,m),p||(jo.has(A)||A.removeAttribute(a),jo.delete(A)),m||A.removeAttribute(r)}),Pl--,Pl||(Hr=new WeakMap,Hr=new WeakMap,jo=new WeakMap,Jo={})}},C4=function(t,e,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),o=y4(t);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live]"))),b4(a,o,r,"aria-hidden")):function(){return null}};function _l(t){let e;n.watch(()=>Bn(t),r=>{r?e=C4(r):e&&e()}),n.onUnmounted(()=>{e&&e()})}let E4=0;function Tn(t,e="radix"){const r=Dl({useId:void 0});return pu.useId?`${e}-${pu.useId()}`:r.useId?`${e}-${r.useId()}`:`${e}-${++E4}`}function k4(t){const e=n.ref(),r=n.computed(()=>{var o;return((o=e.value)==null?void 0:o.width)??0}),a=n.computed(()=>{var o;return((o=e.value)==null?void 0:o.height)??0});return n.onMounted(()=>{const o=Bn(t);if(o){e.value={width:o.offsetWidth,height:o.offsetHeight};const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,u;if("borderBoxSize"in l){const d=l.borderBoxSize,A=Array.isArray(d)?d[0]:d;c=A.inlineSize,u=A.blockSize}else c=o.offsetWidth,u=o.offsetHeight;e.value={width:c,height:u}});return i.observe(o,{box:"border-box"}),()=>i.unobserve(o)}else e.value=void 0}),{width:r,height:a}}function x4(t,e){const r=n.ref(t);function a(o){return e[r.value][o]??r.value}return{state:r,dispatch:o=>{r.value=a(o)}}}const B4="data-item-text";function S4(t){const e=G1("",1e3);return{search:e,handleTypeaheadSearch:(r,a)=>{if(!(t!=null&&t.value)&&!a)return;e.value=e.value+r;const o=(t==null?void 0:t.value)??a,i=dt(),s=o.map(A=>{var p;return{ref:A,textValue:((p=(A.querySelector(`[${B4}]`)??A).textContent)==null?void 0:p.trim())??""}}),l=s.find(A=>A.ref===i),c=s.map(A=>A.textValue),u=D4(c,e.value,l==null?void 0:l.textValue),d=s.find(A=>A.textValue===u);return d&&d.ref.focus(),d==null?void 0:d.ref},resetTypeahead:()=>{e.value=""}}}function T4(t,e){return t.map((r,a)=>t[(e+a)%t.length])}function D4(t,e,r){const a=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,o=r?t.indexOf(r):-1;let i=T4(t,Math.max(o,0));a.length===1&&(i=i.filter(l=>l!==r));const s=i.find(l=>l.toLowerCase().startsWith(a.toLowerCase()));return s!==r?s:void 0}function Ma(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}const Rl=n.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:r}){return()=>{var a,o;if(!r.default)return null;const i=Bl(r.default()),s=i.findIndex(d=>d.type!==n.Comment);if(s===-1)return i;const l=i[s];(a=l.props)==null||delete a.ref;const c=l.props?n.mergeProps(e,l.props):e;e.class&&(o=l.props)!=null&&o.class&&delete l.props.class;const u=n.cloneVNode(l,c);for(const d in c)d.startsWith("on")&&(u.props||(u.props={}),u.props[d]=c[d]);return i.length===1?u:(i[s]=u,i)}}}),Ce=n.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:r}){const a=t.asChild?"template":t.as;return typeof a=="string"&&["area","img","input"].includes(a)?()=>n.h(a,e):a!=="template"?()=>n.h(t.as,e,{default:r.default}):()=>n.h(Rl,e,{default:r.default})}});function Pa(){const t=n.ref(),e=n.computed(()=>{var r,a;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(a=t.value)==null?void 0:a.$el.nextElementSibling:Bn(t)});return{primitiveElement:t,currentElement:e}}function O4(t,e){var r;const a=n.ref({}),o=n.ref("none"),i=n.ref(t),s=t.value?"mounted":"unmounted";let l;const c=((r=e.value)==null?void 0:r.ownerDocument.defaultView)??xl,{state:u,dispatch:d}=x4(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),A=y=>{var k;if(dn){const h=new CustomEvent(y,{bubbles:!1,cancelable:!1});(k=e.value)==null||k.dispatchEvent(h)}};n.watch(t,async(y,k)=>{var h;const f=k!==y;if(await n.nextTick(),f){const v=o.value,w=$o(e.value);y?(d("MOUNT"),A("enter"),w==="none"&&A("after-enter")):w==="none"||((h=a.value)==null?void 0:h.display)==="none"?(d("UNMOUNT"),A("leave"),A("after-leave")):k&&v!==w?(d("ANIMATION_OUT"),A("leave")):(d("UNMOUNT"),A("after-leave"))}},{immediate:!0});const p=y=>{const k=$o(e.value),h=k.includes(y.animationName),f=u.value==="mounted"?"enter":"leave";if(y.target===e.value&&h&&(A(`after-${f}`),d("ANIMATION_END"),!i.value)){const v=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=c==null?void 0:c.setTimeout(()=>{var w;((w=e.value)==null?void 0:w.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=v)})}y.target===e.value&&k==="none"&&d("ANIMATION_END")},m=y=>{y.target===e.value&&(o.value=$o(e.value))},g=n.watch(e,(y,k)=>{y?(a.value=getComputedStyle(y),y.addEventListener("animationstart",m),y.addEventListener("animationcancel",p),y.addEventListener("animationend",p)):(d("ANIMATION_END"),l!==void 0&&(c==null||c.clearTimeout(l)),k==null||k.removeEventListener("animationstart",m),k==null||k.removeEventListener("animationcancel",p),k==null||k.removeEventListener("animationend",p))},{immediate:!0}),b=n.watch(u,()=>{const y=$o(e.value);o.value=u.value==="mounted"?y:"none"});return n.onUnmounted(()=>{g(),b()}),{isPresent:n.computed(()=>["mounted","unmountSuspended"].includes(u.value))}}function $o(t){return t&&getComputedStyle(t).animationName||"none"}const lr=n.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:r}){var a;const{present:o,forceMount:i}=n.toRefs(t),s=n.ref(),{isPresent:l}=O4(o,s);r({present:l});let c=e.default({present:l});c=Bl(c||[]);const u=n.getCurrentInstance();if(c&&(c==null?void 0:c.length)>1){const d=(a=u==null?void 0:u.parent)!=null&&a.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${d}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(A=>` - ${A}`).join(`
17
+ `+i):a.stack=i}catch{}}throw a}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Nn(this.defaults,r);const{transitional:a,paramsSerializer:o,headers:i}=r;a!==void 0&&Us.assertOptions(a,{silentJSONParsing:yn.transitional(yn.boolean),forcedJSONParsing:yn.transitional(yn.boolean),clarifyTimeoutError:yn.transitional(yn.boolean)},!1),o!=null&&(I.isFunction(o)?r.paramsSerializer={serialize:o}:Us.assertOptions(o,{encode:yn.function,serialize:yn.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&I.merge(i.common,i[r.method]);i&&I.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=ct.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(c=c&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let d,A=0,p;if(!c){const g=[Sd.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,u),p=g.length,d=Promise.resolve(r);A<p;)d=d.then(g[A++],g[A++]);return d}p=l.length;let m=r;for(A=0;A<p;){const g=l[A++],b=l[A++];try{m=g(m)}catch(y){b.call(this,y);break}}try{d=Sd.call(this,m)}catch(g){return Promise.reject(g)}for(A=0,p=u.length;A<p;)d=d.then(u[A++],u[A++]);return d}getUri(e){e=Nn(this.defaults,e);const r=vd(e.baseURL,e.url);return cd(r,e.params,e.paramsSerializer)}}I.forEach(["delete","get","head","options"],function(e){er.prototype[e]=function(r,a){return this.request(Nn(a||{},{method:e,url:r,data:(a||{}).data}))}}),I.forEach(["post","put","patch"],function(e){function r(a){return function(i,s,l){return this.request(Nn(l||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}er.prototype[e]=r(),er.prototype[e+"Form"]=r(!0)});class Zs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const a=this;this.promise.then(o=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](o);a._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{a.subscribe(l),i=l}).then(o);return s.cancel=function(){a.unsubscribe(i)},s},e(function(i,s,l){a.reason||(a.reason=new xr(i,s,l),r(a.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;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new Zs(function(o){e=o}),cancel:e}}}function y3(t){return function(r){return t.apply(null,r)}}function w3(t){return I.isObject(t)&&t.isAxiosError===!0}const Hs={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};Object.entries(Hs).forEach(([t,e])=>{Hs[e]=t});function Od(t){const e=new er(t),r=Ju(er.prototype.request,e);return I.extend(r,er.prototype,e,{allOwnKeys:!0}),I.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Od(Nn(t,o))},r}const qe=Od(ya);qe.Axios=er,qe.CanceledError=xr,qe.CancelToken=Zs,qe.isCancel=pd,qe.VERSION=Td,qe.toFormData=bo,qe.AxiosError=ye,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=y3,qe.isAxiosError=w3,qe.mergeConfig=Nn,qe.AxiosHeaders=ct,qe.formToJSON=t=>Ad(I.isHTMLForm(t)?new FormData(t):t),qe.getAdapter=Bd.getAdapter,qe.HttpStatusCode=Hs,qe.default=qe;const se=qe.create({headers:{"Content-Type":"application/json","Cache-Control":"no-cache"},timeout:15e3});se.interceptors.request.use(t=>{const e=Me(),r=e.apiBaseURLAuthNv?`${e.apiBaseURLAuthNv}`:`${e.apiBaseURL}/api`;t.baseURL=r;let a=e.userState.token;if(!a&&vn()){const o=ks();o&&(a=o)}return a&&(t.headers.Authorization=`Bearer ${a}`),e.apiBaseURLAuthNv&&!vn()&&(t.withCredentials=!0),t});const b3=async t=>se.post("v1/auth/login",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),$t=async()=>await se.post("v1/auth/me").then(e=>e.response).catch(e=>{throw e.response?e.response:e}),C3=async(t,e)=>await se.post("v1/qr-auth/generar",{aplicacion:t,deviceId:e}).then(a=>a.response.data).catch(a=>{throw a.response?a.response:a}),E3=async(t,e,r,a)=>await se.post("v1/qr-auth/autorizar",{token:t,sessionId:e,usuarioId:a,deviceId:r}).then(i=>i.response.data).catch(i=>{throw i.response?i.response:i}),Vd=async t=>await se.post("v1/auth/usuario/enviar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),k3=async t=>await se.post("v1/auth/enviar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),Id=async t=>await se.post("v1/auth/usuario/confirmar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),x3=async t=>await se.post("v1/auth/confirmar-codigo-medio",t).then(r=>r).catch(r=>{throw r.response?r.response:r}),B3=async t=>se.post("v1/auth/enviar-codigo-medio",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),Md=async t=>se.post("v1/auth/2fa-generar-codigo",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),Pd=async t=>se.post("v1/2fa/generar",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),S3=async t=>se.post("v1/auth/confirmar-codigo-medio",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),T3=async t=>se.post("v1/auth/login/confirmation",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),D3=async t=>se.post("v1/auth/verificar-totp",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),O3=async t=>se.post("v1/2fa/push/generar",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),V3=async t=>se.post("v1/2fa/push/estado",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),I3=async t=>se.post("v1/auth/push/confirmar-login",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),M3=async t=>se.post("v1/auth/2fa-push-generar",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),P3=async t=>se.post("v1/auth/2fa-push-estado",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),_3=async t=>se.post("v1/auth/2fa-push-confirmar-login",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e}),R3=async()=>se.post("v1/perfil-persona/logout").then(t=>t).catch(t=>{var e;throw(e=t.response)!=null&&e.data?t.response.data:t}),L3=async()=>se.post("v1/auth/logout").then(t=>t).catch(t=>{var e;throw(e=t.response)!=null&&e.data?t.response.data:t}),F3=async t=>se.post("v1/auth/token/refresh",t).then(e=>e).catch(e=>{var r;throw(r=e.response)!=null&&r.data?e.response.data:e});let _d=!1,Br=!1;const Me=zu("LOGIN_STORE",()=>{const t=n.ref("LOGIN_STORE"),e=n.ref("login"),r=n.ref({token:void 0,refreshToken:void 0,user:void 0,funcionario:void 0,isAuth:!1,apps:[],roles:[],permisos:[],fechaCambioPassword:void 0,diasVidaPassword:void 0,cambiarPassword:!1,forzarCambioPassword:!1}),a=n.ref(null),o=n.ref(""),i=n.ref(""),s=n.ref(!1),l=n.ref(""),c=n.ref(""),u=n.ref(""),d=n.ref(""),A=n.ref(""),p=n.ref(""),m=n.ref(!1),g=n.ref("0.0.1"),b=n.ref(!1),y=n.ref(!1),k=S=>(S??"").toString().trim(),h=S=>{const z=k(S),X=z?ys(z):null;return{cookieKey:z,cookieValue:X}},f=S=>{const{cookieValue:z}=h(S);return z?(c.value=z,z):c.value},v=()=>{e.value="login"},w=()=>{e.value="registrar"},E=()=>{e.value="recuperar-password"},C=async S=>{var Z,Q,W,ee,O,K;let z=S;const{cookieKey:X,cookieValue:ie}=h(S.usuario),pe=ie??c.value;if(ie&&(c.value=ie),i.value){const{usuario:q,...U}=z;z={numeroDocumento:q,deviceId:pe,...U}}const F=await b3({...z,codigoDispositivo:pe||void 0,aplicacion:u.value,verificarSiFuncionario:m.value});if(typeof((Z=F.response)==null?void 0:Z.mediosVerificados)=="object")return F.response;if(i.value){if(((W=(Q=F.response)==null?void 0:Q.data)==null?void 0:W.mediosVerificados.length)>0)return F;if(vn()){const q=(ee=F.response)==null?void 0:ee.accessToken;q&&(gn(q),r.value={...r.value,token:q});const U=await $t();L(U,(O=F.response)==null?void 0:O.accessToken,(K=F.response)==null?void 0:K.tokenRefresh)}else{const q=await $t();L(q)}}else P(F.response);return ie&&pe&&X&&await le({usuario:X,value:pe}),i.value?F:F.response},D=async(S,z,X)=>{var pe,F;const ie=await E3(S,z,c.value,X);if(i.value){const Z=await $t();vn()?L(Z,(pe=ie.response)==null?void 0:pe.accessToken,(F=ie.response)==null?void 0:F.tokenRefresh):L(Z)}return ie.response},T=async S=>{const z=f(S.usuario),X=await T3({...S,codigoDispositivo:z,aplicacion:u.value,verificarSiFuncionario:m.value});P(X.response),S.esDispositivoConfianza&&le({usuario:S.usuario,value:z})},x=async S=>{var ie,pe,F;const z=f(S.numeroDocumento),X=await D3({...S,deviceId:z});if(vn()){const Z=(ie=X.response)==null?void 0:ie.accessToken;Z&&(gn(Z),r.value={...r.value,token:Z});const Q=await $t();L(Q,(pe=X.response)==null?void 0:pe.accessToken,(F=X.response)==null?void 0:F.tokenRefresh)}else{const Z=await $t();L(Z)}S.dispositivoConfianza&&le({usuario:S.numeroDocumento,value:z})},B=async S=>{var ie,pe,F;const z=f(S.numeroDocumento),X=await I3({usuarioId:S.usuarioId,challengeId:S.challengeId,aplicacion:S.aplicacion,deviceId:z,esDispositivoConfianza:S.esDispositivoConfianza??!1});if(vn()){const Z=(ie=X.response)==null?void 0:ie.accessToken;Z&&(gn(Z),r.value={...r.value,token:Z});const Q=await $t();L(Q,(pe=X.response)==null?void 0:pe.accessToken,(F=X.response)==null?void 0:F.tokenRefresh)}else{const Z=await $t();L(Z)}S.esDispositivoConfianza&&le({usuario:S.numeroDocumento,value:z})},V=async S=>{const z=f(S.usuario),X=await _3({usuarioId:S.usuarioId,challengeId:S.challengeId,aplicacion:S.aplicacion,codigoDispositivo:z,esDispositivoConfianza:S.esDispositivoConfianza??!1});P(X.response),S.esDispositivoConfianza&&le({usuario:S.usuario,value:z})},$=async S=>{var ie,pe,F;const z=i.value?S.numeroDocumento:S.usuario,X=f(z);if(i.value){const Z=await Id({...S,isLogin:!0,deviceId:X});if(vn()){const Q=(ie=Z.response)==null?void 0:ie.accessToken;Q&&(gn(Q),r.value={...r.value,token:Q});const W=await $t();L(W,(pe=Z.response)==null?void 0:pe.accessToken,(F=Z.response)==null?void 0:F.tokenRefresh)}else{const Q=await $t();L(Q)}S.dispositivoConfianza&&le({usuario:S.numeroDocumento,value:X})}else{const Z=await S3({...S,codigoDispositivo:X});P(Z.response),S.esDispositivoConfianza&&le({usuario:S.usuario,value:X})}},P=(S,z)=>{var Q,W,ee,O,K,q;const X=S.accessToken||S.token;X&&gn(X);const ie=(Q=S.usuario)!=null&&Q.whatsapp&&Number(S.usuario.whatsapp)===1?1:void 0,pe=(W=S.usuario)!=null&&W.telegram&&Number(S.usuario.telegram)===1?1:void 0,F=(ee=S.usuario)!=null&&ee.emailValidado&&Number(S.usuario.emailValidado)===1?1:void 0,Z=(O=S.usuario)!=null&&O.sms&&Number(S.usuario.sms)===1?1:void 0;r.value={token:X,refreshToken:S.tokenRefresh,funcionario:S!=null&&S.funcionario?S.funcionario:void 0,user:{...S.usuario,nombreCompleto:(q=(K=S==null?void 0:S.usuario)==null?void 0:K.nombreCompleto)==null?void 0:q.toLowerCase(),fotoUrl:`${p.value}/personas/fotosegip/${S.usuario.fotoRuta}?rand=${Math.random()*100}`,whatsapp:ie,telegram:pe,sms:Z,emailValidado:F},isNvAuth:!1,isAuth:!0,apps:S.apps,roles:S.roles,permisos:S.permisos,fechaCambioPassword:S.fechaCambioPassword,diasVidaPassword:S.diasVidaPassword,forzarCambioPassword:S.obligarCambio&&y.value,forzarActivar2FA:S.obligar2FA,cambiarPassword:S.cambiarPassword},!Br&&!i.value&&X&&S.tokenRefresh&&op(X,S.tokenRefresh)},L=(S,z,X)=>{var ie,pe,F,Z,Q;z&&gn(z),r.value={token:z,refreshToken:X,...S,funcionario:{...S.funcionario,funcionarioId:((ie=S.funcionario)==null?void 0:ie.id)??0,estado:0,latitud:void 0,longitud:void 0,divisiones:void 0,organizaciones:void 0,fechaIngresoInstitucion:"",aniosAntiguedad:0,idFirma:void 0,sinControlAsistencia:0,conInamovilidad:0,usuarioId:S.id??0,division:((pe=S.funcionario)==null?void 0:pe.divisionNombre)??"",cargo:(F=S.funcionario)==null?void 0:F.cargoNombre,cargoId:0,divisionId:0,oficinaId:0,municipio:"",municipioId:0,entidad:((Z=S.funcionario)==null?void 0:Z.entidadNombre)??"",entidadId:0,institucionId:0,institucion:((Q=S.funcionario)==null?void 0:Q.institucionNombre)??"",departamento:"",departamentoId:0},user:(()=>{var me,De,et,lt,gt,zt,Kt,H,ce,Ae,ne,Ee,R,Ie,tt,Le,ke,be,Xn;let W,ee,O,K,q="";S.usuarioMediosVerificados&&S.usuarioMediosVerificados.length>0&&S.usuarioMediosVerificados.forEach(jt=>{jt.medio===1?(W=1,jt.default&&(q="whatsapp")):jt.medio===2?(ee=1,jt.default&&(q="telegram")):jt.medio===3?(O=1,jt.default&&(q="email")):jt.medio===5&&(K=1,jt.default&&(q="sms"))});let U;return(me=S.perfilPersona)!=null&&me.nacimiento&&(typeof S.perfilPersona.nacimiento=="string"?U=S.perfilPersona.nacimiento:S.perfilPersona.nacimiento instanceof Date?U=S.perfilPersona.nacimiento.toISOString():U=(et=(De=S.perfilPersona.nacimiento)==null?void 0:De.toISOString)==null?void 0:et.call(De)),{id:S.id??0,ci:((lt=S.perfilPersona)==null?void 0:lt.ci)??"",nombre:((gt=S.perfilPersona)==null?void 0:gt.nombre)??"",paterno:((zt=S.perfilPersona)==null?void 0:zt.paterno)??"",profesion:((Kt=S.perfilPersona)==null?void 0:Kt.profesion)??"",materno:((H=S.perfilPersona)==null?void 0:H.materno)??"",perfilPersonaId:((ce=S.perfilPersona)==null?void 0:ce.id)??0,personaId:((Ae=S.perfilPersona)==null?void 0:Ae.id)??0,msPersonaId:((ne=S.perfilPersona)==null?void 0:ne.msPersonaId)??0,nacimiento:U??"",sexo:((Ee=S.perfilPersona)==null?void 0:Ee.sexo)??"",direccion:((R=S.perfilPersona)==null?void 0:R.direccion)??"",fotoUrl:`${p.value}/personas/fotosegip/${S.perfilPersona.msFileFoto}?rand=${Math.random()*100}`,celular:((Ie=S.perfilPersona)==null?void 0:Ie.celular)??0,email:((tt=S.perfilPersona)==null?void 0:tt.email)??"",nacionalidad:((ke=(Le=S.perfilPersona)==null?void 0:Le.pais)==null?void 0:ke.nombre)??"",foto:((be=S.perfilPersona)==null?void 0:be.msFileFoto)??"",fotoRuta:"",whatsapp:W,telegram:ee,sms:K,emailValidado:O,dobleAutenticacion:S.dobleAutenticacion??0,notificacionDefault:q,nombreCompleto:S.nombreCompleto??"",ciudadanoDigital:((Xn=S.perfilPersona)==null?void 0:Xn.esCiudadanoDigital)===1}})(),isNvAuth:!0,isAuth:!0,apps:S.apps,roles:S.roles,permisos:S.permisos,fechaCambioPassword:S.fechaCambioPassword??"",diasVidaPassword:S.diasVidaPassword,forzarCambioPassword:S.forzarCambioPassword,forzarActivar2FA:S.forzarActivar2FA,cambiarPassword:S.cambiarPassword}},re=()=>Qp(),G=S=>{if(!(S.type!=="tokens-updated"||!S.token&&!S.refreshToken)){Br=!0;try{S.token&&gn(S.token),r.value={...r.value,...S.token?{token:S.token}:{},...S.refreshToken?{refreshToken:S.refreshToken}:{},isAuth:!0}}finally{Br=!1}}},_=()=>{_d||typeof window>"u"||i.value||(_d=!0,ku(),so(),Cu(S=>{if(!i.value){if(S.type==="session-cleared"){Br=!0;try{J({fromTabSync:!0})}finally{Br=!1}return}G(S)}}))},J=S=>{Wp(),Jp(),r.value={token:void 0,refreshToken:void 0,user:void 0,funcionario:void 0,isAuth:!1,apps:[],roles:[],permisos:[],fechaCambioPassword:void 0,diasVidaPassword:void 0,forzarCambioPassword:!1,cambiarPassword:!1},a.value=null,!(S!=null&&S.fromTabSync)&&!Br&&!i.value&&ip()},ae=S=>{var z;r.value={...r.value,user:{...r.value.user,...S,fotoUrl:S!=null&&S.fotoRuta?`${p.value}/personas/fotosegip/${S==null?void 0:S.fotoRuta}?rand=${Math.random()*100}`:(z=r.value.user)==null?void 0:z.fotoUrl}}},ge=()=>{r.value={...r.value,forzarActivar2FA:!1}},ve=()=>{J()},le=async({usuario:S,value:z,days:X=7})=>{const ie=k(S);ie&&ws({name:ie,value:z,days:X,domain:zp()})};return{id:t,currentPage:e,binnacleId:a,apiBaseURL:o,isRegister:s,apiBaseURLAuthNv:i,apiWebSocketURL:l,webSocketToken:d,deviceId:c,aplicacion:u,enableChangePassword:b,enableForceChangePwd:y,userState:r,tgBot:A,systemVer:g,verificarFunc:m,onAutorizarQrNv:D,goLoginPage:v,goRegistrarPage:w,goRecuperarCont:E,onLogin:C,on2AuthLogin:T,on2AuthLoginNv:x,onConfirmarPushLoginNv:B,onConfirmarPushLogin:V,onLoginCiudadania:async S=>{try{if(a.value=S.binnacleId,i.value){const z=S.accessToken;z&&(gn(z),r.value={...r.value,token:z});const X=await $t();L(X,S.accessToken,S.tokenRefresh)}else P(S)}catch(z){console.error(z)}},setConfigs:({newBaseURL:S,newBaseURLAuthNv:z,newIsRegister:X,newWebSocketUrl:ie,newWebSocketToken:pe,newAplicacion:F,newRrhhUrl:Z,verificarSiFuncionario:Q,telegramBot:W,systemVersion:ee,enableChangePasswordMsg:O,enableForceChangePassword:K})=>{o.value=S,u.value=F,s.value=X||!1,l.value=ie||"",d.value=pe||"",i.value=z||"",c.value=re(),p.value=Z,m.value=Q||!1,A.value=W,g.value=ee||"0.0.1",b.value=!!O,y.value=!!K,_()},setDispositivoConfianzaCookie:le,clearUserData:J,updateUserData:ae,disable2FAStore:ge,onRefreshToken:async()=>{if(!i.value)return jp(async()=>{var ie,pe,F,Z;const S=((ie=r.value.token)==null?void 0:ie.trim())??"",z=((pe=r.value.refreshToken)==null?void 0:pe.trim())??"";if(!z)throw new bs;const X=await up();if(!X.acquired){if(await Eu(S,z,15e3,()=>({token:r.value.token,refreshToken:r.value.refreshToken})))return;throw new Cs}try{const Q=((F=r.value.token)==null?void 0:F.trim())??"",W=((Z=r.value.refreshToken)==null?void 0:Z.trim())??"";if(!W)throw new bs;const O=(await F3({token:Q,tokenRefresh:W})).response,K=(O==null?void 0:O.accessToken)||(O==null?void 0:O.token),q=O==null?void 0:O.tokenRefresh;if(!K||!q)throw new Cs;P(O)}finally{lp(X.owner)}})},initializeTokensFromStorage:()=>{if(ku(),_(),i.value){const z=ks();z&&(r.value={...r.value,token:z,isAuth:!0});return}const S=Gp(r.value.refreshToken);if(S.shouldClear){J();return}S.isAuth&&(r.value={...r.value,token:S.accessToken??r.value.token,refreshToken:S.refreshToken??r.value.refreshToken,isAuth:!0})},on2AuthNuevoServicioLogin:$,logoutStore:ve,resolveDeviceIdFromCookie:f}});function Rd(t,e={}){let r=!1,a=[];const o=()=>{a.forEach(i=>i()),a=[]};t.interceptors.response.use(i=>i,async i=>{var A;const s=Me();if(s.apiBaseURLAuthNv)return Promise.reject(i);const l=()=>({token:s.userState.token,refreshToken:s.userState.refreshToken}),c=hu(i);if(!c||!mu(i)||c._retry||gu(c))return Promise.reject(i);c._retry=!0;const u=s.userState.token,d=s.userState.refreshToken;if(await Eu(u,d,500,l),s.userState.token&&s.userState.token!==u)return io(c,s.userState.token),t(c);if(!r){r=!0;try{return await s.onRefreshToken(),o(),io(c,s.userState.token),t(c)}catch(p){a=[];const m=s.userState.token;return u!==void 0&&m!==void 0&&u!==m||(A=e.onRefreshFailed)==null||A.call(e,p),Promise.reject(p)}finally{r=!1}}return new Promise((p,m)=>{a.push(()=>{s.userState.token?(io(c,s.userState.token),p(t(c))):m(i)})})})}let Ld=!1;function U3(){Ld||(Ld=!0,Rd(se),se.interceptors.response.use(t=>t.data.error?Promise.reject({error:!0,message:t.data.message,response:t.data.response||{},status:t.data.status||500}):t.data,t=>{var o,i;if(t&&typeof t=="object"&&t.error===!0&&"status"in t)return Promise.reject(t);const e=(o=t.response)==null?void 0:o.data,r=((i=t.response)==null?void 0:i.status)??500,a=typeof(e==null?void 0:e.message)=="string"&&e.message||t.message||"Ha ocurrido un error";return Promise.reject({error:!0,message:a,response:e??t.response??{},status:r})}))}function Sr(t,e){return t-e*Math.floor(t/e)}const Fd=1721426;function tr(t,e,r,a){e=ba(t,e);let o=e-1,i=-2;return r<=2?i=0:wn(e)&&(i=-1),Fd-1+365*o+Math.floor(o/4)-Math.floor(o/100)+Math.floor(o/400)+Math.floor((367*r-362)/12+i+a)}function wn(t){return t%4===0&&(t%100!==0||t%400===0)}function ba(t,e){return t==="BC"?1-e:e}function Bo(t){let e="AD";return t<=0&&(e="BC",t=1-t),[e,t]}const Z3={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Pt{fromJulianDay(e){let r=e,a=r-Fd,o=Math.floor(a/146097),i=Sr(a,146097),s=Math.floor(i/36524),l=Sr(i,36524),c=Math.floor(l/1461),u=Sr(l,1461),d=Math.floor(u/365),A=o*400+s*100+c*4+d+(s!==4&&d!==4?1:0),[p,m]=Bo(A),g=r-tr(p,m,1,1),b=2;r<tr(p,m,3,1)?b=0:wn(m)&&(b=1);let y=Math.floor(((g+b)*12+373)/367),k=r-tr(p,m,y,1)+1;return new ze(p,m,y,k)}toJulianDay(e){return tr(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Z3[wn(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return wn(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return e.era==="BC"}balanceDate(e){e.year<=0&&(e.era=e.era==="BC"?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}const H3={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Tr(t,e){return e=ut(e,t.calendar),t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Q3(t,e){return e=ut(e,t.calendar),t=ka(t),e=ka(e),t.era===e.era&&t.year===e.year&&t.month===e.month}function Ca(t,e){return t.calendar.identifier===e.calendar.identifier&&t.era===e.era&&t.year===e.year&&t.month===e.month&&t.day===e.day}function Ud(t,e){return t=ka(t),e=ka(e),t.calendar.identifier===e.calendar.identifier&&t.era===e.era&&t.year===e.year&&t.month===e.month}function q3(t,e){return Tr(t,Hd(e))}function Zd(t,e){let r=t.calendar.toJulianDay(t),a=Math.ceil(r+1-J3(e))%7;return a<0&&(a+=7),a}function z3(t){return an(Date.now(),t)}function Hd(t){return W3(z3(t))}function Qd(t,e){return t.calendar.toJulianDay(t)-e.calendar.toJulianDay(e)}function K3(t,e){return qd(t)-qd(e)}function qd(t){return t.hour*36e5+t.minute*6e4+t.second*1e3+t.millisecond}let Qs=null;function Ea(){return Qs==null&&(Qs=new Intl.DateTimeFormat().resolvedOptions().timeZone),Qs}function ka(t){return t.subtract({days:t.day-1})}function zd(t){return t.add({days:t.calendar.getDaysInMonth(t)-t.day})}const Kd=new Map;function j3(t){if(Intl.Locale){let r=Kd.get(t);return r||(r=new Intl.Locale(t).maximize().region,r&&Kd.set(t,r)),r}let e=t.split("-")[1];return e==="u"?void 0:e}function J3(t){let e=j3(t);return e&&H3[e]||0}function Dr(t){t=ut(t,new Pt);let e=ba(t.era,t.year);return jd(e,t.month,t.day,t.hour,t.minute,t.second,t.millisecond)}function jd(t,e,r,a,o,i,s){let l=new Date;return l.setUTCHours(a,o,i,s),l.setUTCFullYear(t,e-1,r),l.getTime()}function qs(t,e){if(e==="UTC")return 0;if(t>0&&e===Ea())return new Date(t).getTimezoneOffset()*-6e4;let{year:r,month:a,day:o,hour:i,minute:s,second:l}=$d(t,e);return jd(r,a,o,i,s,l,0)-Math.floor(t/1e3)*1e3}const Jd=new Map;function $d(t,e){let r=Jd.get(e);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Jd.set(e,r));let a=r.formatToParts(new Date(t)),o={};for(let i of a)i.type!=="literal"&&(o[i.type]=i.value);return{year:o.era==="BC"||o.era==="B"?-o.year+1:+o.year,month:+o.month,day:+o.day,hour:o.hour==="24"?0:+o.hour,minute:+o.minute,second:+o.second}}const Xd=864e5;function $3(t,e,r,a){return(r===a?[r]:[r,a]).filter(i=>X3(t,e,i))}function X3(t,e,r){let a=$d(r,e);return t.year===a.year&&t.month===a.month&&t.day===a.day&&t.hour===a.hour&&t.minute===a.minute&&t.second===a.second}function rn(t,e,r="compatible"){let a=Or(t);if(e==="UTC")return Dr(a);if(e===Ea()&&r==="compatible"){a=ut(a,new Pt);let c=new Date,u=ba(a.era,a.year);return c.setFullYear(u,a.month-1,a.day),c.setHours(a.hour,a.minute,a.second,a.millisecond),c.getTime()}let o=Dr(a),i=qs(o-Xd,e),s=qs(o+Xd,e),l=$3(a,e,o-i,o-s);if(l.length===1)return l[0];if(l.length>1)switch(r){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(o-i,o-s);case"compatible":case"later":return Math.max(o-i,o-s);case"reject":throw new RangeError("No such absolute time found")}}function Wd(t,e,r="compatible"){return new Date(rn(t,e,r))}function an(t,e){let r=qs(t,e),a=new Date(t+r),o=a.getUTCFullYear(),i=a.getUTCMonth()+1,s=a.getUTCDate(),l=a.getUTCHours(),c=a.getUTCMinutes(),u=a.getUTCSeconds(),d=a.getUTCMilliseconds();return new Ir(o,i,s,e,r,l,c,u,d)}function W3(t){return new ze(t.calendar,t.era,t.year,t.month,t.day)}function Or(t,e){let r=0,a=0,o=0,i=0;if("timeZone"in t)({hour:r,minute:a,second:o,millisecond:i}=t);else if("hour"in t&&!e)return t;return e&&({hour:r,minute:a,second:o,millisecond:i}=e),new Vr(t.calendar,t.era,t.year,t.month,t.day,r,a,o,i)}function ut(t,e){if(t.calendar.identifier===e.identifier)return t;let r=e.fromJulianDay(t.calendar.toJulianDay(t)),a=t.copy();return a.calendar=e,a.era=r.era,a.year=r.year,a.month=r.month,a.day=r.day,nr(a),a}function Y3(t,e,r){if(t instanceof Ir)return t.timeZone===e?t:N3(t,e);let a=rn(t,e,r);return an(a,e)}function G3(t){let e=Dr(t)-t.offset;return new Date(e)}function N3(t,e){let r=Dr(t)-t.offset;return ut(an(r,e),t.calendar)}const xa=36e5;function So(t,e){let r=t.copy(),a="hour"in r?rh(r,e):0;zs(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,t),r.month+=e.months||0,Ks(r),Yd(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=a,eh(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let o=r.calendar.getYearsInEra(r);if(r.year>o){var i,s;let c=(i=(s=r.calendar).isInverseEra)===null||i===void 0?void 0:i.call(s,r);r.year=o,r.month=c?1:r.calendar.getMonthsInYear(r),r.day=c?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function zs(t,e){var r,a;!((r=(a=t.calendar).isInverseEra)===null||r===void 0)&&r.call(a,t)&&(e=-e),t.year+=e}function Ks(t){for(;t.month<1;)zs(t,-1),t.month+=t.calendar.getMonthsInYear(t);let e=0;for(;t.month>(e=t.calendar.getMonthsInYear(t));)t.month-=e,zs(t,1)}function eh(t){for(;t.day<1;)t.month--,Ks(t),t.day+=t.calendar.getDaysInMonth(t);for(;t.day>t.calendar.getDaysInMonth(t);)t.day-=t.calendar.getDaysInMonth(t),t.month++,Ks(t)}function Yd(t){t.month=Math.max(1,Math.min(t.calendar.getMonthsInYear(t),t.month)),t.day=Math.max(1,Math.min(t.calendar.getDaysInMonth(t),t.day))}function nr(t){t.calendar.constrainDate&&t.calendar.constrainDate(t),t.year=Math.max(1,Math.min(t.calendar.getYearsInEra(t),t.year)),Yd(t)}function Gd(t){let e={};for(let r in t)typeof t[r]=="number"&&(e[r]=-t[r]);return e}function Nd(t,e){return So(t,Gd(e))}function js(t,e){let r=t.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),nr(r),r}function To(t,e){let r=t.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),nh(r),r}function th(t){t.second+=Math.floor(t.millisecond/1e3),t.millisecond=Do(t.millisecond,1e3),t.minute+=Math.floor(t.second/60),t.second=Do(t.second,60),t.hour+=Math.floor(t.minute/60),t.minute=Do(t.minute,60);let e=Math.floor(t.hour/24);return t.hour=Do(t.hour,24),e}function nh(t){t.millisecond=Math.max(0,Math.min(t.millisecond,1e3)),t.second=Math.max(0,Math.min(t.second,59)),t.minute=Math.max(0,Math.min(t.minute,59)),t.hour=Math.max(0,Math.min(t.hour,23))}function Do(t,e){let r=t%e;return r<0&&(r+=e),r}function rh(t,e){return t.hour+=e.hours||0,t.minute+=e.minutes||0,t.second+=e.seconds||0,t.millisecond+=e.milliseconds||0,th(t)}function Js(t,e,r,a){let o=t.copy();switch(e){case"era":{let l=t.calendar.getEras(),c=l.indexOf(t.era);if(c<0)throw new Error("Invalid era: "+t.era);c=on(c,r,0,l.length-1,a==null?void 0:a.round),o.era=l[c],nr(o);break}case"year":var i,s;!((i=(s=o.calendar).isInverseEra)===null||i===void 0)&&i.call(s,o)&&(r=-r),o.year=on(t.year,r,-1/0,9999,a==null?void 0:a.round),o.year===-1/0&&(o.year=1),o.calendar.balanceYearMonth&&o.calendar.balanceYearMonth(o,t);break;case"month":o.month=on(t.month,r,1,t.calendar.getMonthsInYear(t),a==null?void 0:a.round);break;case"day":o.day=on(t.day,r,1,t.calendar.getDaysInMonth(t),a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return t.calendar.balanceDate&&t.calendar.balanceDate(o),nr(o),o}function e1(t,e,r,a){let o=t.copy();switch(e){case"hour":{let i=t.hour,s=0,l=23;if((a==null?void 0:a.hourCycle)===12){let c=i>=12;s=c?12:0,l=c?23:11}o.hour=on(i,r,s,l,a==null?void 0:a.round);break}case"minute":o.minute=on(t.minute,r,0,59,a==null?void 0:a.round);break;case"second":o.second=on(t.second,r,0,59,a==null?void 0:a.round);break;case"millisecond":o.millisecond=on(t.millisecond,r,0,999,a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return o}function on(t,e,r,a,o=!1){if(o){t+=Math.sign(e),t<r&&(t=a);let i=Math.abs(e);e>0?t=Math.ceil(t/i)*i:t=Math.floor(t/i)*i,t>a&&(t=r)}else t+=e,t<r?t=a-(r-t-1):t>a&&(t=r+(t-a-1));return t}function t1(t,e){let r;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let o=So(Or(t),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});r=rn(o,t.timeZone)}else r=Dr(t)-t.offset;r+=e.milliseconds||0,r+=(e.seconds||0)*1e3,r+=(e.minutes||0)*6e4,r+=(e.hours||0)*36e5;let a=an(r,t.timeZone);return ut(a,t.calendar)}function ah(t,e){return t1(t,Gd(e))}function oh(t,e,r,a){switch(e){case"hour":{let o=0,i=23;if((a==null?void 0:a.hourCycle)===12){let g=t.hour>=12;o=g?12:0,i=g?23:11}let s=Or(t),l=ut(To(s,{hour:o}),new Pt),c=[rn(l,t.timeZone,"earlier"),rn(l,t.timeZone,"later")].filter(g=>an(g,t.timeZone).day===l.day)[0],u=ut(To(s,{hour:i}),new Pt),d=[rn(u,t.timeZone,"earlier"),rn(u,t.timeZone,"later")].filter(g=>an(g,t.timeZone).day===u.day).pop(),A=Dr(t)-t.offset,p=Math.floor(A/xa),m=A%xa;return A=on(p,r,Math.floor(c/xa),Math.floor(d/xa),a==null?void 0:a.round)*xa+m,ut(an(A,t.timeZone),t.calendar)}case"minute":case"second":case"millisecond":return e1(t,e,r,a);case"era":case"year":case"month":case"day":{let o=Js(Or(t),e,r,a),i=rn(o,t.timeZone);return ut(an(i,t.timeZone),t.calendar)}default:throw new Error("Unsupported field "+e)}}function ih(t,e,r){let a=Or(t),o=To(js(a,e),e);if(o.compare(a)===0)return t;let i=rn(o,t.timeZone,r);return ut(an(i,t.timeZone),t.calendar)}function sh(t){return`${String(t.hour).padStart(2,"0")}:${String(t.minute).padStart(2,"0")}:${String(t.second).padStart(2,"0")}${t.millisecond?String(t.millisecond/1e3).slice(1):""}`}function n1(t){let e=ut(t,new Pt);return`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function r1(t){return`${n1(t)}T${sh(t)}`}function lh(t){let e=Math.sign(t)<0?"-":"+";t=Math.abs(t);let r=Math.floor(t/36e5),a=t%36e5/6e4;return`${e}${String(r).padStart(2,"0")}:${String(a).padStart(2,"0")}`}function ch(t){return`${r1(t)}${lh(t.offset)}[${t.timeZone}]`}function uh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $s(t,e,r){uh(t,e),e.set(t,r)}function Xs(t){let e=typeof t[0]=="object"?t.shift():new Pt,r;if(typeof t[0]=="string")r=t.shift();else{let s=e.getEras();r=s[s.length-1]}let a=t.shift(),o=t.shift(),i=t.shift();return[e,r,a,o,i]}var dh=new WeakMap;class ze{copy(){return this.era?new ze(this.calendar,this.era,this.year,this.month,this.day):new ze(this.calendar,this.year,this.month,this.day)}add(e){return So(this,e)}subtract(e){return Nd(this,e)}set(e){return js(this,e)}cycle(e,r,a){return Js(this,e,r,a)}toDate(e){return Wd(this,e)}toString(){return n1(this)}compare(e){return Qd(this,e)}constructor(...e){$s(this,dh,{writable:!0,value:void 0});let[r,a,o,i,s]=Xs(e);this.calendar=r,this.era=a,this.year=o,this.month=i,this.day=s,nr(this)}}var Ah=new WeakMap;class Vr{copy(){return this.era?new Vr(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Vr(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return So(this,e)}subtract(e){return Nd(this,e)}set(e){return js(To(this,e),e)}cycle(e,r,a){switch(e){case"era":case"year":case"month":case"day":return Js(this,e,r,a);default:return e1(this,e,r,a)}}toDate(e,r){return Wd(this,e,r)}toString(){return r1(this)}compare(e){let r=Qd(this,e);return r===0?K3(this,Or(e)):r}constructor(...e){$s(this,Ah,{writable:!0,value:void 0});let[r,a,o,i,s]=Xs(e);this.calendar=r,this.era=a,this.year=o,this.month=i,this.day=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,nr(this)}}var fh=new WeakMap;class Ir{copy(){return this.era?new Ir(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ir(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return t1(this,e)}subtract(e){return ah(this,e)}set(e,r){return ih(this,e,r)}cycle(e,r,a){return oh(this,e,r,a)}toDate(){return G3(this)}toString(){return ch(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Y3(e,this.timeZone).toDate().getTime()}constructor(...e){$s(this,fh,{writable:!0,value:void 0});let[r,a,o,i,s]=Xs(e),l=e.shift(),c=e.shift();this.calendar=r,this.era=a,this.year=o,this.month=i,this.day=s,this.timeZone=l,this.offset=c,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,nr(this)}}const Mr=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],ph=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],Oo=[1867,1911,1925,1988,2018],bn=["meiji","taisho","showa","heisei","reiwa"];function a1(t){const e=Mr.findIndex(([r,a,o])=>t.year<r||t.year===r&&t.month<a||t.year===r&&t.month===a&&t.day<o);return e===-1?Mr.length-1:e===0?0:e-1}function Ws(t){let e=Oo[bn.indexOf(t.era)];if(!e)throw new Error("Unknown era: "+t.era);return new ze(t.year+e,t.month,t.day)}class mh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=a1(r);return new ze(this,bn[a],r.year-Oo[a],r.month,r.day)}toJulianDay(e){return super.toJulianDay(Ws(e))}balanceDate(e){let r=Ws(e),a=a1(r);bn[a]!==e.era&&(e.era=bn[a],e.year=r.year-Oo[a]),this.constrainDate(e)}constrainDate(e){let r=bn.indexOf(e.era),a=ph[r];if(a!=null){let[o,i,s]=a,l=o-Oo[r];e.year=Math.max(1,Math.min(l,e.year)),e.year===l&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(s,e.day)))}if(e.year===1&&r>=0){let[,o,i]=Mr[r];e.month=Math.max(o,e.month),e.month===o&&(e.day=Math.max(i,e.day))}}getEras(){return bn}getYearsInEra(e){let r=bn.indexOf(e.era),a=Mr[r],o=Mr[r+1];if(o==null)return 9999-a[0]+1;let i=o[0]-a[0];return(e.month<o[1]||e.month===o[1]&&e.day<o[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(Ws(e))}getMinimumMonthInYear(e){let r=o1(e);return r?r[1]:1}getMinimumDayInMonth(e){let r=o1(e);return r&&e.month===r[1]?r[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function o1(t){if(t.year===1){let e=bn.indexOf(t.era);return Mr[e]}}const i1=-543;class hh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=ba(r.era,r.year);return new ze(this,a-i1,r.month,r.day)}toJulianDay(e){return super.toJulianDay(s1(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(s1(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function s1(t){let[e,r]=Bo(t.year+i1);return new ze(e,r,t.month,t.day)}const Vo=1911;function l1(t){return t.era==="minguo"?t.year+Vo:1-t.year+Vo}function c1(t){let e=t-Vo;return e>0?["minguo",e]:["before_minguo",1-e]}class gh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=ba(r.era,r.year),[o,i]=c1(a);return new ze(this,o,i,r.month,r.day)}toJulianDay(e){return super.toJulianDay(u1(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[r,a]=c1(l1(e));e.era=r,e.year=a}isInverseEra(e){return e.era==="before_minguo"}getDaysInMonth(e){return super.getDaysInMonth(u1(e))}getYearsInEra(e){return e.era==="before_minguo"?9999:9999-Vo}constructor(...e){super(...e),this.identifier="roc"}}function u1(t){let[e,r]=Bo(l1(t));return new ze(e,r,t.month,t.day)}const d1=1948320,A1=[0,31,62,93,124,155,186,216,246,276,306,336];class vh{fromJulianDay(e){let r=e-d1,a=1+Math.floor((33*r+3)/12053),o=365*(a-1)+Math.floor((8*a+21)/33),i=r-o,s=i<216?Math.floor(i/31):Math.floor((i-6)/30),l=i-A1[s]+1;return new ze(this,a,s+1,l)}toJulianDay(e){let r=d1-1+365*(e.year-1)+Math.floor((8*e.year+21)/33);return r+=A1[e.month-1],r+=e.day,r}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||Sr(25*e.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Ys=78,f1=80;class yh extends Pt{fromJulianDay(e){let r=super.fromJulianDay(e),a=r.year-Ys,o=e-tr(r.era,r.year,1,1),i;o<f1?(a--,i=wn(r.year-1)?31:30,o+=i+155+90+10):(i=wn(r.year)?31:30,o-=f1);let s,l;if(o<i)s=1,l=o+1;else{let c=o-i;c<155?(s=Math.floor(c/31)+2,l=c%31+1):(c-=155,s=Math.floor(c/30)+7,l=c%30+1)}return new ze(this,a,s,l)}toJulianDay(e){let r=e.year+Ys,[a,o]=Bo(r),i,s;return wn(o)?(i=31,s=tr(a,o,3,21)):(i=30,s=tr(a,o,3,22)),e.month===1?s+e.day-1:(s+=i+Math.min(e.month-2,5)*31,e.month>=8&&(s+=(e.month-7)*30),s+=e.day-1,s)}getDaysInMonth(e){return e.month===1&&wn(e.year+Ys)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}const Io=1948440,p1=1948439,kt=1300,Pr=1600,wh=460322;function Mo(t,e,r,a){return a+Math.ceil(29.5*(r-1))+(e-1)*354+Math.floor((3+11*e)/30)+t-1}function m1(t,e,r){let a=Math.floor((30*(r-e)+10646)/10631),o=Math.min(12,Math.ceil((r-(29+Mo(e,a,1,1)))/29.5)+1),i=r-Mo(e,a,o,1)+1;return new ze(t,a,o,i)}function h1(t){return(14+11*t)%30<11}class Gs{fromJulianDay(e){return m1(this,Io,e)}toJulianDay(e){return Mo(Io,e.year,e.month,e.day)}getDaysInMonth(e){let r=29+e.month%2;return e.month===12&&h1(e.year)&&r++,r}getMonthsInYear(){return 12}getDaysInYear(e){return h1(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class bh extends Gs{fromJulianDay(e){return m1(this,p1,e)}toJulianDay(e){return Mo(p1,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}const Ch="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Ns,_r;function Po(t){return wh+_r[t-kt]}function Ba(t,e){let r=t-kt,a=1<<11-(e-1);return Ns[r]&a?30:29}function g1(t,e){let r=Po(t);for(let a=1;a<e;a++)r+=Ba(t,a);return r}function v1(t){return _r[t+1-kt]-_r[t-kt]}class Eh extends Gs{fromJulianDay(e){let r=e-Io,a=Po(kt),o=Po(Pr);if(r<a||r>o)return super.fromJulianDay(e);{let i=kt-1,s=1,l=1;for(;l>0;){i++,l=r-Po(i)+1;let c=v1(i);if(l===c){s=12;break}else if(l<c){let u=Ba(i,s);for(s=1;l>u;)l-=u,s++,u=Ba(i,s);break}}return new ze(this,i,s,r-g1(i,s)+1)}}toJulianDay(e){return e.year<kt||e.year>Pr?super.toJulianDay(e):Io+g1(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<kt||e.year>Pr?super.getDaysInMonth(e):Ba(e.year,e.month)}getDaysInYear(e){return e.year<kt||e.year>Pr?super.getDaysInYear(e):v1(e.year)}constructor(){if(super(),this.identifier="islamic-umalqura",Ns||(Ns=new Uint16Array(Uint8Array.from(atob(Ch),e=>e.charCodeAt(0)).buffer)),!_r){_r=new Uint32Array(Pr-kt+1);let e=0;for(let r=kt;r<=Pr;r++){_r[r-kt]=e;for(let a=1;a<=12;a++)e+=Ba(r,a)}}}}const y1=347997,w1=1080,b1=24*w1,kh=29,xh=12*w1+793,Bh=kh*b1+xh;function rr(t){return Sr(t*7+1,19)<7}function _o(t){let e=Math.floor((235*t-234)/19),r=12084+13753*e,a=e*29+Math.floor(r/25920);return Sr(3*(a+1),7)<3&&(a+=1),a}function Sh(t){let e=_o(t-1),r=_o(t);return _o(t+1)-r===356?2:r-e===382?1:0}function Sa(t){return _o(t)+Sh(t)}function C1(t){return Sa(t+1)-Sa(t)}function Th(t){let e=C1(t);switch(e>380&&(e-=30),e){case 353:return 0;case 354:return 1;case 355:return 2}}function Ro(t,e){if(e>=6&&!rr(t)&&e++,e===4||e===7||e===9||e===11||e===13)return 29;let r=Th(t);return e===2?r===2?30:29:e===3?r===0?29:30:e===6?rr(t)?30:0:30}class Dh{fromJulianDay(e){let r=e-y1,a=r*b1/Bh,o=Math.floor((19*a+234)/235)+1,i=Sa(o),s=Math.floor(r-i);for(;s<1;)o--,i=Sa(o),s=Math.floor(r-i);let l=1,c=0;for(;c<s;)c+=Ro(o,l),l++;l--,c-=Ro(o,l);let u=s-c;return new ze(this,o,l,u)}toJulianDay(e){let r=Sa(e.year);for(let a=1;a<e.month;a++)r+=Ro(e.year,a);return r+e.day+y1}getDaysInMonth(e){return Ro(e.year,e.month)}getMonthsInYear(e){return rr(e.year)?13:12}getDaysInYear(e){return C1(e.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,r){r.year!==e.year&&(rr(r.year)&&!rr(e.year)&&r.month>6?e.month--:!rr(r.year)&&rr(e.year)&&r.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}const el=1723856,E1=1824665,tl=5500;function Lo(t,e,r,a){return t+365*e+Math.floor(e/4)+30*(r-1)+a-1}function nl(t,e){let r=Math.floor(4*(e-t)/1461),a=1+Math.floor((e-Lo(t,r,1,1))/30),o=e+1-Lo(t,r,a,1);return[r,a,o]}function k1(t){return Math.floor(t%4/3)}function x1(t,e){return e%13!==0?30:k1(t)+5}class rl{fromJulianDay(e){let[r,a,o]=nl(el,e),i="AM";return r<=0&&(i="AA",r+=tl),new ze(this,i,r,a,o)}toJulianDay(e){let r=e.year;return e.era==="AA"&&(r-=tl),Lo(el,r,e.month,e.day)}getDaysInMonth(e){return x1(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+k1(e.year)}getYearsInEra(e){return e.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class Oh extends rl{fromJulianDay(e){let[r,a,o]=nl(el,e);return r+=tl,new ze(this,"AA",r,a,o)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class Vh extends rl{fromJulianDay(e){let[r,a,o]=nl(E1,e),i="CE";return r<=0&&(i="BCE",r=1-r),new ze(this,i,r,a,o)}toJulianDay(e){let r=e.year;return e.era==="BCE"&&(r=1-r),Lo(E1,r,e.month,e.day)}getDaysInMonth(e){let r=e.year;return e.era==="BCE"&&(r=1-r),x1(r,e.month)}isInverseEra(e){return e.era==="BCE"}balanceDate(e){e.year<=0&&(e.era=e.era==="BCE"?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return e.era==="BCE"?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}function Ih(t){switch(t){case"buddhist":return new hh;case"ethiopic":return new rl;case"ethioaa":return new Oh;case"coptic":return new Vh;case"hebrew":return new Dh;case"indian":return new yh;case"islamic-civil":return new Gs;case"islamic-tbla":return new bh;case"islamic-umalqura":return new Eh;case"japanese":return new mh;case"persian":return new vh;case"roc":return new gh;case"gregory":default:return new Pt}}let al=new Map;class sn{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,r);if(r<e)throw new RangeError("End date must be >= start date");return`${this.formatter.format(e)} – ${this.formatter.format(r)}`}formatRangeToParts(e,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,r);if(r<e)throw new RangeError("End date must be >= start date");let a=this.formatter.formatToParts(e),o=this.formatter.formatToParts(r);return[...a.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...o.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return _h()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Rh(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,r={}){this.formatter=B1(e,r),this.options=r}}const Mh={true:{ja:"h11"},false:{}};function B1(t,e={}){if(typeof e.hour12=="boolean"&&Ph()){e={...e};let o=Mh[String(e.hour12)][t.split("-")[0]],i=e.hour12?"h12":"h23";e.hourCycle=o??i,delete e.hour12}let r=t+(e?Object.entries(e).sort((o,i)=>o[0]<i[0]?-1:1).join():"");if(al.has(r))return al.get(r);let a=new Intl.DateTimeFormat(t,e);return al.set(r,a),a}let ol=null;function Ph(){return ol==null&&(ol=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),ol}let il=null;function _h(){return il==null&&(il=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),il}function Rh(t,e){if(!e.timeStyle&&!e.hour)return;t=t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),t+=(t.includes("-u-")?"":"-u")+"-nu-latn";let r=B1(t,{...e,timeZone:void 0}),a=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),o=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(a===0&&o===23)return"h23";if(a===24&&o===23)return"h24";if(a===0&&o===11)return"h11";if(a===12&&o===11)return"h12";throw new Error("Unexpected hour cycle result")}function Lh(t,e){const r=[];for(let a=0;a<t.length;a+=e)r.push(t.slice(a,a+e));return r}function xt(t,e=Ea()){return Fo(t)?t.toDate():t.toDate(e)}function Fh(t){return t instanceof Vr}function Fo(t){return t instanceof Ir}function sl(t){return Fh(t)||Fo(t)}function Xt(t){if(t instanceof Date){const e=t.getFullYear(),r=t.getMonth()+1;return new Date(e,r,0).getDate()}else return t.set({day:100}).day}function Rr(t,e){return t.compare(e)<0}function Uo(t,e){return t.compare(e)>0}function Uh(t,e,r){const a=Zd(t,r);return e>a?t.subtract({days:a+7-e}):e===a?t:t.subtract({days:a-e})}function Zh(t,e,r){const a=Zd(t,r),o=e===0?6:e-1;return a===o?t:a>o?t.add({days:7-a+o}):t.add({days:o-a})}function S1(t,e){const r=[];let a=t.add({days:1});const o=e;for(;a.compare(o)<0;)r.push(a),a=a.add({days:1});return r}function ll(t){const{dateObj:e,weekStartsOn:r,fixedWeeks:a,locale:o}=t,i=Xt(e),s=Array.from({length:i},(y,k)=>e.set({day:k+1})),l=ka(e),c=zd(e),u=Uh(l,r,o),d=Zh(c,r,o),A=S1(u.subtract({days:1}),l),p=S1(c,d.add({days:1})),m=A.length+s.length+p.length;if(a&&m<42){const y=42-m;let k=p[p.length-1];k||(k=zd(e));const h=Array.from({length:y},(f,v)=>{const w=v+1;return k.add({days:w})});p.push(...h)}const g=A.concat(s,p),b=Lh(g,7);return{value:e,cells:g,rows:b}}function ar(t){const{numberOfMonths:e,dateObj:r,...a}=t,o=[];if(!e||e===1)return o.push(ll({...a,dateObj:r})),o;o.push(ll({...a,dateObj:r}));for(let i=1;i<e;i++){const s=r.add({months:i});o.push(ll({...a,dateObj:s}))}return o}const Hh=["top","right","bottom","left"],Wt=Math.min,yt=Math.max,Zo=Math.round,Ho=Math.floor,Cn=t=>({x:t,y:t}),Qh={left:"right",right:"left",bottom:"top",top:"bottom"},qh={start:"end",end:"start"};function cl(t,e,r){return yt(t,Wt(e,r))}function ln(t,e){return typeof t=="function"?t(e):t}function cn(t){return t.split("-")[0]}function Lr(t){return t.split("-")[1]}function ul(t){return t==="x"?"y":"x"}function dl(t){return t==="y"?"height":"width"}function En(t){return["top","bottom"].includes(cn(t))?"y":"x"}function Al(t){return ul(En(t))}function zh(t,e,r){r===void 0&&(r=!1);const a=Lr(t),o=Al(t),i=dl(o);let s=o==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=Qo(s)),[s,Qo(s)]}function Kh(t){const e=Qo(t);return[fl(t),e,fl(e)]}function fl(t){return t.replace(/start|end/g,e=>qh[e])}function jh(t,e,r){const a=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return r?e?o:a:e?a:o;case"left":case"right":return e?i:s;default:return[]}}function Jh(t,e,r,a){const o=Lr(t);let i=jh(cn(t),r==="start",a);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(fl)))),i}function Qo(t){return t.replace(/left|right|bottom|top/g,e=>Qh[e])}function $h(t){return{top:0,right:0,bottom:0,left:0,...t}}function T1(t){return typeof t!="number"?$h(t):{top:t,right:t,bottom:t,left:t}}function qo(t){const{x:e,y:r,width:a,height:o}=t;return{width:a,height:o,top:r,left:e,right:e+a,bottom:r+o,x:e,y:r}}function D1(t,e,r){let{reference:a,floating:o}=t;const i=En(e),s=Al(e),l=dl(s),c=cn(e),u=i==="y",d=a.x+a.width/2-o.width/2,A=a.y+a.height/2-o.height/2,p=a[l]/2-o[l]/2;let m;switch(c){case"top":m={x:d,y:a.y-o.height};break;case"bottom":m={x:d,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:A};break;case"left":m={x:a.x-o.width,y:A};break;default:m={x:a.x,y:a.y}}switch(Lr(e)){case"start":m[s]-=p*(r&&u?-1:1);break;case"end":m[s]+=p*(r&&u?-1:1);break}return m}const Xh=async(t,e,r)=>{const{placement:a="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:A}=D1(u,a,c),p=a,m={},g=0;for(let b=0;b<l.length;b++){const{name:y,fn:k}=l[b],{x:h,y:f,data:v,reset:w}=await k({x:d,y:A,initialPlacement:a,placement:p,strategy:o,middlewareData:m,rects:u,platform:s,elements:{reference:t,floating:e}});d=h??d,A=f??A,m={...m,[y]:{...m[y],...v}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(u=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:d,y:A}=D1(u,p,c)),b=-1)}return{x:d,y:A,placement:p,strategy:o,middlewareData:m}};async function Ta(t,e){var r;e===void 0&&(e={});const{x:a,y:o,platform:i,rects:s,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:A="floating",altBoundary:p=!1,padding:m=0}=ln(e,t),g=T1(m),y=l[p?A==="floating"?"reference":"floating":A],k=qo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),h=A==="floating"?{x:a,y:o,width:s.floating.width,height:s.floating.height}:s.reference,f=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),v=await(i.isElement==null?void 0:i.isElement(f))?await(i.getScale==null?void 0:i.getScale(f))||{x:1,y:1}:{x:1,y:1},w=qo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:f,strategy:c}):h);return{top:(k.top-w.top+g.top)/v.y,bottom:(w.bottom-k.bottom+g.bottom)/v.y,left:(k.left-w.left+g.left)/v.x,right:(w.right-k.right+g.right)/v.x}}const Wh=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:a,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=e,{element:u,padding:d=0}=ln(t,e)||{};if(u==null)return{};const A=T1(d),p={x:r,y:a},m=Al(o),g=dl(m),b=await s.getDimensions(u),y=m==="y",k=y?"top":"left",h=y?"bottom":"right",f=y?"clientHeight":"clientWidth",v=i.reference[g]+i.reference[m]-p[m]-i.floating[g],w=p[m]-i.reference[m],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let C=E?E[f]:0;(!C||!await(s.isElement==null?void 0:s.isElement(E)))&&(C=l.floating[f]||i.floating[g]);const D=v/2-w/2,T=C/2-b[g]/2-1,x=Wt(A[k],T),B=Wt(A[h],T),V=x,$=C-b[g]-B,P=C/2-b[g]/2+D,L=cl(V,P,$),re=!c.arrow&&Lr(o)!=null&&P!==L&&i.reference[g]/2-(P<V?x:B)-b[g]/2<0,G=re?P<V?P-V:P-$:0;return{[m]:p[m]+G,data:{[m]:L,centerOffset:P-L-G,...re&&{alignmentOffset:G}},reset:re}}}),Yh=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,a;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=e,{mainAxis:d=!0,crossAxis:A=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...y}=ln(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const k=cn(o),h=En(l),f=cn(l)===l,v=await(c.isRTL==null?void 0:c.isRTL(u.floating)),w=p||(f||!b?[Qo(l)]:Kh(l)),E=g!=="none";!p&&E&&w.push(...Jh(l,b,g,v));const C=[l,...w],D=await Ta(e,y),T=[];let x=((a=i.flip)==null?void 0:a.overflows)||[];if(d&&T.push(D[k]),A){const P=zh(o,s,v);T.push(D[P[0]],D[P[1]])}if(x=[...x,{placement:o,overflows:T}],!T.every(P=>P<=0)){var B,V;const P=(((B=i.flip)==null?void 0:B.index)||0)+1,L=C[P];if(L)return{data:{index:P,overflows:x},reset:{placement:L}};let re=(V=x.filter(G=>G.overflows[0]<=0).sort((G,_)=>G.overflows[1]-_.overflows[1])[0])==null?void 0:V.placement;if(!re)switch(m){case"bestFit":{var $;const G=($=x.filter(_=>{if(E){const J=En(_.placement);return J===h||J==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(J=>J>0).reduce((J,ae)=>J+ae,0)]).sort((_,J)=>_[1]-J[1])[0])==null?void 0:$[0];G&&(re=G);break}case"initialPlacement":re=l;break}if(o!==re)return{reset:{placement:re}}}return{}}}};function O1(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function V1(t){return Hh.some(e=>t[e]>=0)}const Gh=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:a="referenceHidden",...o}=ln(t,e);switch(a){case"referenceHidden":{const i=await Ta(e,{...o,elementContext:"reference"}),s=O1(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:V1(s)}}}case"escaped":{const i=await Ta(e,{...o,altBoundary:!0}),s=O1(i,r.floating);return{data:{escapedOffsets:s,escaped:V1(s)}}}default:return{}}}}};async function Nh(t,e){const{placement:r,platform:a,elements:o}=t,i=await(a.isRTL==null?void 0:a.isRTL(o.floating)),s=cn(r),l=Lr(r),c=En(r)==="y",u=["left","top"].includes(s)?-1:1,d=i&&c?-1:1,A=ln(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...A};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const e5=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,a;const{x:o,y:i,placement:s,middlewareData:l}=e,c=await Nh(e,t);return s===((r=l.offset)==null?void 0:r.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},t5=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:a,placement:o}=e,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:k,y:h}=y;return{x:k,y:h}}},...c}=ln(t,e),u={x:r,y:a},d=await Ta(e,c),A=En(cn(o)),p=ul(A);let m=u[p],g=u[A];if(i){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",h=m+d[y],f=m-d[k];m=cl(h,m,f)}if(s){const y=A==="y"?"top":"left",k=A==="y"?"bottom":"right",h=g+d[y],f=g-d[k];g=cl(h,g,f)}const b=l.fn({...e,[p]:m,[A]:g});return{...b,data:{x:b.x-r,y:b.y-a}}}}},n5=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:a,placement:o,rects:i,middlewareData:s}=e,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=ln(t,e),d={x:r,y:a},A=En(o),p=ul(A);let m=d[p],g=d[A];const b=ln(l,e),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const f=p==="y"?"height":"width",v=i.reference[p]-i.floating[f]+y.mainAxis,w=i.reference[p]+i.reference[f]-y.mainAxis;m<v?m=v:m>w&&(m=w)}if(u){var k,h;const f=p==="y"?"width":"height",v=["top","left"].includes(cn(o)),w=i.reference[A]-i.floating[f]+(v&&((k=s.offset)==null?void 0:k[A])||0)+(v?0:y.crossAxis),E=i.reference[A]+i.reference[f]+(v?0:((h=s.offset)==null?void 0:h[A])||0)-(v?y.crossAxis:0);g<w?g=w:g>E&&(g=E)}return{[p]:m,[A]:g}}}},r5=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:a,platform:o,elements:i}=e,{apply:s=()=>{},...l}=ln(t,e),c=await Ta(e,l),u=cn(r),d=Lr(r),A=En(r)==="y",{width:p,height:m}=a.floating;let g,b;u==="top"||u==="bottom"?(g=u,b=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(b=u,g=d==="end"?"top":"bottom");const y=m-c.top-c.bottom,k=p-c.left-c.right,h=Wt(m-c[g],y),f=Wt(p-c[b],k),v=!e.middlewareData.shift;let w=h,E=f;if(A?E=d||v?Wt(f,k):k:w=d||v?Wt(h,y):y,v&&!d){const D=yt(c.left,0),T=yt(c.right,0),x=yt(c.top,0),B=yt(c.bottom,0);A?E=p-2*(D!==0||T!==0?D+T:yt(c.left,c.right)):w=m-2*(x!==0||B!==0?x+B:yt(c.top,c.bottom))}await s({...e,availableWidth:E,availableHeight:w});const C=await o.getDimensions(i.floating);return p!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}};function or(t){return pl(t)?(t.nodeName||"").toLowerCase():"#document"}function wt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function un(t){var e;return(e=(pl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pl(t){return t instanceof Node||t instanceof wt(t).Node}function _t(t){return t instanceof Element||t instanceof wt(t).Element}function Yt(t){return t instanceof HTMLElement||t instanceof wt(t).HTMLElement}function I1(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof wt(t).ShadowRoot}function Da(t){const{overflow:e,overflowX:r,overflowY:a,display:o}=Rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+r)&&!["inline","contents"].includes(o)}function a5(t){return["table","td","th"].includes(or(t))}function zo(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ml(t){const e=hl(),r=_t(t)?Rt(t):t;return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(a=>(r.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(r.contain||"").includes(a))}function o5(t){let e=kn(t);for(;Yt(e)&&!Fr(e);){if(ml(e))return e;if(zo(e))return null;e=kn(e)}return null}function hl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Fr(t){return["html","body","#document"].includes(or(t))}function Rt(t){return wt(t).getComputedStyle(t)}function Ko(t){return _t(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kn(t){if(or(t)==="html")return t;const e=t.assignedSlot||t.parentNode||I1(t)&&t.host||un(t);return I1(e)?e.host:e}function M1(t){const e=kn(t);return Fr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Yt(e)&&Da(e)?e:M1(e)}function Oa(t,e,r){var a;e===void 0&&(e=[]),r===void 0&&(r=!0);const o=M1(t),i=o===((a=t.ownerDocument)==null?void 0:a.body),s=wt(o);if(i){const l=gl(s);return e.concat(s,s.visualViewport||[],Da(o)?o:[],l&&r?Oa(l):[])}return e.concat(o,Oa(o,[],r))}function gl(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function P1(t){const e=Rt(t);let r=parseFloat(e.width)||0,a=parseFloat(e.height)||0;const o=Yt(t),i=o?t.offsetWidth:r,s=o?t.offsetHeight:a,l=Zo(r)!==i||Zo(a)!==s;return l&&(r=i,a=s),{width:r,height:a,$:l}}function vl(t){return _t(t)?t:t.contextElement}function Ur(t){const e=vl(t);if(!Yt(e))return Cn(1);const r=e.getBoundingClientRect(),{width:a,height:o,$:i}=P1(e);let s=(i?Zo(r.width):r.width)/a,l=(i?Zo(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const i5=Cn(0);function _1(t){const e=wt(t);return!hl()||!e.visualViewport?i5:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function s5(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==wt(t)?!1:e}function ir(t,e,r,a){e===void 0&&(e=!1),r===void 0&&(r=!1);const o=t.getBoundingClientRect(),i=vl(t);let s=Cn(1);e&&(a?_t(a)&&(s=Ur(a)):s=Ur(t));const l=s5(i,r,a)?_1(i):Cn(0);let c=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,A=o.height/s.y;if(i){const p=wt(i),m=a&&_t(a)?wt(a):a;let g=p,b=gl(g);for(;b&&a&&m!==g;){const y=Ur(b),k=b.getBoundingClientRect(),h=Rt(b),f=k.left+(b.clientLeft+parseFloat(h.paddingLeft))*y.x,v=k.top+(b.clientTop+parseFloat(h.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,A*=y.y,c+=f,u+=v,g=wt(b),b=gl(g)}}return qo({width:d,height:A,x:c,y:u})}function l5(t){let{elements:e,rect:r,offsetParent:a,strategy:o}=t;const i=o==="fixed",s=un(a),l=e?zo(e.floating):!1;if(a===s||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Cn(1);const d=Cn(0),A=Yt(a);if((A||!A&&!i)&&((or(a)!=="body"||Da(s))&&(c=Ko(a)),Yt(a))){const p=ir(a);u=Ur(a),d.x=p.x+a.clientLeft,d.y=p.y+a.clientTop}return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x,y:r.y*u.y-c.scrollTop*u.y+d.y}}function c5(t){return Array.from(t.getClientRects())}function R1(t){return ir(un(t)).left+Ko(t).scrollLeft}function u5(t){const e=un(t),r=Ko(t),a=t.ownerDocument.body,o=yt(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),i=yt(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let s=-r.scrollLeft+R1(t);const l=-r.scrollTop;return Rt(a).direction==="rtl"&&(s+=yt(e.clientWidth,a.clientWidth)-o),{width:o,height:i,x:s,y:l}}function d5(t,e){const r=wt(t),a=un(t),o=r.visualViewport;let i=a.clientWidth,s=a.clientHeight,l=0,c=0;if(o){i=o.width,s=o.height;const u=hl();(!u||u&&e==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:l,y:c}}function A5(t,e){const r=ir(t,!0,e==="fixed"),a=r.top+t.clientTop,o=r.left+t.clientLeft,i=Yt(t)?Ur(t):Cn(1),s=t.clientWidth*i.x,l=t.clientHeight*i.y,c=o*i.x,u=a*i.y;return{width:s,height:l,x:c,y:u}}function L1(t,e,r){let a;if(e==="viewport")a=d5(t,r);else if(e==="document")a=u5(un(t));else if(_t(e))a=A5(e,r);else{const o=_1(t);a={...e,x:e.x-o.x,y:e.y-o.y}}return qo(a)}function F1(t,e){const r=kn(t);return r===e||!_t(r)||Fr(r)?!1:Rt(r).position==="fixed"||F1(r,e)}function f5(t,e){const r=e.get(t);if(r)return r;let a=Oa(t,[],!1).filter(l=>_t(l)&&or(l)!=="body"),o=null;const i=Rt(t).position==="fixed";let s=i?kn(t):t;for(;_t(s)&&!Fr(s);){const l=Rt(s),c=ml(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Da(s)&&!c&&F1(t,s))?a=a.filter(d=>d!==s):o=l,s=kn(s)}return e.set(t,a),a}function p5(t){let{element:e,boundary:r,rootBoundary:a,strategy:o}=t;const s=[...r==="clippingAncestors"?zo(e)?[]:f5(e,this._c):[].concat(r),a],l=s[0],c=s.reduce((u,d)=>{const A=L1(e,d,o);return u.top=yt(A.top,u.top),u.right=Wt(A.right,u.right),u.bottom=Wt(A.bottom,u.bottom),u.left=yt(A.left,u.left),u},L1(e,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function m5(t){const{width:e,height:r}=P1(t);return{width:e,height:r}}function h5(t,e,r){const a=Yt(e),o=un(e),i=r==="fixed",s=ir(t,!0,i,e);let l={scrollLeft:0,scrollTop:0};const c=Cn(0);if(a||!a&&!i)if((or(e)!=="body"||Da(o))&&(l=Ko(e)),a){const A=ir(e,!0,i,e);c.x=A.x+e.clientLeft,c.y=A.y+e.clientTop}else o&&(c.x=R1(o));const u=s.left+l.scrollLeft-c.x,d=s.top+l.scrollTop-c.y;return{x:u,y:d,width:s.width,height:s.height}}function yl(t){return Rt(t).position==="static"}function U1(t,e){return!Yt(t)||Rt(t).position==="fixed"?null:e?e(t):t.offsetParent}function Z1(t,e){const r=wt(t);if(zo(t))return r;if(!Yt(t)){let o=kn(t);for(;o&&!Fr(o);){if(_t(o)&&!yl(o))return o;o=kn(o)}return r}let a=U1(t,e);for(;a&&a5(a)&&yl(a);)a=U1(a,e);return a&&Fr(a)&&yl(a)&&!ml(a)?r:a||o5(t)||r}const g5=async function(t){const e=this.getOffsetParent||Z1,r=this.getDimensions,a=await r(t.floating);return{reference:h5(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function v5(t){return Rt(t).direction==="rtl"}const y5={convertOffsetParentRelativeRectToViewportRelativeRect:l5,getDocumentElement:un,getClippingRect:p5,getOffsetParent:Z1,getElementRects:g5,getClientRects:c5,getDimensions:m5,getScale:Ur,isElement:_t,isRTL:v5};function w5(t,e){let r=null,a;const o=un(t);function i(){var l;clearTimeout(a),(l=r)==null||l.disconnect(),r=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:A,height:p}=t.getBoundingClientRect();if(l||e(),!A||!p)return;const m=Ho(d),g=Ho(o.clientWidth-(u+A)),b=Ho(o.clientHeight-(d+p)),y=Ho(u),h={rootMargin:-m+"px "+-g+"px "+-b+"px "+-y+"px",threshold:yt(0,Wt(1,c))||1};let f=!0;function v(w){const E=w[0].intersectionRatio;if(E!==c){if(!f)return s();E?s(!1,E):a=setTimeout(()=>{s(!1,1e-7)},1e3)}f=!1}try{r=new IntersectionObserver(v,{...h,root:o.ownerDocument})}catch{r=new IntersectionObserver(v,h)}r.observe(t)}return s(!0),i}function b5(t,e,r,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,u=vl(t),d=o||i?[...u?Oa(u):[],...Oa(e)]:[];d.forEach(k=>{o&&k.addEventListener("scroll",r,{passive:!0}),i&&k.addEventListener("resize",r)});const A=u&&l?w5(u,r):null;let p=-1,m=null;s&&(m=new ResizeObserver(k=>{let[h]=k;h&&h.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var f;(f=m)==null||f.observe(e)})),r()}),u&&!c&&m.observe(u),m.observe(e));let g,b=c?ir(t):null;c&&y();function y(){const k=ir(t);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&r(),b=k,g=requestAnimationFrame(y)}return r(),()=>{var k;d.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),A==null||A(),(k=m)==null||k.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const C5=e5,E5=t5,H1=Yh,k5=r5,x5=Gh,B5=Wh,S5=n5,T5=(t,e,r)=>{const a=new Map,o={platform:y5,...r},i={...o.platform,_c:a};return Xh(t,e,{...o,platform:i})};function D5(t){return t!=null&&typeof t=="object"&&"$el"in t}function wl(t){if(D5(t)){const e=t.$el;return pl(e)&&or(e)==="#comment"?null:e}return t}function Zr(t){return typeof t=="function"?t():n.unref(t)}function O5(t){return{name:"arrow",options:t,fn(e){const r=wl(Zr(t.element));return r==null?{}:B5({element:r,padding:t.padding}).fn(e)}}}function Q1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function q1(t,e){const r=Q1(t);return Math.round(e*r)/r}function V5(t,e,r){r===void 0&&(r={});const a=r.whileElementsMounted,o=n.computed(()=>{var C;return(C=Zr(r.open))!=null?C:!0}),i=n.computed(()=>Zr(r.middleware)),s=n.computed(()=>{var C;return(C=Zr(r.placement))!=null?C:"bottom"}),l=n.computed(()=>{var C;return(C=Zr(r.strategy))!=null?C:"absolute"}),c=n.computed(()=>{var C;return(C=Zr(r.transform))!=null?C:!0}),u=n.computed(()=>wl(t.value)),d=n.computed(()=>wl(e.value)),A=n.ref(0),p=n.ref(0),m=n.ref(l.value),g=n.ref(s.value),b=n.shallowRef({}),y=n.ref(!1),k=n.computed(()=>{const C={position:m.value,left:"0",top:"0"};if(!d.value)return C;const D=q1(d.value,A.value),T=q1(d.value,p.value);return c.value?{...C,transform:"translate("+D+"px, "+T+"px)",...Q1(d.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:D+"px",top:T+"px"}});let h;function f(){u.value==null||d.value==null||T5(u.value,d.value,{middleware:i.value,placement:s.value,strategy:l.value}).then(C=>{A.value=C.x,p.value=C.y,m.value=C.strategy,g.value=C.placement,b.value=C.middlewareData,y.value=!0})}function v(){typeof h=="function"&&(h(),h=void 0)}function w(){if(v(),a===void 0){f();return}if(u.value!=null&&d.value!=null){h=a(u.value,d.value,f);return}}function E(){o.value||(y.value=!1)}return n.watch([i,s,l],f,{flush:"sync"}),n.watch([u,d],w,{flush:"sync"}),n.watch(o,E,{flush:"sync"}),n.getCurrentScope()&&n.onScopeDispose(v),{x:n.shallowReadonly(A),y:n.shallowReadonly(p),strategy:n.shallowReadonly(m),placement:n.shallowReadonly(g),middlewareData:n.shallowReadonly(b),isPositioned:n.shallowReadonly(y),floatingStyles:k,update:f}}function He(t,e){const r=typeof t=="string"&&!e?`${t}Context`:e,a=Symbol(r);return[o=>{const i=n.inject(a,o);if(i||i===null)return i;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(n.provide(a,o),o)]}function z1(t,e,r){const a=r.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),a.dispatchEvent(o)}function K1(t){return t==null}function bl(t){const{defaultValue:e,defaultPlaceholder:r,granularity:a="day",locale:o="en"}=t;if(Array.isArray(e)&&e.length)return e.at(-1).copy();if(e&&!Array.isArray(e))return e.copy();if(r)return r.copy();const i=new Date,s=i.getFullYear(),l=i.getMonth()+1,c=i.getDate(),u=["hour","minute","second"],d=new sn(o),A=Ih(d.resolvedOptions().calendar);return u.includes(a??"day")?ut(new Vr(s,l,c,0,0,0),A):ut(new ze(s,l,c),A)}const I5=["ach","af","am","an","ar","ast","az","be","bg","bn","br","bs","ca","cak","ckb","cs","cy","da","de","dsb","el","en","eo","es","et","eu","fa","ff","fi","fr","fy","ga","gd","gl","he","hr","hsb","hu","ia","id","it","ja","ka","kk","kn","ko","lb","lo","lt","lv","meh","ml","ms","nl","nn","no","oc","pl","pt","rm","ro","ru","sc","scn","sk","sl","sr","sv","szl","tg","th","tr","uk","zh-CN","zh-TW"],M5=["year","month","day"],Cl={ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}};function P5(t){if(j1(t))return Cl[t];{const e=F5(t);return j1(e)?Cl[e]:Cl.en}}function El(t,e,r){return _5(t)?P5(r)[t]:L5(t)?e:R5(t)?"––":""}function j1(t){return I5.includes(t)}function _5(t){return M5.includes(t)}function R5(t){return t==="hour"||t==="minute"||t==="second"}function L5(t){return t==="era"||t==="dayPeriod"}function F5(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const kl=["day","month","year"],J1=["hour","minute","second","dayPeriod"],$1=[...kl,...J1];function U5(t){return kl.includes(t)}function X1(t){return $1.includes(t)}function Z5(t,e){const r={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short",hourCycle:e===24?"h24":void 0,hour12:e===24?!1:void 0};return t==="day"&&(delete r.second,delete r.hour,delete r.minute,delete r.timeZoneName),t==="hour"&&(delete r.minute,delete r.second),t==="minute"&&delete r.second,r}function H5(t){const e=t.querySelector("[data-selected]");if(e)return e.focus();const r=t.querySelector("[data-today]");if(r)return r.focus();const a=t.querySelector("[data-radix-vue-calendar-day]");if(a)return a.focus()}function Q5(t,e){var r;const a=n.shallowRef();return n.watchEffect(()=>{a.value=t()},{...e,flush:(r=void 0)!=null?r:"sync"}),n.readonly(a)}function Va(t){return n.getCurrentScope()?(n.onScopeDispose(t),!0):!1}function q5(){const t=new Set,e=r=>{t.delete(r)};return{on:r=>{t.add(r);const a=()=>e(r);return Va(a),{off:a}},off:e,trigger:(...r)=>Promise.all(Array.from(t).map(a=>a(...r)))}}function z5(t){let e=!1,r;const a=n.effectScope(!0);return(...o)=>(e||(r=a.run(()=>t(...o)),e=!0),r)}function W1(t){let e=0,r,a;const o=()=>{e-=1,a&&e<=0&&(a.stop(),r=void 0,a=void 0)};return(...i)=>(e+=1,r||(a=n.effectScope(!0),r=a.run(()=>t(...i))),Va(o),r)}function xn(t){return typeof t=="function"?t():n.unref(t)}const dn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K5=t=>typeof t<"u",j5=Object.prototype.toString,J5=t=>j5.call(t)==="[object Object]",$5=()=>{},Y1=X5();function X5(){var t,e;return dn&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function W5(t){return n.getCurrentInstance()}function G1(t,e=1e4){return n.customRef((r,a)=>{let o=xn(t),i;const s=()=>setTimeout(()=>{o=xn(t),a()},xn(e));return Va(()=>{clearTimeout(i)}),{get(){return r(),o},set(l){o=l,a(),clearTimeout(i),i=s()}}})}function Y5(t,e){W5()&&n.onBeforeUnmount(t,e)}function N1(t,e,r={}){const{immediate:a=!0}=r,o=n.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function l(){o.value=!1,s()}function c(...u){s(),o.value=!0,i=setTimeout(()=>{o.value=!1,i=null,t(...u)},xn(e))}return a&&(o.value=!0,dn&&c()),Va(l),{isPending:n.readonly(o),start:c,stop:l}}function Bn(t){var e;const r=xn(t);return(e=r==null?void 0:r.$el)!=null?e:r}const xl=dn?window:void 0;function Sn(...t){let e,r,a,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,a,o]=t,e=xl):[e,r,a,o]=t,!e)return $5;Array.isArray(r)||(r=[r]),Array.isArray(a)||(a=[a]);const i=[],s=()=>{i.forEach(d=>d()),i.length=0},l=(d,A,p,m)=>(d.addEventListener(A,p,m),()=>d.removeEventListener(A,p,m)),c=n.watch(()=>[Bn(e),xn(o)],([d,A])=>{if(s(),!d)return;const p=J5(A)?{...A}:A;i.push(...r.flatMap(m=>a.map(g=>l(d,m,g,p))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return Va(u),u}function G5(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function N5(...t){let e,r,a={};t.length===3?(e=t[0],r=t[1],a=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],a=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:o=xl,eventName:i="keydown",passive:s=!1,dedupe:l=!1}=a,c=G5(e);return Sn(o,i,u=>{u.repeat&&xn(l)||c(u)&&r(u)},s)}function e4(){const t=n.ref(!1),e=n.getCurrentInstance();return e&&n.onMounted(()=>{t.value=!0},e),t}function t4(t){return JSON.parse(JSON.stringify(t))}function We(t,e,r,a={}){var o,i,s;const{clone:l=!1,passive:c=!1,eventName:u,deep:d=!1,defaultValue:A,shouldEmit:p}=a,m=n.getCurrentInstance(),g=r||(m==null?void 0:m.emit)||((o=m==null?void 0:m.$emit)==null?void 0:o.bind(m))||((s=(i=m==null?void 0:m.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(m==null?void 0:m.proxy));let b=u;e||(e="modelValue"),b=b||`update:${e.toString()}`;const y=f=>l?typeof l=="function"?l(f):t4(f):f,k=()=>K5(t[e])?y(t[e]):A,h=f=>{p?p(f)&&g(b,f):g(b,f)};if(c){const f=k(),v=n.ref(f);let w=!1;return n.watch(()=>t[e],E=>{w||(w=!0,v.value=y(E),n.nextTick(()=>w=!1))}),n.watch(v,E=>{!w&&(E!==t[e]||d)&&h(E)},{deep:d}),v}else return n.computed({get(){return k()},set(f){h(f)}})}function Bl(t){return t?t.flatMap(e=>e.type===n.Fragment?Bl(e.children):[e]):[]}function dt(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const n4=["INPUT","TEXTAREA"];function r4(t,e,r,a={}){if(!e||a.enableIgnoredElement&&n4.includes(e.nodeName))return null;const{arrowKeyOptions:o="both",attributeName:i="[data-radix-vue-collection-item]",itemsArray:s=[],loop:l=!0,dir:c="ltr",preventScroll:u=!0,focus:d=!1}=a,[A,p,m,g,b,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],k=m||g,h=A||p;if(!b&&!y&&(!k&&!h||o==="vertical"&&h||o==="horizontal"&&k))return null;const f=r?Array.from(r.querySelectorAll(i)):s;if(!f.length)return null;u&&t.preventDefault();let v=null;return h||k?v=eA(f,e,{goForward:k?g:c==="ltr"?A:p,loop:l}):b?v=f.at(0)||null:y&&(v=f.at(-1)||null),d&&(v==null||v.focus()),v}function eA(t,e,r,a=t.length){if(--a===0)return null;const o=t.indexOf(e),i=r.goForward?o+1:o-1;if(!r.loop&&(i<0||i>=t.length))return null;const s=(i+t.length)%t.length,l=t[s];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?eA(t,l,r,a):l:null}function Sl(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function Tl(t,e,r=".",a){if(!Sl(e))return Tl(t,{},r);const o=Object.assign({},e);for(const i in t){if(i==="__proto__"||i==="constructor")continue;const s=t[i];s!=null&&(Array.isArray(s)&&Array.isArray(o[i])?o[i]=[...s,...o[i]]:Sl(s)&&Sl(o[i])?o[i]=Tl(s,o[i],(r?`${r}.`:"")+i.toString()):o[i]=s)}return o}function a4(t){return(...e)=>e.reduce((r,a)=>Tl(r,a,""),{})}const o4=a4(),[Dl,aO]=He("ConfigProvider");let i4="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",s4=(t=21)=>{let e="",r=t;for(;r--;)e+=i4[Math.random()*64|0];return e};const l4=W1(()=>{const t=n.ref(new Map),e=n.ref(),r=n.computed(()=>{for(const s of t.value.values())if(s)return!0;return!1}),a=Dl({scrollBody:n.ref(!0)});let o=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",Y1&&(o==null||o()),e.value=void 0};return n.watch(r,(s,l)=>{var c;if(!dn)return;if(!s){l&&i();return}e.value===void 0&&(e.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,d={padding:u,margin:0},A=(c=a.scrollBody)!=null&&c.value?typeof a.scrollBody.value=="object"?o4({padding:a.scrollBody.value.padding===!0?u:a.scrollBody.value.padding,margin:a.scrollBody.value.margin===!0?u:a.scrollBody.value.margin},d):d:{padding:0,margin:0};u>0&&(document.body.style.paddingRight=typeof A.padding=="number"?`${A.padding}px`:String(A.padding),document.body.style.marginRight=typeof A.margin=="number"?`${A.margin}px`:String(A.margin),document.body.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),Y1&&(o=Sn(document,"touchmove",p=>c4(p),{passive:!1})),n.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Ol(t){const e=s4(6),r=l4();r.value.set(e,t??!1);const a=n.computed({get:()=>r.value.get(e)??!1,set:o=>r.value.set(e,o)});return Y5(()=>{r.value.delete(e)}),a}function tA(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const r=t.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:tA(r)}}function c4(t){const e=t||window.event,r=e.target;return r instanceof Element&&tA(r)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const u4="data-radix-vue-collection-item";function d4(t,e=u4){const r=Symbol();return{createCollection:a=>{const o=n.ref([]);function i(){const s=Bn(a);return s?o.value=Array.from(s.querySelectorAll(`[${e}]:not([data-disabled])`)):o.value=[]}return n.onBeforeUpdate(()=>{o.value=[]}),n.onMounted(i),n.onUpdated(i),n.watch(()=>a==null?void 0:a.value,i,{immediate:!0}),n.provide(r,o),o},injectCollection:()=>n.inject(r,n.ref([]))}}function nA(t){const e=n.ref(t);function r(){return e.value}function a(b){e.value=b}function o(b,y){return new sn(e.value,y).format(b)}function i(b,y=!0){return sl(b)&&y?o(xt(b),{dateStyle:"long",timeStyle:"long"}):o(xt(b),{dateStyle:"long"})}function s(b,y={}){return new sn(e.value,{month:"long",year:"numeric",...y}).format(b)}function l(b,y={}){return new sn(e.value,{month:"long",...y}).format(b)}function c(){const b=Hd(Ea());return[1,2,3,4,5,6,7,8,9,10,11,12].map(y=>({label:l(xt(b.set({month:y}))),value:y}))}function u(b,y={}){return new sn(e.value,{year:"numeric",...y}).format(b)}function d(b,y){return Fo(b)?new sn(e.value,{...y,timeZone:b.timeZone}).formatToParts(xt(b)):new sn(e.value,y).formatToParts(xt(b))}function A(b,y="narrow"){return new sn(e.value,{weekday:y}).format(b)}function p(b){var y;return((y=new sn(e.value,{hour:"numeric",minute:"numeric"}).formatToParts(b).find(k=>k.type==="dayPeriod"))==null?void 0:y.value)==="PM"?"PM":"AM"}const m={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function g(b,y,k={}){const h={...m,...k},f=d(b,h).find(v=>v.type===y);return f?f.value:""}return{setLocale:a,getLocale:r,fullMonth:l,fullYear:u,fullMonthAndYear:s,toParts:d,custom:o,part:g,dayPeriod:p,selectedDate:i,dayOfWeek:A,getMonths:c}}function sr(t){const e=Dl({dir:n.ref("ltr")});return n.computed(()=>{var r;return(t==null?void 0:t.value)||((r=e.dir)==null?void 0:r.value)||"ltr"})}function Ia(t){const e=n.getCurrentInstance(),r=e==null?void 0:e.type.emits,a={};return r!=null&&r.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),r==null||r.forEach(o=>{a[n.toHandlerKey(n.camelize(o))]=(...i)=>t(o,...i)}),a}let Vl=0;function rA(){n.watchEffect(t=>{if(!dn)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??aA()),document.body.insertAdjacentElement("beforeend",e[1]??aA()),Vl++,t(()=>{Vl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Vl--})})}function aA(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function Il(t){return n.computed(()=>{var e;return xn(t)?!!((e=Bn(t))!=null&&e.closest("form")):!0})}function Ml(t){const e=n.getCurrentInstance(),r=Object.keys((e==null?void 0:e.type.props)??{}).reduce((o,i)=>{const s=(e==null?void 0:e.type.props[i]).default;return s!==void 0&&(o[i]=s),o},{}),a=n.toRef(t);return n.computed(()=>{const o={},i=(e==null?void 0:e.vnode.props)??{};return Object.keys(i).forEach(s=>{o[n.camelize(s)]=i[s]}),Object.keys({...r,...o}).reduce((s,l)=>(a.value[l]!==void 0&&(s[l]=a.value[l]),s),{})})}function An(t,e){const r=Ml(t),a=e?Ia(e):{};return n.computed(()=>({...r.value,...a}))}function fe(){const t=n.getCurrentInstance(),e=n.ref(),r=n.computed(()=>{var s,l;return["#text","#comment"].includes((s=e.value)==null?void 0:s.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:Bn(e)}),a=Object.assign({},t.exposed),o={};for(const s in t.props)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>t.props[s]});if(Object.keys(a).length>0)for(const s in a)Object.defineProperty(o,s,{enumerable:!0,configurable:!0,get:()=>a[s]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=o;function i(s){e.value=s,s&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>s instanceof Element?s:s.$el}),t.exposed=o)}return{forwardRef:i,currentRef:e,currentElement:r}}function A4(t,e){const r=G1(!1,300),a=n.ref(null),o=q5();function i(){a.value=null,r.value=!1}function s(l,c){const u=l.currentTarget,d={x:l.clientX,y:l.clientY},A=f4(d,u.getBoundingClientRect()),p=p4(d,A),m=m4(c.getBoundingClientRect()),g=g4([...p,...m]);a.value=g,r.value=!0}return n.watchEffect(l=>{if(t.value&&e.value){const c=d=>s(d,e.value),u=d=>s(d,t.value);t.value.addEventListener("pointerleave",c),e.value.addEventListener("pointerleave",u),l(()=>{var d,A;(d=t.value)==null||d.removeEventListener("pointerleave",c),(A=e.value)==null||A.removeEventListener("pointerleave",u)})}}),n.watchEffect(l=>{var c;if(a.value){const u=d=>{var A,p;if(!a.value)return;const m=d.target,g={x:d.clientX,y:d.clientY},b=((A=t.value)==null?void 0:A.contains(m))||((p=e.value)==null?void 0:p.contains(m)),y=!h4(g,a.value),k=!!m.closest("[data-grace-area-trigger]");b?i():(y||k)&&(i(),o.trigger())};(c=t.value)==null||c.ownerDocument.addEventListener("pointermove",u),l(()=>{var d;return(d=t.value)==null?void 0:d.ownerDocument.removeEventListener("pointermove",u)})}}),{isPointerInTransit:r,onPointerExit:o.on}}function f4(t,e){const r=Math.abs(e.top-t.y),a=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,a,o,i)){case i:return"left";case o:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function p4(t,e,r=5){const a=[];switch(e){case"top":a.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":a.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":a.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":a.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return a}function m4(t){const{top:e,right:r,bottom:a,left:o}=t;return[{x:o,y:e},{x:r,y:e},{x:r,y:a},{x:o,y:a}]}function h4(t,e){const{x:r,y:a}=t;let o=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const l=e[i].x,c=e[i].y,u=e[s].x,d=e[s].y;c>a!=d>a&&r<(u-l)*(a-c)/(d-c)+l&&(o=!o)}return o}function g4(t){const e=t.slice();return e.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),v4(e)}function v4(t){if(t.length<=1)return t.slice();const e=[];for(let a=0;a<t.length;a++){const o=t[a];for(;e.length>=2;){const i=e[e.length-1],s=e[e.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))e.pop();else break}e.push(o)}e.pop();const r=[];for(let a=t.length-1;a>=0;a--){const o=t[a];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var y4=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Hr=new WeakMap,jo=new WeakMap,Jo={},Pl=0,oA=function(t){return t&&(t.host||oA(t.parentNode))},w4=function(t,e){return e.map(function(r){if(t.contains(r))return r;var a=oA(r);return a&&t.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},b4=function(t,e,r,a){var o=w4(e,Array.isArray(t)?t:[t]);Jo[r]||(Jo[r]=new WeakMap);var i=Jo[r],s=[],l=new Set,c=new Set(o),u=function(A){!A||l.has(A)||(l.add(A),u(A.parentNode))};o.forEach(u);var d=function(A){!A||c.has(A)||Array.prototype.forEach.call(A.children,function(p){if(l.has(p))d(p);else try{var m=p.getAttribute(a),g=m!==null&&m!=="false",b=(Hr.get(p)||0)+1,y=(i.get(p)||0)+1;Hr.set(p,b),i.set(p,y),s.push(p),b===1&&g&&jo.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(a,"true")}catch(k){console.error("aria-hidden: cannot operate on ",p,k)}})};return d(e),l.clear(),Pl++,function(){s.forEach(function(A){var p=Hr.get(A)-1,m=i.get(A)-1;Hr.set(A,p),i.set(A,m),p||(jo.has(A)||A.removeAttribute(a),jo.delete(A)),m||A.removeAttribute(r)}),Pl--,Pl||(Hr=new WeakMap,Hr=new WeakMap,jo=new WeakMap,Jo={})}},C4=function(t,e,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),o=y4(t);return o?(a.push.apply(a,Array.from(o.querySelectorAll("[aria-live]"))),b4(a,o,r,"aria-hidden")):function(){return null}};function _l(t){let e;n.watch(()=>Bn(t),r=>{r?e=C4(r):e&&e()}),n.onUnmounted(()=>{e&&e()})}let E4=0;function Tn(t,e="radix"){const r=Dl({useId:void 0});return pu.useId?`${e}-${pu.useId()}`:r.useId?`${e}-${r.useId()}`:`${e}-${++E4}`}function k4(t){const e=n.ref(),r=n.computed(()=>{var o;return((o=e.value)==null?void 0:o.width)??0}),a=n.computed(()=>{var o;return((o=e.value)==null?void 0:o.height)??0});return n.onMounted(()=>{const o=Bn(t);if(o){e.value={width:o.offsetWidth,height:o.offsetHeight};const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,u;if("borderBoxSize"in l){const d=l.borderBoxSize,A=Array.isArray(d)?d[0]:d;c=A.inlineSize,u=A.blockSize}else c=o.offsetWidth,u=o.offsetHeight;e.value={width:c,height:u}});return i.observe(o,{box:"border-box"}),()=>i.unobserve(o)}else e.value=void 0}),{width:r,height:a}}function x4(t,e){const r=n.ref(t);function a(o){return e[r.value][o]??r.value}return{state:r,dispatch:o=>{r.value=a(o)}}}const B4="data-item-text";function S4(t){const e=G1("",1e3);return{search:e,handleTypeaheadSearch:(r,a)=>{if(!(t!=null&&t.value)&&!a)return;e.value=e.value+r;const o=(t==null?void 0:t.value)??a,i=dt(),s=o.map(A=>{var p;return{ref:A,textValue:((p=(A.querySelector(`[${B4}]`)??A).textContent)==null?void 0:p.trim())??""}}),l=s.find(A=>A.ref===i),c=s.map(A=>A.textValue),u=D4(c,e.value,l==null?void 0:l.textValue),d=s.find(A=>A.textValue===u);return d&&d.ref.focus(),d==null?void 0:d.ref},resetTypeahead:()=>{e.value=""}}}function T4(t,e){return t.map((r,a)=>t[(e+a)%t.length])}function D4(t,e,r){const a=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,o=r?t.indexOf(r):-1;let i=T4(t,Math.max(o,0));a.length===1&&(i=i.filter(l=>l!==r));const s=i.find(l=>l.toLowerCase().startsWith(a.toLowerCase()));return s!==r?s:void 0}function Ma(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}const Rl=n.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:r}){return()=>{var a,o;if(!r.default)return null;const i=Bl(r.default()),s=i.findIndex(d=>d.type!==n.Comment);if(s===-1)return i;const l=i[s];(a=l.props)==null||delete a.ref;const c=l.props?n.mergeProps(e,l.props):e;e.class&&(o=l.props)!=null&&o.class&&delete l.props.class;const u=n.cloneVNode(l,c);for(const d in c)d.startsWith("on")&&(u.props||(u.props={}),u.props[d]=c[d]);return i.length===1?u:(i[s]=u,i)}}}),Ce=n.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:r}){const a=t.asChild?"template":t.as;return typeof a=="string"&&["area","img","input"].includes(a)?()=>n.h(a,e):a!=="template"?()=>n.h(t.as,e,{default:r.default}):()=>n.h(Rl,e,{default:r.default})}});function Pa(){const t=n.ref(),e=n.computed(()=>{var r,a;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(a=t.value)==null?void 0:a.$el.nextElementSibling:Bn(t)});return{primitiveElement:t,currentElement:e}}function O4(t,e){var r;const a=n.ref({}),o=n.ref("none"),i=n.ref(t),s=t.value?"mounted":"unmounted";let l;const c=((r=e.value)==null?void 0:r.ownerDocument.defaultView)??xl,{state:u,dispatch:d}=x4(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),A=y=>{var k;if(dn){const h=new CustomEvent(y,{bubbles:!1,cancelable:!1});(k=e.value)==null||k.dispatchEvent(h)}};n.watch(t,async(y,k)=>{var h;const f=k!==y;if(await n.nextTick(),f){const v=o.value,w=$o(e.value);y?(d("MOUNT"),A("enter"),w==="none"&&A("after-enter")):w==="none"||((h=a.value)==null?void 0:h.display)==="none"?(d("UNMOUNT"),A("leave"),A("after-leave")):k&&v!==w?(d("ANIMATION_OUT"),A("leave")):(d("UNMOUNT"),A("after-leave"))}},{immediate:!0});const p=y=>{const k=$o(e.value),h=k.includes(y.animationName),f=u.value==="mounted"?"enter":"leave";if(y.target===e.value&&h&&(A(`after-${f}`),d("ANIMATION_END"),!i.value)){const v=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=c==null?void 0:c.setTimeout(()=>{var w;((w=e.value)==null?void 0:w.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=v)})}y.target===e.value&&k==="none"&&d("ANIMATION_END")},m=y=>{y.target===e.value&&(o.value=$o(e.value))},g=n.watch(e,(y,k)=>{y?(a.value=getComputedStyle(y),y.addEventListener("animationstart",m),y.addEventListener("animationcancel",p),y.addEventListener("animationend",p)):(d("ANIMATION_END"),l!==void 0&&(c==null||c.clearTimeout(l)),k==null||k.removeEventListener("animationstart",m),k==null||k.removeEventListener("animationcancel",p),k==null||k.removeEventListener("animationend",p))},{immediate:!0}),b=n.watch(u,()=>{const y=$o(e.value);o.value=u.value==="mounted"?y:"none"});return n.onUnmounted(()=>{g(),b()}),{isPresent:n.computed(()=>["mounted","unmountSuspended"].includes(u.value))}}function $o(t){return t&&getComputedStyle(t).animationName||"none"}const lr=n.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:r}){var a;const{present:o,forceMount:i}=n.toRefs(t),s=n.ref(),{isPresent:l}=O4(o,s);r({present:l});let c=e.default({present:l});c=Bl(c||[]);const u=n.getCurrentInstance();if(c&&(c==null?void 0:c.length)>1){const d=(a=u==null?void 0:u.parent)!=null&&a.type.name?`<${u.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${d}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(A=>` - ${A}`).join(`
18
18
  `)].join(`
19
19
  `))}return()=>i.value||o.value||l.value?n.h(e.default({present:l})[0],{ref:d=>{const A=Bn(d);return typeof(A==null?void 0:A.hasAttribute)>"u"||(A!=null&&A.hasAttribute("data-radix-popper-content-wrapper")?s.value=A.firstElementChild:s.value=A),A}}):null}}),[fn,V4]=He("DialogRoot"),Xo=n.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const r=t,a=We(r,"open",e,{defaultValue:r.defaultOpen,passive:r.open===void 0}),o=n.ref(),i=n.ref(),{modal:s}=n.toRefs(r);return V4({open:a,modal:s,openModal:()=>{a.value=!0},onOpenChange:l=>{a.value=l},onOpenToggle:()=>{a.value=!a.value},contentId:"",titleId:"",descriptionId:"",triggerElement:o,contentElement:i}),(l,c)=>n.renderSlot(l.$slots,"default",{open:n.unref(a)})}}),Wo=n.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,r=fn(),{forwardRef:a,currentElement:o}=fe();return r.contentId||(r.contentId=Tn(void 0,"radix-vue-dialog-content")),n.onMounted(()=>{r.triggerElement.value=o.value}),(i,s)=>(n.openBlock(),n.createBlock(n.unref(Ce),n.mergeProps(e,{ref:n.unref(a),type:i.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":n.unref(r).open.value||!1,"aria-controls":n.unref(r).open.value?n.unref(r).contentId:void 0,"data-state":n.unref(r).open.value?"open":"closed",onClick:n.unref(r).onOpenToggle}),{default:n.withCtx(()=>[n.renderSlot(i.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Yo=n.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=e4();return(r,a)=>n.unref(e)||r.forceMount?(n.openBlock(),n.createBlock(n.Teleport,{key:0,to:r.to,disabled:r.disabled},[n.renderSlot(r.$slots,"default")],8,["to","disabled"])):n.createCommentVNode("",!0)}}),Go=n.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(r,a)=>(n.openBlock(),n.createBlock(n.unref(Yo),n.normalizeProps(n.guardReactiveProps(e)),{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},16))}}),I4="dismissableLayer.pointerDownOutside",M4="dismissableLayer.focusOutside";function iA(t,e){const r=e.closest("[data-dismissable-layer]"),a=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),o=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&a===r||o.indexOf(a)<o.indexOf(r))}function P4(t,e){var r;const a=((r=e==null?void 0:e.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=n.ref(!1),i=n.ref(()=>{});return n.watchEffect(s=>{if(!dn)return;const l=async u=>{const d=u.target;if(e!=null&&e.value){if(iA(e.value,d)){o.value=!1;return}if(u.target&&!o.value){let A=function(){z1(I4,t,p)};const p={originalEvent:u};u.pointerType==="touch"?(a.removeEventListener("click",i.value),i.value=A,a.addEventListener("click",i.value,{once:!0})):A()}else a.removeEventListener("click",i.value);o.value=!1}},c=window.setTimeout(()=>{a.addEventListener("pointerdown",l)},0);s(()=>{window.clearTimeout(c),a.removeEventListener("pointerdown",l),a.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>o.value=!0}}function _4(t,e){var r;const a=((r=e==null?void 0:e.value)==null?void 0:r.ownerDocument)??(globalThis==null?void 0:globalThis.document),o=n.ref(!1);return n.watchEffect(i=>{if(!dn)return;const s=async l=>{e!=null&&e.value&&(await n.nextTick(),!(!e.value||iA(e.value,l.target))&&l.target&&!o.value&&z1(M4,t,{originalEvent:l}))};a.addEventListener("focusin",s),i(()=>a.removeEventListener("focusin",s))}),{onFocusCapture:()=>o.value=!0,onBlurCapture:()=>o.value=!1}}const pn=n.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),No=n.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const r=t,a=e,{forwardRef:o,currentElement:i}=fe(),s=n.computed(()=>{var g;return((g=i.value)==null?void 0:g.ownerDocument)??globalThis.document}),l=n.computed(()=>pn.layersRoot),c=n.computed(()=>i.value?Array.from(l.value).indexOf(i.value):-1),u=n.computed(()=>pn.layersWithOutsidePointerEventsDisabled.size>0),d=n.computed(()=>{const g=Array.from(l.value),[b]=[...pn.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b);return c.value>=y}),A=P4(async g=>{const b=[...pn.branches].some(y=>y==null?void 0:y.contains(g.target));!d.value||b||(a("pointerDownOutside",g),a("interactOutside",g),await n.nextTick(),g.defaultPrevented||a("dismiss"))},i),p=_4(g=>{[...pn.branches].some(b=>b==null?void 0:b.contains(g.target))||(a("focusOutside",g),a("interactOutside",g),g.defaultPrevented||a("dismiss"))},i);N5("Escape",g=>{c.value===l.value.size-1&&(a("escapeKeyDown",g),g.defaultPrevented||a("dismiss"))});let m;return n.watchEffect(g=>{i.value&&(r.disableOutsidePointerEvents&&(pn.layersWithOutsidePointerEventsDisabled.size===0&&(m=s.value.body.style.pointerEvents,s.value.body.style.pointerEvents="none"),pn.layersWithOutsidePointerEventsDisabled.add(i.value)),l.value.add(i.value),g(()=>{r.disableOutsidePointerEvents&&pn.layersWithOutsidePointerEventsDisabled.size===1&&(s.value.body.style.pointerEvents=m)}))}),n.watchEffect(g=>{g(()=>{i.value&&(l.value.delete(i.value),pn.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(g,b)=>(n.openBlock(),n.createBlock(n.unref(Ce),{ref:n.unref(o),"as-child":g.asChild,as:g.as,"data-dismissable-layer":"",style:n.normalizeStyle({pointerEvents:u.value?d.value?"auto":"none":void 0}),onFocusCapture:n.unref(p).onFocusCapture,onBlurCapture:n.unref(p).onBlurCapture,onPointerdownCapture:n.unref(A).onPointerDownCapture},{default:n.withCtx(()=>[n.renderSlot(g.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Ll="focusScope.autoFocusOnMount",Fl="focusScope.autoFocusOnUnmount",sA={bubbles:!1,cancelable:!0};function R4(t,{select:e=!1}={}){const r=dt();for(const a of t)if(Dn(a,{select:e}),dt()!==r)return!0}function L4(t){const e=lA(t),r=cA(e,t),a=cA(e.reverse(),t);return[r,a]}function lA(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function cA(t,e){for(const r of t)if(!F4(r,{upTo:e}))return r}function F4(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function U4(t){return t instanceof HTMLInputElement&&"select"in t}function Dn(t,{select:e=!1}={}){if(t&&t.focus){const r=dt();t.focus({preventScroll:!0}),t!==r&&U4(t)&&e&&t.select()}}const Z4=z5(()=>n.ref([]));function H4(){const t=Z4();return{add(e){const r=t.value[0];e!==r&&(r==null||r.pause()),t.value=uA(t.value,e),t.value.unshift(e)},remove(e){var r;t.value=uA(t.value,e),(r=t.value[0])==null||r.resume()}}}function uA(t,e){const r=[...t],a=r.indexOf(e);return a!==-1&&r.splice(a,1),r}function Q4(t){return t.filter(e=>e.tagName!=="A")}const Ul=n.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const r=t,a=e,{currentRef:o,currentElement:i}=fe(),s=n.ref(null),l=H4(),c=n.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});n.watchEffect(d=>{if(!dn)return;const A=i.value;if(!r.trapped)return;function p(y){if(c.paused||!A)return;const k=y.target;A.contains(k)?s.value=k:Dn(s.value,{select:!0})}function m(y){if(c.paused||!A)return;const k=y.relatedTarget;k!==null&&(A.contains(k)||Dn(s.value,{select:!0}))}function g(y){A.contains(s.value)||Dn(A)}document.addEventListener("focusin",p),document.addEventListener("focusout",m);const b=new MutationObserver(g);A&&b.observe(A,{childList:!0,subtree:!0}),d(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",m),b.disconnect()})}),n.watchEffect(async d=>{const A=i.value;if(await n.nextTick(),!A)return;l.add(c);const p=dt();if(!A.contains(p)){const m=new CustomEvent(Ll,sA);A.addEventListener(Ll,g=>a("mountAutoFocus",g)),A.dispatchEvent(m),m.defaultPrevented||(R4(Q4(lA(A)),{select:!0}),dt()===p&&Dn(A))}d(()=>{A.removeEventListener(Ll,b=>a("mountAutoFocus",b));const m=new CustomEvent(Fl,sA),g=b=>{a("unmountAutoFocus",b)};A.addEventListener(Fl,g),A.dispatchEvent(m),setTimeout(()=>{m.defaultPrevented||Dn(p??document.body,{select:!0}),A.removeEventListener(Fl,g),l.remove(c)},0)})});function u(d){if(!r.loop&&!r.trapped||c.paused)return;const A=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,p=dt();if(A&&p){const m=d.currentTarget,[g,b]=L4(m);g&&b?!d.shiftKey&&p===b?(d.preventDefault(),r.loop&&Dn(g,{select:!0})):d.shiftKey&&p===g&&(d.preventDefault(),r.loop&&Dn(b,{select:!0})):p===m&&d.preventDefault()}}return(d,A)=>(n.openBlock(),n.createBlock(n.unref(Ce),{ref_key:"currentRef",ref:o,tabindex:"-1","as-child":d.asChild,as:d.as,onKeydown:u},{default:n.withCtx(()=>[n.renderSlot(d.$slots,"default")]),_:3},8,["as-child","as"]))}}),q4="menu.itemSelect",Zl=["Enter"," "],z4=["ArrowDown","PageUp","Home"],dA=["ArrowUp","PageDown","End"],K4=[...z4,...dA];[...Zl],[...Zl];function AA(t){return t?"open":"closed"}function j4(t){const e=dt();for(const r of t)if(r===e||(r.focus(),dt()!==e))return}function J4(t,e){const{x:r,y:a}=t;let o=!1;for(let i=0,s=e.length-1;i<e.length;s=i++){const l=e[i].x,c=e[i].y,u=e[s].x,d=e[s].y;c>a!=d>a&&r<(u-l)*(a-c)/(d-c)+l&&(o=!o)}return o}function $4(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return J4(r,e)}function Hl(t){return t.pointerType==="mouse"}const X4="DialogTitle",W4="DialogContent";function Y4({titleName:t=X4,contentName:e=W4,componentLink:r="dialog.html#title",titleId:a,descriptionId:o,contentElement:i}){const s=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users.
20
20
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fge-auth-component",
3
3
  "private": false,
4
- "version": "5.2.2",
4
+ "version": "5.2.3",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"