From 0ade662a048c8f10c6401a488e58dba43cd074e8 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Sat, 21 Nov 2026 09:32:54 +0100 Subject: [PATCH] fix(32.2): WR-06 check the consent provider's redirect against the request's redirect URI cabana loads the pending request on both decisions and refuses (500) a Decide answer whose scheme, user info, host, path or opaque part differ from the registered redirect URI. The admin SPA also refuses blob:, file:, about: and filesystem: and a destination that does not return to the host the consent card showed. Regenerated the admin OpenAPI document and rebuilt modules/boardwalk/dist. --- admin/openapi/admin.json | 2 +- admin/src/api/schema.d.ts | 2 +- admin/src/views/ConnectView.vue | 38 ++++++++- admin/tests/views/ConnectView.test.ts | 29 ++++++- docs/backend/admin-spa.md | 2 +- docs/services/oauth-server.md | 2 +- ...{editor-Ddqg0Ojw.js => editor-52GpIeRl.js} | 2 +- .../boardwalk/dist/assets/index-BbjrikzN.js | 12 +++ .../boardwalk/dist/assets/index-CHYC7L7j.js | 12 --- .../{load-DItc0Zsj.js => load-lvP0eeyT.js} | 2 +- modules/boardwalk/dist/index.html | 2 +- modules/cabana/README.md | 2 +- modules/cabana/admin_openapi.go | 2 +- modules/cabana/mcp_admin_consent_test.go | 78 ++++++++++++++++++- modules/cabana/mcp_consent.go | 68 +++++++++++----- modules/pact/README.md | 2 +- modules/pact/mcp.go | 4 + 17 files changed, 212 insertions(+), 49 deletions(-) rename modules/boardwalk/dist/assets/{editor-Ddqg0Ojw.js => editor-52GpIeRl.js} (99%) create mode 100644 modules/boardwalk/dist/assets/index-BbjrikzN.js delete mode 100644 modules/boardwalk/dist/assets/index-CHYC7L7j.js rename modules/boardwalk/dist/assets/{load-DItc0Zsj.js => load-lvP0eeyT.js} (78%) diff --git a/admin/openapi/admin.json b/admin/openapi/admin.json index 5a959b39..7a373db3 100644 --- a/admin/openapi/admin.json +++ b/admin/openapi/admin.json @@ -5316,7 +5316,7 @@ ] }, "post": { - "description": "Allows or denies a pending MCP authorization request for the signed-in admin and answers the client redirect URI. Submitted scopes that were not requested or that the admin cannot grant are dropped, * collapses as for personal tokens, and 422 no_grantable_scopes answers when nothing is left. Needs X-Requested-With; the body is capped at 16 KiB and unknown fields are refused (400). Personal API tokens are refused (403 interactive_only).", + "description": "Allows or denies a pending MCP authorization request for the signed-in admin and answers the client redirect URI. Submitted scopes that were not requested or that the admin cannot grant are dropped, * collapses as for personal tokens, and 422 no_grantable_scopes answers when nothing is left. Both decisions load the request first; a provider redirect that does not go back to the request's redirect URI (same scheme, host and path) is refused (500). Needs X-Requested-With; the body is capped at 16 KiB and unknown fields are refused (400). Personal API tokens are refused (403 interactive_only).", "parameters": [ { "description": "Pending request id", diff --git a/admin/src/api/schema.d.ts b/admin/src/api/schema.d.ts index ce139770..559d80e0 100644 --- a/admin/src/api/schema.d.ts +++ b/admin/src/api/schema.d.ts @@ -1705,7 +1705,7 @@ export interface paths { put?: never; /** * Allow or deny an MCP consent request - * @description Allows or denies a pending MCP authorization request for the signed-in admin and answers the client redirect URI. Submitted scopes that were not requested or that the admin cannot grant are dropped, * collapses as for personal tokens, and 422 no_grantable_scopes answers when nothing is left. Needs X-Requested-With; the body is capped at 16 KiB and unknown fields are refused (400). Personal API tokens are refused (403 interactive_only). + * @description Allows or denies a pending MCP authorization request for the signed-in admin and answers the client redirect URI. Submitted scopes that were not requested or that the admin cannot grant are dropped, * collapses as for personal tokens, and 422 no_grantable_scopes answers when nothing is left. Both decisions load the request first; a provider redirect that does not go back to the request's redirect URI (same scheme, host and path) is refused (500). Needs X-Requested-With; the body is capped at 16 KiB and unknown fields are refused (400). Personal API tokens are refused (403 interactive_only). */ post: { parameters: { diff --git a/admin/src/views/ConnectView.vue b/admin/src/views/ConnectView.vue index fc9bf6b0..95446910 100644 --- a/admin/src/views/ConnectView.vue +++ b/admin/src/views/ConnectView.vue @@ -188,7 +188,41 @@ function scopeDisabled(name: string): boolean { return starChecked.value && name !== '*' } -/** The server-issued redirect, refused when its scheme could run script (T-32.2-09). */ +/** Schemes a consent redirect never uses: script, inline content and local files. */ +const FORBIDDEN_PROTOCOLS = new Set(['javascript:', 'data:', 'vbscript:', 'blob:', 'file:', 'about:', 'filesystem:']) + +/** + * Whether url returns to the place the consent screen showed: the + * redirect host (with its port) for a URI with a host, or the URI without + * query and fragment for one without (a custom scheme). Both sides go + * through the URL parser, so case and default ports compare as the browser + * sees them. + */ +function returnsTo(url: URL, host: string): boolean { + if (host === '') { + return false + } + try { + if (url.host !== '') { + return new URL(`${url.protocol}//${host}`).host === url.host + } + const want = new URL(host) + const got = new URL(url.href) + for (const u of [want, got]) { + u.search = '' + u.hash = '' + } + return want.href === got.href + } catch { + return false + } +} + +/** + * The server-issued redirect, refused when its scheme could run script or + * open local content, or when it leaves for another place than the one the + * screen named (T-32.2-09). + */ function safeDestination(uri: string): string | null { let url: URL try { @@ -196,7 +230,7 @@ function safeDestination(uri: string): string | null { } catch { return null } - if (url.protocol === 'javascript:' || url.protocol === 'data:' || url.protocol === 'vbscript:') { + if (FORBIDDEN_PROTOCOLS.has(url.protocol) || !returnsTo(url, redirectHost.value)) { return null } return uri diff --git a/admin/tests/views/ConnectView.test.ts b/admin/tests/views/ConnectView.test.ts index 0c5892d5..87abe4a0 100644 --- a/admin/tests/views/ConnectView.test.ts +++ b/admin/tests/views/ConnectView.test.ts @@ -258,13 +258,22 @@ describe('no auto-allow and the decision navigation (UI backstop)', () => { expect(wrapper.find('[data-action="allow"]').exists()).toBe(false) expect(document.activeElement).toBe(card.find('h1').element) - const custom = await open('/connect?request=req1', routes(consentView(), ok({ redirect_uri: 'myagent:/callback?code=1' }))) + const customView = consentView({ client: { id: 'client-1', name: 'Acme Agent', redirect_host: 'myagent:/callback', logo_url: '' } }) + const custom = await open('/connect?request=req1', routes(customView, ok({ redirect_uri: 'myagent:/callback?code=1' }))) await custom.wrapper.find('[data-connect-state="ready"]').trigger('submit') await flushPromises() expect(assign).toHaveBeenLastCalledWith('myagent:/callback?code=1') const returning = custom.wrapper.find('[data-connect-state="returning"]') expect(returning.find('[data-connect-continue]').exists()).toBe(false) - expect(returning.find('h1').text()).toBe('Returning to agent.example.test') + expect(returning.find('h1').text()).toBe('Returning to myagent:/callback') + }) + + it('leaves for a redirect whose host matches the shown one as the browser compares hosts', async () => { + const view = consentView({ client: { id: 'client-1', name: 'Acme Agent', redirect_host: 'Agent.Example.Test:443', logo_url: '' } }) + const { wrapper } = await open('/connect?request=req1', routes(view)) + await wrapper.find('[data-connect-state="ready"]').trigger('submit') + await flushPromises() + expect(assign).toHaveBeenCalledWith(REDIRECT) }) it('disables both buttons and the scopes while a decision is in flight', async () => { @@ -290,7 +299,21 @@ describe('no auto-allow and the decision navigation (UI backstop)', () => { }) describe('submit failures', () => { - it.each(['javascript:alert(1)', 'data:text/html,', 'vbscript:msgbox(1)', 'JavaScript:alert(1)', 'not a uri'])( + it.each([ + 'javascript:alert(1)', + 'data:text/html,', + 'vbscript:msgbox(1)', + 'JavaScript:alert(1)', + 'not a uri', + 'blob:https://agent.example.test/0b7c', + 'file:///etc/passwd', + 'about:blank', + 'filesystem:https://agent.example.test/temporary/x', + 'https://evil.example.test/callback?code=abc123', + 'https://agent.example.test.evil.example/callback?code=abc123', + 'https://agent.example.test:8443/callback?code=abc123', + 'myagent:/callback?code=1', + ])( 'treats the redirect %j as a submit failure', async (uri) => { const { wrapper, push, replace } = await open('/connect?request=req1', routes(consentView(), ok({ redirect_uri: uri }))) diff --git a/docs/backend/admin-spa.md b/docs/backend/admin-spa.md index b18d7321..a9fa84d6 100644 --- a/docs/backend/admin-spa.md +++ b/docs/backend/admin-spa.md @@ -49,7 +49,7 @@ When the server offers more than one admin language (`meta.locales` of `GET .../ The route is standalone, without the navigation shell, and needs a session: an anonymous visitor goes to the login screen with the connect path as its redirect, signs in (with any second step the login asks for) and comes back to the same request. The login screen then says why the administrator is signing in. -The card names the client, the signed-in administrator (with a "Use another account" button that signs out of this browser and goes through login again) and the host the browser returns to, which is always shown in full. Below are the scopes the server offered, in catalog order: every one starts ticked except `*`, which starts ticked only when it is the only scope, and ticking `*` clears and disables the others, as on API token creation. A "Stay connected" box, ticked by default, appears only when the client asked for offline access. Nothing is sent until the administrator clicks Allow or Deny, even for a client allowed before, and neither button has initial focus or a shortcut. The answer's `redirect_uri` is opened with `window.location.assign`, never through the router or the login redirect check, and a `javascript:`, `data:` or `vbscript:` URI is refused as a failed answer. An unknown, expired or used request shows an expired card with a link to the admin; when the administrator holds none of the requested scopes only Deny is offered. +The card names the client, the signed-in administrator (with a "Use another account" button that signs out of this browser and goes through login again) and the host the browser returns to, which is always shown in full. Below are the scopes the server offered, in catalog order: every one starts ticked except `*`, which starts ticked only when it is the only scope, and ticking `*` clears and disables the others, as on API token creation. A "Stay connected" box, ticked by default, appears only when the client asked for offline access. Nothing is sent until the administrator clicks Allow or Deny, even for a client allowed before, and neither button has initial focus or a shortcut. The answer's `redirect_uri` is opened with `window.location.assign`, never through the router or the login redirect check, and a `javascript:`, `data:`, `vbscript:`, `blob:`, `file:`, `about:` or `filesystem:` URI, or one that does not return to the host the card showed, is refused as a failed answer (the server already refuses a redirect that does not go back to the request's redirect URI). An unknown, expired or used request shows an expired card with a link to the admin; when the administrator holds none of the requested scopes only Deny is offered. ## Plugins screen diff --git a/docs/services/oauth-server.md b/docs/services/oauth-server.md index 1a9f2aff..b88cf576 100644 --- a/docs/services/oauth-server.md +++ b/docs/services/oauth-server.md @@ -118,7 +118,7 @@ The authorization endpoint sends the browser to `/connect?request=`, An OAuth server plugin that signs administrators in instead of frontend users answers its verifier's grants with `pact.MCPGrant.Subject` set to `pact.MCPGrantSubjectBackend`, `UserID` 0 and the administrator in `pact.MCPGrant.BackendUserID`. The MCP endpoint then acts as that administrator only, scope-limited like a `g15_` token with the granted scopes (see [MCP](mcp.md)). -The consent page of such grants is the admin's own: the plugin sets `wristband.Options.ConsentPath` to a page under the admin prefix and publishes a `pact.MCPAdminConsent`. cabana serves `GET` and `POST {admin api}/mcp/consent/{request}` for the signed-in administrator (cookie session only, the POST with `X-Requested-With`) and delegates to that provider: `pact.MCPAdminConsent.MCPAdminConsentShow` describes the pending request as a `pact.MCPAdminConsentRequest`, `pact.MCPAdminConsent.MCPAdminConsentDecide` issues the code or the denial for a `pact.MCPAdminConsentDecision` and answers the redirect URI. cabana owns the scope policy, the same as for `g15_` personal tokens: the scopes are the token-scope catalog (`cabana.TokenScopeNames`, labels through `cabana.TokenScopeLabels`), the screen shows only requested scopes the administrator can grant, and an allow drops anything else before Decide runs (`*` collapses as on token creation). A missing provider or request is 404 `request_not_found` (`pact.ErrMCPConsentNotFound`), and nothing left to grant is 422 `no_grantable_scopes` (`pact.ErrMCPConsentNoScopes`). +The consent page of such grants is the admin's own: the plugin sets `wristband.Options.ConsentPath` to a page under the admin prefix and publishes a `pact.MCPAdminConsent`. cabana serves `GET` and `POST {admin api}/mcp/consent/{request}` for the signed-in administrator (cookie session only, the POST with `X-Requested-With`) and delegates to that provider: `pact.MCPAdminConsent.MCPAdminConsentShow` describes the pending request as a `pact.MCPAdminConsentRequest`, `pact.MCPAdminConsent.MCPAdminConsentDecide` issues the code or the denial for a `pact.MCPAdminConsentDecision` and answers the redirect URI. cabana owns the scope policy, the same as for `g15_` personal tokens: the scopes are the token-scope catalog (`cabana.TokenScopeNames`, labels through `cabana.TokenScopeLabels`), the screen shows only requested scopes the administrator can grant, and an allow drops anything else before Decide runs (`*` collapses as on token creation). cabana also loads the request before a deny, and refuses with 500 a redirect from Decide that does not go back to the request's `pact.MCPAdminConsentRequest.RedirectURI` (same scheme, host and path; only the query and fragment may differ). A missing provider or request is 404 `request_not_found` (`pact.ErrMCPConsentNotFound`), and nothing left to grant is 422 `no_grantable_scopes` (`pact.ErrMCPConsentNoScopes`). ## Clients created outside registration diff --git a/modules/boardwalk/dist/assets/editor-Ddqg0Ojw.js b/modules/boardwalk/dist/assets/editor-52GpIeRl.js similarity index 99% rename from modules/boardwalk/dist/assets/editor-Ddqg0Ojw.js rename to modules/boardwalk/dist/assets/editor-52GpIeRl.js index c95ece57..8f730ed0 100644 --- a/modules/boardwalk/dist/assets/editor-Ddqg0Ojw.js +++ b/modules/boardwalk/dist/assets/editor-52GpIeRl.js @@ -1,4 +1,4 @@ -import{k as du,b as fu}from"./index-Vcq4gwWv.js";import{L as hu,i as pu}from"./index-CHYC7L7j.js";var Bs=Object.defineProperty,mu=(n,e)=>{let t={};for(var r in n)Bs(t,r,{get:n[r],enumerable:!0});return Bs(t,Symbol.toStringTag,{value:"Module"}),t};function Q(n){this.content=n}Q.prototype={constructor:Q,find:function(n){for(var e=0;e>1}};Q.from=function(n){if(n instanceof Q)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Q(e)};function bl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d=56320&&n<57344}function wl(n){return n>=55296&&n<56320}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;re&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Dn(t+1,s):Dn(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};B.none=[];class pn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ml(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(Cl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new w(e,r,i)}}w.empty=new w(k.empty,0,0);function Cl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Cl(s.content,e-i-1,t-i-1)))}function Ml(n,e,t,r,i,s){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=Ml(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function gu(n,e,t){if(t.openStart>n.depth)throw new pn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new pn("Inconsistent open depths");return Tl(n,e,t,0)}function Tl(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ht(n.nodeAfter,r),s++));for(let l=s;li&&Mi(n,e,i+1),o=r.depth>i&&Mi(t,r,i+1),l=[];return en(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(El(s,o),ht(pt(s,vl(n,e,t,r,i+1)),l)):(s&&ht(pt(s,Yn(n,e,i+1)),l),en(e,t,i,l),o&&ht(pt(o,Yn(t,r,i+1)),l)),en(r,null,i,l),new k(l)}function Yn(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let i=Mi(n,e,t+1);ht(pt(i,Yn(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function yu(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class mn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Xn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new mn(t,r,s)}static resolveCached(e,t){let r=zs.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Al(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};mt.prototype.text=void 0;class Qn extends mt{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Al(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Qn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Qn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Al(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}function $s(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${r}`);for(let i in n)n[i].validate&&n[i].validate(e[i])}class kt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Su(e,t);if(r.next==null)return kt.empty;let i=Ol(r);r.next&&r.err("Unexpected trailing text");let s=Au(vu(i));return Ou(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` +import{k as du,b as fu}from"./index-Vcq4gwWv.js";import{L as hu,i as pu}from"./index-BbjrikzN.js";var Bs=Object.defineProperty,mu=(n,e)=>{let t={};for(var r in n)Bs(t,r,{get:n[r],enumerable:!0});return Bs(t,Symbol.toStringTag,{value:"Module"}),t};function Q(n){this.content=n}Q.prototype={constructor:Q,find:function(n){for(var e=0;e>1}};Q.from=function(n){if(n instanceof Q)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Q(e)};function bl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d=56320&&n<57344}function wl(n){return n>=55296&&n<56320}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;re&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);se)for(let s=0,o=0;oe&&((ot)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?Dn(t+1,s):Dn(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};B.none=[];class pn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ml(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(Cl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new w(e,r,i)}}w.empty=new w(k.empty,0,0);function Cl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(Cl(s.content,e-i-1,t-i-1)))}function Ml(n,e,t,r,i,s){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=Ml(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function gu(n,e,t){if(t.openStart>n.depth)throw new pn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new pn("Inconsistent open depths");return Tl(n,e,t,0)}function Tl(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function en(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ht(n.nodeAfter,r),s++));for(let l=s;li&&Mi(n,e,i+1),o=r.depth>i&&Mi(t,r,i+1),l=[];return en(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(El(s,o),ht(pt(s,vl(n,e,t,r,i+1)),l)):(s&&ht(pt(s,Yn(n,e,i+1)),l),en(e,t,i,l),o&&ht(pt(o,Yn(t,r,i+1)),l)),en(r,null,i,l),new k(l)}function Yn(n,e,t){let r=[];if(en(null,n,t,r),n.depth>t){let i=Mi(n,e,t+1);ht(pt(i,Yn(n,e,t+1)),r)}return en(e,null,t,r),new k(r)}function yu(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class mn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Xn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new mn(t,r,s)}static resolveCached(e,t){let r=zs.get(e);if(r)for(let s=0;se&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Al(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};mt.prototype.text=void 0;class Qn extends mt{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Al(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Qn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Qn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Al(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}function $s(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${r}`);for(let i in n)n[i].validate&&n[i].validate(e[i])}class kt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Su(e,t);if(r.next==null)return kt.empty;let i=Ol(r);r.next&&r.err("Unexpected trailing text");let s=Au(vu(i));return Ou(s,r),s}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o"+e.indexOf(r.next[o].next);return s}).join(` `)}}kt.empty=new kt(!0);class Su{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Ol(n){let e=[];do e.push(wu(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function wu(n){let e=[];do e.push(Cu(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Cu(n){let e=Eu(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Mu(n,e);else break;return e}function Fs(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Mu(n,e){let t=Fs(n),r=t;return n.eat(",")&&(n.next!="}"?r=Fs(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Tu(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Eu(n){if(n.eat("(")){let e=Ol(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Tu(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function vu(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new kt(r.indexOf(n.length-1)>-1);for(let o=0;o-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Il(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new mt(this,this.computeAttrs(e),k.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new mt(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(k.empty,!0);return s?new mt(this,e,t.append(s),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[s]=new Ll(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Nu(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}class Du{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Nu(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Br{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Rl(e,i.attrs),this.excluded=null;let s=Dl(this.attrs);this.instance=s?new B(this,s):null}create(e=null){return!e&&this.instance?this.instance:new B(this,Il(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Br(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t-1}}class Pl{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Q.from(e.nodes),t.marks=Q.from(e.marks||{}),this.nodes=Hs.compile(this.spec.nodes,this),this.marks=Br.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=kt.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?js(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:js(this,o.split(" "))}this.nodeFromJSON=i=>mt.fromJSON(this,i),this.markFromJSON=i=>B.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Hs){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new Qn(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function js(n,e){let t=[];for(let r=0;r-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Iu(n){return n.tag!=null}function Ru(n){return n.style!=null}class Ye{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Iu(i))this.tags.push(i);else if(Ru(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new Ks(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ks(this,t,!0);return r.addAll(e,B.none,t.from,t.to),w.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o{r(o=_s(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=_s(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ye(e,Ye.schemaRules(e)))}}const Bl={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Lu={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},zl={ol:!0,ul:!0},gn=1,Ei=2,tn=4;function Ws(n,e,t){return e!=null?(e?gn:0)|(e==="full"?Ei:0):n&&n.whitespace=="pre"?gn|Ei:t&~tn}class In{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=B.none,this.match=s||(o&tn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&gn)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Bl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ks{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=Ws(null,t.preserveWhitespace,0)|(r?tn:0);i?s=new In(i.type,i.attrs,B.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new In(null,null,B.none,!0,null,o):s=new In(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&Ei?"full":this.localPreserveWS||(i.options&gn)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,` `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o(o.type?o.type.allowsMarkType(c.type):Us(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new In(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=gn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Pu(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&zl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Bu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function _s(n){let e={};for(let t in n)e[t]=n[t];return e}function Us(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Kn(Rn(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:Kn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ct(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=qs(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return qs(e.marks)}}function qs(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Rn(n){return n.document||window.document}const Js=new WeakMap;function zu(n){let e=Js.get(n);return e===void 0&&Js.set(n,e=$u(n)),e}function $u(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(n.createTextNode(f));else{let{dom:h,contentDOM:p}=Kn(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const $l=65535,Fl=Math.pow(2,16);function Fu(n,e){return n+e*Fl}function Gs(n){return n&$l}function Vu(n){return(n-(n&$l))/Fl}const Vl=1,Hl=2,_n=4,jl=8;class vi{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&jl)>0}get deletedBefore(){return(this.delInfo&(Vl|_n))>0}get deletedAfter(){return(this.delInfo&(Hl|_n))>0}get deletedAcross(){return(this.delInfo&_n)>0}}class ue{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ue.empty)return ue.empty}recover(e){let t=0,r=Gs(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+i+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Fu(l/3,e-a),m=0;return c&&(m|=e==a?Hl:e==d?Vl:_n,(t<0?e!=a:e!=d)&&(m|=jl)),new vi(h,m,p)}i+=u-c}return r?e+i:new vi(e+i,0,null)}touches(e,t){let r=0,i=Gs(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new yn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;rs&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return K.fromReplace(e,this.from,this.to,s)}invert(){return new we(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Je(t.pos,r.pos,this.mark)}merge(e){return e instanceof Je&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Je(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Je(t.from,t.to,e.markFromJSON(t.mark))}}ie.jsonID("addMark",Je);class we extends ie{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new w(ts(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return K.fromReplace(e,this.from,this.to,r)}invert(){return new Je(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new we(t.pos,r.pos,this.mark)}merge(e){return e instanceof we&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new we(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new we(t.from,t.to,e.markFromJSON(t.mark))}}ie.jsonID("removeMark",we);class Ge extends ie{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return K.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return K.fromReplace(e,this.pos,this.pos+1,new w(k.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new G(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new G(t.from,t.to,t.gapFrom,t.gapTo,w.fromJSON(e,t.slice),t.insert,!!t.structure)}}ie.jsonID("replaceAround",G);function Ai(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Hu(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;mn.step(a)),s.forEach(a=>n.step(a))}function ju(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Br){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;un.step(new we(o.from,o.to,o.style)))}function ns(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a=0;a--)n.step(o[a])}function Wu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Kt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+i,a=n.$to.indexAfter(r)-s;if(rt;p--)m||r.index(p)>0?(m=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new G(i,s,i,s,new w(r,0,0),t.length,!0))}function Ju(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&Gu(n.doc,n.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Kl(n,o,l,s),ns(n,n.mapping.slice(s).map(l,1),r,void 0,c===null);let u=n.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new G(d,f,d+1,f-1,new w(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Wl(n,o,l,s),!1}})}function Wl(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Kl(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(` diff --git a/modules/boardwalk/dist/assets/index-BbjrikzN.js b/modules/boardwalk/dist/assets/index-BbjrikzN.js new file mode 100644 index 00000000..cbd3e112 --- /dev/null +++ b/modules/boardwalk/dist/assets/index-BbjrikzN.js @@ -0,0 +1,12 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./editor-52GpIeRl.js","./index-Vcq4gwWv.js"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();function Qd(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const wt={},Nl=[],ca=()=>{},Jh=()=>!1,tu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),nu=e=>e.startsWith("onUpdate:"),Ft=Object.assign,ef=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},A_=Object.prototype.hasOwnProperty,bt=(e,t)=>A_.call(e,t),Je=Array.isArray,Bl=e=>gs(e)==="[object Map]",au=e=>gs(e)==="[object Set]",zp=e=>gs(e)==="[object Date]",nt=e=>typeof e=="function",St=e=>typeof e=="string",Cn=e=>typeof e=="symbol",yt=e=>e!==null&&typeof e=="object",Zh=e=>(yt(e)||nt(e))&&nt(e.then)&&nt(e.catch),Xh=Object.prototype.toString,gs=e=>Xh.call(e),T_=e=>gs(e).slice(8,-1),Qh=e=>gs(e)==="[object Object]",ru=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Bo=Qd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),lu=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},D_=/-\w/g,Zt=lu(e=>e.replace(D_,t=>t.slice(1).toUpperCase())),O_=/\B([A-Z])/g,Ar=lu(e=>e.replace(O_,"-$1").toLowerCase()),ou=lu(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fo=lu(e=>e?`on${ou(e)}`:""),oa=(e,t)=>!Object.is(e,t),di=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:a,value:n})},tf=e=>{const t=parseFloat(e);return isNaN(t)?e:t},M_=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let jp;const su=()=>jp||(jp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function cn(e){if(Je(e)){const t={};for(let n=0;n{if(n){const a=n.split(P_);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function pe(e){let t="";if(St(e))t=e;else if(Je(e))for(let n=0;nbs(n,t))}const ay=e=>!!(e&&e.__v_isRef===!0),$=e=>St(e)?e:e==null?"":Je(e)||yt(e)&&(e.toString===Xh||!nt(e.toString))?ay(e)?$(e.value):JSON.stringify(e,ry,2):String(e),ry=(e,t)=>ay(t)?ry(e,t.value):Bl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[a,r],l)=>(n[ec(a,l)+" =>"]=r,n),{})}:au(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ec(n))}:Cn(t)?ec(t):yt(t)&&!Je(t)&&!Qh(t)?String(t):t,ec=(e,t="")=>{var n;return Cn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let jt;class ly{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&jt&&(jt.active?(this.parent=jt,this.index=(jt.scopes||(jt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(jt===this)jt=this.prevScope;else{let t=jt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,a;for(n=0,a=this.effects.length;n0)return;if(zo){let t=zo;for(zo=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Vo;){let t=Vo;for(Vo=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(a){e||(e=a)}t=n}}if(e)throw e}function dy(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fy(e){let t,n=e.depsTail,a=n;for(;a;){const r=a.prevDep;a.version===-1?(a===n&&(n=r),lf(a),F_(a)):t=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=r}e.deps=t,e.depsTail=n}function rd(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(py(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function py(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qo)||(e.globalVersion=Qo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!rd(e))))return;e.flags|=2;const t=e.dep,n=$t,a=Fn;$t=e,Fn=!0;try{dy(e);const r=e.fn(e._value);(t.version===0||oa(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{$t=n,Fn=a,fy(e),e.flags&=-3}}function lf(e,t=!1){const{dep:n,prevSub:a,nextSub:r}=e;if(a&&(a.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=a,e.nextSub=void 0),n.subs===e&&(n.subs=a,!a&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)lf(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function F_(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Fn=!0;const vy=[];function Ra(){vy.push(Fn),Fn=!1}function qa(){const e=vy.pop();Fn=e===void 0?!0:e}function Up(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=$t;$t=void 0;try{t()}finally{$t=n}}}let Qo=0,V_=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class iu{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!$t||!Fn||$t===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==$t)n=this.activeLink=new V_($t,this),$t.deps?(n.prevDep=$t.depsTail,$t.depsTail.nextDep=n,$t.depsTail=n):$t.deps=$t.depsTail=n,my(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const a=n.nextDep;a.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=a),n.prevDep=$t.depsTail,n.nextDep=void 0,$t.depsTail.nextDep=n,$t.depsTail=n,$t.deps===n&&($t.deps=a)}return n}trigger(t){this.version++,Qo++,this.notify(t)}notify(t){af();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{rf()}}}function my(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let a=t.deps;a;a=a.nextDep)my(a)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const bi=new WeakMap,tl=Symbol(""),ld=Symbol(""),es=Symbol("");function nn(e,t,n){if(Fn&&$t){let a=bi.get(e);a||bi.set(e,a=new Map);let r=a.get(n);r||(a.set(n,r=new iu),r.map=a,r.key=n),r.track()}}function Ca(e,t,n,a,r,l){const o=bi.get(e);if(!o){Qo++;return}const i=u=>{u&&u.trigger()};if(af(),t==="clear")o.forEach(i);else{const u=Je(e),d=u&&ru(n);if(u&&n==="length"){const c=Number(a);o.forEach((f,m)=>{(m==="length"||m===es||!Cn(m)&&m>=c)&&i(f)})}else switch((n!==void 0||o.has(void 0))&&i(o.get(n)),d&&i(o.get(es)),t){case"add":u?d&&i(o.get("length")):(i(o.get(tl)),Bl(e)&&i(o.get(ld)));break;case"delete":u||(i(o.get(tl)),Bl(e)&&i(o.get(ld)));break;case"set":Bl(e)&&i(o.get(tl));break}}rf()}function z_(e,t){const n=bi.get(e);return n&&n.get(t)}function xl(e){const t=pt(e);return t===e?t:(nn(t,"iterate",es),$n(e)?t:t.map(jn))}function uu(e){return nn(e=pt(e),"iterate",es),e}function ra(e,t){return La(e)?Jl(nl(e)?jn(t):t):jn(t)}const j_={__proto__:null,[Symbol.iterator](){return nc(this,Symbol.iterator,e=>ra(this,e))},concat(...e){return xl(this).concat(...e.map(t=>Je(t)?xl(t):t))},entries(){return nc(this,"entries",e=>(e[1]=ra(this,e[1]),e))},every(e,t){return xa(this,"every",e,t,void 0,arguments)},filter(e,t){return xa(this,"filter",e,t,n=>n.map(a=>ra(this,a)),arguments)},find(e,t){return xa(this,"find",e,t,n=>ra(this,n),arguments)},findIndex(e,t){return xa(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xa(this,"findLast",e,t,n=>ra(this,n),arguments)},findLastIndex(e,t){return xa(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xa(this,"forEach",e,t,void 0,arguments)},includes(...e){return ac(this,"includes",e)},indexOf(...e){return ac(this,"indexOf",e)},join(e){return xl(this).join(e)},lastIndexOf(...e){return ac(this,"lastIndexOf",e)},map(e,t){return xa(this,"map",e,t,void 0,arguments)},pop(){return yo(this,"pop")},push(...e){return yo(this,"push",e)},reduce(e,...t){return Hp(this,"reduce",e,t)},reduceRight(e,...t){return Hp(this,"reduceRight",e,t)},shift(){return yo(this,"shift")},some(e,t){return xa(this,"some",e,t,void 0,arguments)},splice(...e){return yo(this,"splice",e)},toReversed(){return xl(this).toReversed()},toSorted(e){return xl(this).toSorted(e)},toSpliced(...e){return xl(this).toSpliced(...e)},unshift(...e){return yo(this,"unshift",e)},values(){return nc(this,"values",e=>ra(this,e))}};function nc(e,t,n){const a=uu(e),r=a[t]();return a!==e&&!$n(e)&&(r._next=r.next,r.next=()=>{const l=r._next();return l.done||(l.value=n(l.value)),l}),r}const U_=Array.prototype;function xa(e,t,n,a,r,l){const o=uu(e),i=o!==e&&!$n(e),u=o[t];if(u!==U_[t]){const f=u.apply(e,l);return i?jn(f):f}let d=n;o!==e&&(i?d=function(f,m){return n.call(this,ra(e,f),m,e)}:n.length>2&&(d=function(f,m){return n.call(this,f,m,e)}));const c=u.call(o,d,a);return i&&r?r(c):c}function Hp(e,t,n,a){const r=uu(e),l=r!==e&&!$n(e);let o=n,i=!1;r!==e&&(l?(i=a.length===0,o=function(d,c,f){return i&&(i=!1,d=ra(e,d)),n.call(this,d,ra(e,c),f,e)}):n.length>3&&(o=function(d,c,f){return n.call(this,d,c,f,e)}));const u=r[t](o,...a);return i?ra(e,u):u}function ac(e,t,n){const a=pt(e);nn(a,"iterate",es);const r=a[t](...n);return(r===-1||r===!1)&&fu(n[0])?(n[0]=pt(n[0]),a[t](...n)):r}function yo(e,t,n=[]){Ra(),af();const a=pt(e)[t].apply(e,n);return rf(),qa(),a}const H_=Qd("__proto__,__v_isRef,__isVue"),hy=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Cn));function K_(e){Cn(e)||(e=String(e));const t=pt(this);return nn(t,"has",e),t.hasOwnProperty(e)}class yy{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,a){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return l;if(n==="__v_raw")return a===(r?l?wy:ky:l?xy:_y).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(a)?t:void 0;const o=Je(t);if(!r){let u;if(o&&(u=j_[n]))return u;if(n==="hasOwnProperty")return K_}const i=Reflect.get(t,n,Dt(t)?t:a);if((Cn(n)?hy.has(n):H_(n))||(r||nn(t,"get",n),l))return i;if(Dt(i)){const u=o&&ru(n)?i:i.value;return r&&yt(u)?Ct(u):u}return yt(i)?r?Ct(i):zn(i):i}}class gy extends yy{constructor(t=!1){super(!1,t)}set(t,n,a,r){let l=t[n];const o=Je(t)&&ru(n);if(!this._isShallow){const d=La(l);if(!$n(a)&&!La(a)&&(l=pt(l),a=pt(a)),!o&&Dt(l)&&!Dt(a))return d||(l.value=a),!0}const i=o?Number(n)e,Fs=e=>Reflect.getPrototypeOf(e);function Z_(e,t,n){return function(...a){const r=this.__v_raw,l=pt(r),o=Bl(l),i=e==="entries"||e===Symbol.iterator&&o,u=e==="keys"&&o,d=r[e](...a),c=n?od:t?Jl:jn;return!t&&nn(l,"iterate",u?ld:tl),Ft(Object.create(d),{next(){const{value:f,done:m}=d.next();return m?{value:f,done:m}:{value:i?[c(f[0]),c(f[1])]:c(f),done:m}}})}}function Vs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function X_(e,t){const n={get(r){const l=this.__v_raw,o=pt(l),i=pt(r);e||(oa(r,i)&&nn(o,"get",r),nn(o,"get",i));const{has:u}=Fs(o),d=t?od:e?Jl:jn;if(u.call(o,r))return d(l.get(r));if(u.call(o,i))return d(l.get(i));l!==o&&l.get(r)},get size(){const r=this.__v_raw;return!e&&nn(pt(r),"iterate",tl),r.size},has(r){const l=this.__v_raw,o=pt(l),i=pt(r);return e||(oa(r,i)&&nn(o,"has",r),nn(o,"has",i)),r===i?l.has(r):l.has(r)||l.has(i)},forEach(r,l){const o=this,i=o.__v_raw,u=pt(i),d=t?od:e?Jl:jn;return!e&&nn(u,"iterate",tl),i.forEach((c,f)=>r.call(l,d(c),d(f),o))}};return Ft(n,e?{add:Vs("add"),set:Vs("set"),delete:Vs("delete"),clear:Vs("clear")}:{add(r){const l=pt(this),o=Fs(l),i=pt(r),u=!t&&!$n(r)&&!La(r)?i:r;return o.has.call(l,u)||oa(r,u)&&o.has.call(l,r)||oa(i,u)&&o.has.call(l,i)||(l.add(u),Ca(l,"add",u,u)),this},set(r,l){!t&&!$n(l)&&!La(l)&&(l=pt(l));const o=pt(this),{has:i,get:u}=Fs(o);let d=i.call(o,r);d||(r=pt(r),d=i.call(o,r));const c=u.call(o,r);return o.set(r,l),d?oa(l,c)&&Ca(o,"set",r,l):Ca(o,"add",r,l),this},delete(r){const l=pt(this),{has:o,get:i}=Fs(l);let u=o.call(l,r);u||(r=pt(r),u=o.call(l,r)),i&&i.call(l,r);const d=l.delete(r);return u&&Ca(l,"delete",r,void 0),d},clear(){const r=pt(this),l=r.size!==0,o=r.clear();return l&&Ca(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Z_(r,e,t)}),n}function cu(e,t){const n=X_(e,t);return(a,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?a:Reflect.get(bt(n,r)&&r in a?n:a,r,l)}const Q_={get:cu(!1,!1)},ex={get:cu(!1,!0)},tx={get:cu(!0,!1)},nx={get:cu(!0,!0)},_y=new WeakMap,xy=new WeakMap,ky=new WeakMap,wy=new WeakMap;function ax(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zn(e){return La(e)?e:du(e,!1,W_,Q_,_y)}function $y(e){return du(e,!1,Y_,ex,xy)}function Ct(e){return du(e,!0,G_,tx,ky)}function kl(e){return du(e,!0,J_,nx,wy)}function du(e,t,n,a,r){if(!yt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=r.get(e);if(l)return l;const o=ax(T_(e));if(o===0)return e;const i=new Proxy(e,o===2?a:n);return r.set(e,i),i}function nl(e){return La(e)?nl(e.__v_raw):!!(e&&e.__v_isReactive)}function La(e){return!!(e&&e.__v_isReadonly)}function $n(e){return!!(e&&e.__v_isShallow)}function fu(e){return e?!!e.__v_raw:!1}function pt(e){const t=e&&e.__v_raw;return t?pt(t):e}function _i(e){return!bt(e,"__v_skip")&&Object.isExtensible(e)&&ey(e,"__v_skip",!0),e}const jn=e=>yt(e)?zn(e):e,Jl=e=>yt(e)?Ct(e):e;function Dt(e){return e?e.__v_isRef===!0:!1}function A(e){return Cy(e,!1)}function ul(e){return Cy(e,!0)}function Cy(e,t){return Dt(e)?e:new rx(e,t)}class rx{constructor(t,n){this.dep=new iu,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:pt(t),this._value=n?t:jn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,a=this.__v_isShallow||$n(t)||La(t);t=a?t:pt(t),oa(t,n)&&(this._rawValue=t,this._value=a?t:jn(t),this.dep.trigger())}}function lx(e){e.dep&&e.dep.trigger()}function s(e){return Dt(e)?e.value:e}function dn(e){return nt(e)?e():s(e)}const ox={get:(e,t,n)=>t==="__v_raw"?e:s(Reflect.get(e,t,n)),set:(e,t,n,a)=>{const r=e[t];return Dt(r)&&!Dt(n)?(r.value=n,!0):Reflect.set(e,t,n,a)}};function Sy(e){return nl(e)?e:new Proxy(e,ox)}class sx{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new iu,{get:a,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=a,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ix(e){return new sx(e)}function Ht(e){const t=Je(e)?new Array(e.length):{};for(const n in e)t[n]=Ey(e,n);return t}class ux{constructor(t,n,a){this._object=t,this._defaultValue=a,this.__v_isRef=!0,this._value=void 0,this._key=Cn(n)?n:String(n),this._raw=pt(t);let r=!0,l=t;if(!Je(t)||Cn(this._key)||!ru(this._key))do r=!fu(l)||$n(l);while(r&&(l=l.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=s(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Dt(this._raw[this._key])){const n=this._object[this._key];if(Dt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return z_(this._raw,this._key)}}class cx{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function dx(e,t,n){return Dt(e)?e:nt(e)?new cx(e):yt(e)&&arguments.length>1?Ey(e,t,n):A(e)}function Ey(e,t,n){return new ux(e,t,n)}class fx{constructor(t,n,a){this.fn=t,this.setter=n,this._value=void 0,this.dep=new iu(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=a}notify(){if(this.flags|=16,!(this.flags&8)&&$t!==this)return cy(this,!0),!0}get value(){const t=this.dep.track();return py(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function px(e,t,n=!1){let a,r;return nt(e)?a=e:(a=e.get,r=e.set),new fx(a,r,n)}const zs={},xi=new WeakMap;let Wr;function vx(e,t=!1,n=Wr){if(n){let a=xi.get(n);a||xi.set(n,a=[]),a.push(e)}}function mx(e,t,n=wt){const{immediate:a,deep:r,once:l,scheduler:o,augmentJob:i,call:u}=n,d=O=>r?O:$n(O)||r===!1||r===0?Sa(O,1):Sa(O);let c,f,m,v,y=!1,x=!1;if(Dt(e)?(f=()=>e.value,y=$n(e)):nl(e)?(f=()=>d(e),y=!0):Je(e)?(x=!0,y=e.some(O=>nl(O)||$n(O)),f=()=>e.map(O=>{if(Dt(O))return O.value;if(nl(O))return d(O);if(nt(O))return u?u(O,2):O()})):nt(e)?t?f=u?()=>u(e,2):e:f=()=>{if(m){Ra();try{m()}finally{qa()}}const O=Wr;Wr=c;try{return u?u(e,3,[v]):e(v)}finally{Wr=O}}:f=ca,t&&r){const O=f,T=r===!0?1/0:r;f=()=>Sa(O(),T)}const C=nf(),k=()=>{c.stop(),C&&C.active&&ef(C.effects,c)};if(l&&t){const O=t;t=(...T)=>{O(...T),k()}}let E=x?new Array(e.length).fill(zs):zs;const B=O=>{if(!(!(c.flags&1)||!c.dirty&&!O))if(t){const T=c.run();if(r||y||(x?T.some((P,R)=>oa(P,E[R])):oa(T,E))){m&&m();const P=Wr;Wr=c;try{const R=[T,E===zs?void 0:x&&E[0]===zs?[]:E,v];E=T,u?u(t,3,R):t(...R)}finally{Wr=P}}}else c.run()};return i&&i(B),c=new iy(f),c.scheduler=o?()=>o(B,!1):B,v=O=>vx(O,!1,c),m=c.onStop=()=>{const O=xi.get(c);if(O){if(u)u(O,4);else for(const T of O)T();xi.delete(c)}},t?a?B(!0):E=c.run():o?o(B.bind(null,!0),!0):c.run(),k.pause=c.pause.bind(c),k.resume=c.resume.bind(c),k.stop=k,k}function Sa(e,t=1/0,n){if(t<=0||!yt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Dt(e))Sa(e.value,t,n);else if(Je(e))for(let a=0;a{Sa(a,t,n)});else if(Qh(e)){for(const a in e)Sa(e[a],t,n);for(const a of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,a)&&Sa(e[a],t,n)}return e}function _s(e,t,n,a){try{return a?e(...a):e()}catch(r){pu(r,t,n)}}function Pn(e,t,n,a){if(nt(e)){const r=_s(e,t,n,a);return r&&Zh(r)&&r.catch(l=>{pu(l,t,n)}),r}if(Je(e)){const r=[];for(let l=0;l>>1,r=un[a],l=ts(r);l=ts(n)?un.push(e):un.splice(yx(t),0,e),e.flags|=1,Ty()}}function Ty(){ki||(ki=Ay.then(Oy))}function gx(e){Je(e)?Fl.push(...e):or&&e.id===-1?or.splice(Tl+1,0,e):e.flags&1||(Fl.push(e),e.flags|=1),Ty()}function Kp(e,t,n=na+1){for(;nts(n)-ts(a));if(Fl.length=0,or){or.push(...t);return}for(or=t,Tl=0;Tle.id==null?e.flags&2?-1:1/0:e.id;function Oy(e){try{for(na=0;na{a._d&&Si(-1);const l=wi(t);let o;try{o=e(...r)}finally{wi(l),a._d&&Si(1)}return o};return a._n=!0,a._c=!0,a._d=!0,a}function Rn(e,t){if(Jt===null)return e;const n=gu(Jt),a=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&nt(t)?t.call(a&&a.proxy):t}}const bx=Symbol.for("v-scx"),_x=()=>it(bx);function Sn(e,t){return vu(e,null,t)}function Iy(e,t){return vu(e,null,{flush:"post"})}function Ne(e,t,n){return vu(e,t,n)}function vu(e,t,n=wt){const{immediate:a,deep:r,flush:l,once:o}=n,i=Ft({},n),u=t&&a||!t&&l!=="post";let d;if(ls){if(l==="sync"){const v=_x();d=v.__watcherHandles||(v.__watcherHandles=[])}else if(!u){const v=()=>{};return v.stop=ca,v.resume=ca,v.pause=ca,v}}const c=an;i.call=(v,y,x)=>Pn(v,c,y,x);let f=!1;l==="post"?i.scheduler=v=>{sn(v,c&&c.suspense)}:l!=="sync"&&(f=!0,i.scheduler=(v,y)=>{y?v():of(v)}),i.augmentJob=v=>{t&&(v.flags|=4),f&&(v.flags|=2,c&&(v.id=c.uid,v.i=c))};const m=mx(e,t,i);return ls&&(d?d.push(m):u&&m()),m}function xx(e,t,n){const a=this.proxy,r=St(e)?e.includes(".")?Py(a,e):()=>a[e]:e.bind(a,a);let l;nt(t)?l=t:(l=t.handler,n=t);const o=xs(this),i=vu(r,l.bind(a),n);return o(),i}function Py(e,t){const n=t.split(".");return()=>{let a=e;for(let r=0;re.__isTeleport,Jr=e=>e&&(e.disabled||e.disabled===""),wx=e=>e&&(e.defer||e.defer===""),Wp=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gp=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,sd=(e,t)=>{const n=e&&e.to;return St(n)?t?t(n):null:n},$x={name:"Teleport",__isTeleport:!0,process(e,t,n,a,r,l,o,i,u,d){const{mc:c,pc:f,pbc:m,o:{insert:v,querySelector:y,createText:x,createComment:C,parentNode:k}}=d,E=Jr(t.props);let{dynamicChildren:B}=t;const O=(R,H,S)=>{R.shapeFlag&16&&c(R.children,H,S,r,l,o,i,u)},T=(R=t)=>{const H=Jr(R.props),S=R.target=sd(R.props,y),I=id(S,R,x,v);S&&(o!=="svg"&&Wp(S)?o="svg":o!=="mathml"&&Gp(S)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(S),H||(O(R,S,I),Io(R,!1)))},P=R=>{const H=()=>{if(ar.get(R)===H){if(ar.delete(R),Jr(R.props)){const S=k(R.el)||n;O(R,S,R.anchor),Io(R,!0)}T(R)}};ar.set(R,H),sn(H,l)};if(e==null){const R=t.el=x(""),H=t.anchor=x("");if(v(R,n,a),v(H,n,a),wx(t.props)||l&&l.pendingBranch){P(t);return}E&&(O(t,n,H),Io(t,!0)),T()}else{t.el=e.el;const R=t.anchor=e.anchor,H=ar.get(e);if(H){H.flags|=8,ar.delete(e),P(t);return}t.targetStart=e.targetStart;const S=t.target=e.target,I=t.targetAnchor=e.targetAnchor,z=Jr(e.props),D=z?n:S,N=z?R:I;if(o==="svg"||Wp(S)?o="svg":(o==="mathml"||Gp(S))&&(o="mathml"),B?(m(e.dynamicChildren,B,D,r,l,o,i),df(e,t,!0)):u||f(e,t,D,N,r,l,o,i,!1),E)z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):js(t,n,R,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const X=t.target=sd(t.props,y);X&&js(t,X,null,d,0)}else z&&js(t,S,I,d,1);Io(t,E)}},remove(e,t,n,{um:a,o:{remove:r}},l){const{shapeFlag:o,children:i,anchor:u,targetStart:d,targetAnchor:c,target:f,props:m}=e,v=l||!Jr(m),y=ar.get(e);if(y&&(y.flags|=8,ar.delete(e)),f&&(r(d),r(c)),l&&r(u),!y&&o&16)for(let x=0;x{e.isMounted=!0}),Et(()=>{e.isUnmounting=!0}),e}const An=[Function,Array],Ax={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:An,onEnter:An,onAfterEnter:An,onEnterCancelled:An,onBeforeLeave:An,onLeave:An,onAfterLeave:An,onLeaveCancelled:An,onBeforeAppear:An,onAppear:An,onAfterAppear:An,onAppearCancelled:An};function Tx(e,t){const{leavingVNodes:n}=e;let a=n.get(t.type);return a||(a=Object.create(null),n.set(t.type,a)),a}function ud(e,t,n,a,r){const{appear:l,mode:o,persisted:i=!1,onBeforeEnter:u,onEnter:d,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:m,onLeave:v,onAfterLeave:y,onLeaveCancelled:x,onBeforeAppear:C,onAppear:k,onAfterAppear:E,onAppearCancelled:B}=t,O=String(e.key),T=Tx(n,e),P=(S,I)=>{S&&Pn(S,a,9,I)},R=(S,I)=>{const z=I[1];P(S,I),Je(S)?S.every(D=>D.length<=1)&&z():S.length<=1&&z()},H={mode:o,persisted:i,beforeEnter(S){let I=u;if(!n.isMounted)if(l)I=C||u;else return;S[aa]&&S[aa](!0);const z=T[O];z&&Dl(e,z)&&z.el[aa]&&z.el[aa](),P(I,[S])},enter(S){if(T[O]===e)return;let I=d,z=c,D=f;if(!n.isMounted)if(l)I=k||d,z=E||c,D=B||f;else return;let N=!1;S[go]=W=>{N||(N=!0,W?P(D,[S]):P(z,[S]),H.delayedLeave&&H.delayedLeave(),S[go]=void 0)};const X=S[go].bind(null,!1);I?R(I,[S,X]):X()},leave(S,I){const z=String(e.key);if(S[go]&&S[go](!0),n.isUnmounting)return I();P(m,[S]);let D=!1;S[aa]=X=>{D||(D=!0,I(),X?P(x,[S]):P(y,[S]),S[aa]=void 0,T[z]===e&&delete T[z])};const N=S[aa].bind(null,!1);T[z]=e,v?R(v,[S,N]):N()},clone(S){return ud(S,t,n,a)}};return H}function ns(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ns(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function qy(e,t=!1,n){let a=[],r=0;for(let l=0;l1)for(let l=0;ljo(x,t&&(Je(t)?t[C]:t),n,a,r));return}if(Vl(a)&&!r){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&jo(e,t,n,a.component.subTree);return}const l=a.shapeFlag&4?gu(a.component):a.el,o=r?null:l,{i,r:u}=e,d=t&&t.r,c=i.refs===wt?i.refs={}:i.refs,f=i.setupState,m=pt(f),v=f===wt?Jh:x=>Yp(c,x)?!1:bt(m,x),y=(x,C)=>!(C&&Yp(c,C));if(d!=null&&d!==u){if(Jp(t),St(d))c[d]=null,v(d)&&(f[d]=null);else if(Dt(d)){const x=t;y(d,x.k)&&(d.value=null),x.k&&(c[x.k]=null)}}if(nt(u))_s(u,i,12,[o,c]);else{const x=St(u),C=Dt(u);if(x||C){const k=()=>{if(e.f){const E=x?v(u)?f[u]:c[u]:y()||!e.k?u.value:c[e.k];if(r)Je(E)&&ef(E,l);else if(Je(E))E.includes(l)||E.push(l);else if(x)c[u]=[l],v(u)&&(f[u]=c[u]);else{const B=[l];y(u,e.k)&&(u.value=B),e.k&&(c[e.k]=B)}}else x?(c[u]=o,v(u)&&(f[u]=o)):C&&(y(u,e.k)&&(u.value=o),e.k&&(c[e.k]=o))};if(o){const E=()=>{k(),$i.delete(e)};E.id=-1,$i.set(e,E),sn(E,n)}else Jp(e),k()}}}function Jp(e){const t=$i.get(e);t&&(t.flags|=8,$i.delete(e))}su().requestIdleCallback;su().cancelIdleCallback;const Vl=e=>!!e.type.__asyncLoader,By=e=>e.type.__isKeepAlive;function Fy(e,t){zy(e,"a",t)}function Vy(e,t){zy(e,"da",t)}function zy(e,t,n=an){const a=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(mu(t,a,n),n){let r=n.parent;for(;r&&r.parent;)By(r.parent.vnode)&&Dx(a,t,n,r),r=r.parent}}function Dx(e,t,n,a){const r=mu(t,e,a,!0);ja(()=>{ef(a[t],r)},n)}function mu(e,t,n=an,a=!1){if(n){const r=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...o)=>{Ra();const i=xs(n),u=Pn(t,n,e,o);return i(),qa(),u});return a?r.unshift(l):r.push(l),l}}const za=e=>(t,n=an)=>{(!ls||e==="sp")&&mu(e,(...a)=>t(...a),n)},jy=za("bm"),xt=za("m"),Ox=za("bu"),sf=za("u"),Et=za("bum"),ja=za("um"),Mx=za("sp"),Ix=za("rtg"),Px=za("rtc");function Rx(e,t=an){mu("ec",e,t)}const Uy="components";function qx(e,t){return Ky(Uy,e,!0,t)||e}const Hy=Symbol.for("v-ndc");function Kt(e){return St(e)?Ky(Uy,e,!1)||e:e||Hy}function Ky(e,t,n=!0,a=!1){const r=Jt||an;if(r){const l=r.type;{const i=gk(l,!1);if(i&&(i===t||i===Zt(t)||i===ou(Zt(t))))return l}const o=Zp(r[e]||l[e],t)||Zp(r.appContext[e],t);return!o&&a?l:o}}function Zp(e,t){return e&&(e[t]||e[Zt(t)]||e[ou(Zt(t))])}function Me(e,t,n,a){let r;const l=n,o=Je(e);if(o||St(e)){const i=o&&nl(e);let u=!1,d=!1;i&&(u=!$n(e),d=La(e),e=uu(e)),r=new Array(e.length);for(let c=0,f=e.length;ct(i,u,void 0,l));else{const i=Object.keys(e);r=new Array(i.length);for(let u=0,d=i.length;u0;return t!=="default"&&(n.name=t),p(),U(ve,null,[L("slot",n,a&&a())],d?-2:64)}let l=e[t];l&&l._c&&(l._d=!1),p();const o=l&&Wy(l(n)),i=n.key||o&&o.key,u=U(ve,{key:(i&&!Cn(i)?i:`_${t}`)+(!o&&a?"_fb":"")},o||(a?a():[]),o&&e._===1?64:-2);return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),l&&l._c&&(l._d=!0),u}function Wy(e){return e.some(t=>rs(t)?!(t.type===Un||t.type===ve&&!Wy(t.children)):!0)?e:null}function Gy(e,t){const n={};for(const a in e)n[Fo(a)]=e[a];return n}const cd=e=>e?vg(e)?gu(e):cd(e.parent):null,Uo=Ft(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>cd(e.parent),$root:e=>cd(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Zy(e),$forceUpdate:e=>e.f||(e.f=()=>{of(e.update)}),$nextTick:e=>e.n||(e.n=He.bind(e.proxy)),$watch:e=>xx.bind(e)}),rc=(e,t)=>e!==wt&&!e.__isScriptSetup&&bt(e,t),Lx={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:a,data:r,props:l,accessCache:o,type:i,appContext:u}=e;if(t[0]!=="$"){const m=o[t];if(m!==void 0)switch(m){case 1:return a[t];case 2:return r[t];case 4:return n[t];case 3:return l[t]}else{if(rc(a,t))return o[t]=1,a[t];if(r!==wt&&bt(r,t))return o[t]=2,r[t];if(bt(l,t))return o[t]=3,l[t];if(n!==wt&&bt(n,t))return o[t]=4,n[t];fd&&(o[t]=0)}}const d=Uo[t];let c,f;if(d)return t==="$attrs"&&nn(e.attrs,"get",""),d(e);if((c=i.__cssModules)&&(c=c[t]))return c;if(n!==wt&&bt(n,t))return o[t]=4,n[t];if(f=u.config.globalProperties,bt(f,t))return f[t]},set({_:e},t,n){const{data:a,setupState:r,ctx:l}=e;return rc(r,t)?(r[t]=n,!0):a!==wt&&bt(a,t)?(a[t]=n,!0):bt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:a,appContext:r,props:l,type:o}},i){let u;return!!(n[i]||e!==wt&&i[0]!=="$"&&bt(e,i)||rc(t,i)||bt(l,i)||bt(a,i)||bt(Uo,i)||bt(r.config.globalProperties,i)||(u=o.__cssModules)&&u[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:bt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function dd(e){return Je(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Yy(e,t){const n=dd(e);for(const a in t){if(a.startsWith("__skip"))continue;let r=n[a];r?Je(r)||nt(r)?r=n[a]={type:r,default:t[a]}:r.default=t[a]:r===null&&(r=n[a]={default:t[a]}),r&&t[`__skip_${a}`]&&(r.skipFactory=!0)}return n}let fd=!0;function Nx(e){const t=Zy(e),n=e.proxy,a=e.ctx;fd=!1,t.beforeCreate&&Xp(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:o,watch:i,provide:u,inject:d,created:c,beforeMount:f,mounted:m,beforeUpdate:v,updated:y,activated:x,deactivated:C,beforeDestroy:k,beforeUnmount:E,destroyed:B,unmounted:O,render:T,renderTracked:P,renderTriggered:R,errorCaptured:H,serverPrefetch:S,expose:I,inheritAttrs:z,components:D,directives:N,filters:X}=t;if(d&&Bx(d,a,null),o)for(const ae in o){const se=o[ae];nt(se)&&(a[ae]=se.bind(n))}if(r){const ae=r.call(n,n);yt(ae)&&(e.data=zn(ae))}if(fd=!0,l)for(const ae in l){const se=l[ae],he=nt(se)?se.bind(n,n):nt(se.get)?se.get.bind(n,n):ca,ge=!nt(se)&&nt(se.set)?se.set.bind(n):ca,oe=_({get:he,set:ge});Object.defineProperty(a,ae,{enumerable:!0,configurable:!0,get:()=>oe.value,set:Z=>oe.value=Z})}if(i)for(const ae in i)Jy(i[ae],a,n,ae);if(u){const ae=nt(u)?u.call(n):u;Reflect.ownKeys(ae).forEach(se=>{vt(se,ae[se])})}c&&Xp(c,e,"c");function K(ae,se){Je(se)?se.forEach(he=>ae(he.bind(n))):se&&ae(se.bind(n))}if(K(jy,f),K(xt,m),K(Ox,v),K(sf,y),K(Fy,x),K(Vy,C),K(Rx,H),K(Px,P),K(Ix,R),K(Et,E),K(ja,O),K(Mx,S),Je(I))if(I.length){const ae=e.exposed||(e.exposed={});I.forEach(se=>{Object.defineProperty(ae,se,{get:()=>n[se],set:he=>n[se]=he,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===ca&&(e.render=T),z!=null&&(e.inheritAttrs=z),D&&(e.components=D),N&&(e.directives=N),S&&Ny(e)}function Bx(e,t,n=ca){Je(e)&&(e=pd(e));for(const a in e){const r=e[a];let l;yt(r)?"default"in r?l=it(r.from||a,r.default,!0):l=it(r.from||a):l=it(r),Dt(l)?Object.defineProperty(t,a,{enumerable:!0,configurable:!0,get:()=>l.value,set:o=>l.value=o}):t[a]=l}}function Xp(e,t,n){Pn(Je(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,n)}function Jy(e,t,n,a){let r=a.includes(".")?Py(n,a):()=>n[a];if(St(e)){const l=t[e];nt(l)&&Ne(r,l)}else if(nt(e))Ne(r,e.bind(n));else if(yt(e))if(Je(e))e.forEach(l=>Jy(l,t,n,a));else{const l=nt(e.handler)?e.handler.bind(n):t[e.handler];nt(l)&&Ne(r,l,e)}}function Zy(e){const t=e.type,{mixins:n,extends:a}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:o}}=e.appContext,i=l.get(t);let u;return i?u=i:!r.length&&!n&&!a?u=t:(u={},r.length&&r.forEach(d=>Ci(u,d,o,!0)),Ci(u,t,o)),yt(t)&&l.set(t,u),u}function Ci(e,t,n,a=!1){const{mixins:r,extends:l}=t;l&&Ci(e,l,n,!0),r&&r.forEach(o=>Ci(e,o,n,!0));for(const o in t)if(!(a&&o==="expose")){const i=Fx[o]||n&&n[o];e[o]=i?i(e[o],t[o]):t[o]}return e}const Fx={data:Qp,props:ev,emits:ev,methods:Po,computed:Po,beforeCreate:on,created:on,beforeMount:on,mounted:on,beforeUpdate:on,updated:on,beforeDestroy:on,beforeUnmount:on,destroyed:on,unmounted:on,activated:on,deactivated:on,errorCaptured:on,serverPrefetch:on,components:Po,directives:Po,watch:zx,provide:Qp,inject:Vx};function Qp(e,t){return t?e?function(){return Ft(nt(e)?e.call(this,this):e,nt(t)?t.call(this,this):t)}:t:e}function Vx(e,t){return Po(pd(e),pd(t))}function pd(e){if(Je(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Zt(t)}Modifiers`]||e[`${Ar(t)}Modifiers`];function Kx(e,t,...n){if(e.isUnmounted)return;const a=e.vnode.props||wt;let r=n;const l=t.startsWith("update:"),o=l&&Hx(a,t.slice(7));o&&(o.trim&&(r=n.map(c=>St(c)?c.trim():c)),o.number&&(r=n.map(tf)));let i,u=a[i=Fo(t)]||a[i=Fo(Zt(t))];!u&&l&&(u=a[i=Fo(Ar(t))]),u&&Pn(u,e,6,r);const d=a[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Pn(d,e,6,r)}}const Wx=new WeakMap;function Qy(e,t,n=!1){const a=n?Wx:t.emitsCache,r=a.get(e);if(r!==void 0)return r;const l=e.emits;let o={},i=!1;if(!nt(e)){const u=d=>{const c=Qy(d,t,!0);c&&(i=!0,Ft(o,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!l&&!i?(yt(e)&&a.set(e,null),null):(Je(l)?l.forEach(u=>o[u]=null):Ft(o,l),yt(e)&&a.set(e,o),o)}function hu(e,t){return!e||!tu(t)?!1:(t=t.slice(2).replace(/Once$/,""),bt(e,t[0].toLowerCase()+t.slice(1))||bt(e,Ar(t))||bt(e,t))}function tv(e){const{type:t,vnode:n,proxy:a,withProxy:r,propsOptions:[l],slots:o,attrs:i,emit:u,render:d,renderCache:c,props:f,data:m,setupState:v,ctx:y,inheritAttrs:x}=e,C=wi(e);let k,E;try{if(n.shapeFlag&4){const O=r||a,T=O;k=la(d.call(T,O,c,f,v,m,y)),E=i}else{const O=t;k=la(O.length>1?O(f,{attrs:i,slots:o,emit:u}):O(f,null)),E=t.props?i:Gx(i)}}catch(O){Ho.length=0,pu(O,e,1),k=L(Un)}let B=k;if(E&&x!==!1){const O=Object.keys(E),{shapeFlag:T}=B;O.length&&T&7&&(l&&O.some(nu)&&(E=Yx(E,l)),B=mr(B,E,!1,!0))}return n.dirs&&(B=mr(B,null,!1,!0),B.dirs=B.dirs?B.dirs.concat(n.dirs):n.dirs),n.transition&&ns(B,n.transition),k=B,wi(C),k}const Gx=e=>{let t;for(const n in e)(n==="class"||n==="style"||tu(n))&&((t||(t={}))[n]=e[n]);return t},Yx=(e,t)=>{const n={};for(const a in e)(!nu(a)||!(a.slice(9)in t))&&(n[a]=e[a]);return n};function Jx(e,t,n){const{props:a,children:r,component:l}=e,{props:o,children:i,patchFlag:u}=t,d=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return a?nv(a,o,d):!!o;if(u&8){const c=t.dynamicProps;for(let f=0;fObject.create(tg),ag=e=>Object.getPrototypeOf(e)===tg;function Xx(e,t,n,a=!1){const r={},l=ng();e.propsDefaults=Object.create(null),rg(e,t,r,l);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=a?r:$y(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Qx(e,t,n,a){const{props:r,attrs:l,vnode:{patchFlag:o}}=e,i=pt(r),[u]=e.propsOptions;let d=!1;if((a||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f{u=!0;const[m,v]=lg(f,t,!0);Ft(o,m),v&&i.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!l&&!u)return yt(e)&&a.set(e,Nl),Nl;if(Je(l))for(let c=0;ce==="_"||e==="_ctx"||e==="$stable",cf=e=>Je(e)?e.map(la):[la(e)],tk=(e,t,n)=>{if(t._n)return t;const a=F((...r)=>cf(t(...r)),n);return a._c=!1,a},og=(e,t,n)=>{const a=e._ctx;for(const r in e){if(uf(r))continue;const l=e[r];if(nt(l))t[r]=tk(r,l,a);else if(l!=null){const o=cf(l);t[r]=()=>o}}},sg=(e,t)=>{const n=cf(t);e.slots.default=()=>n},ig=(e,t,n)=>{for(const a in t)(n||!uf(a))&&(e[a]=t[a])},nk=(e,t,n)=>{const a=e.slots=ng();if(e.vnode.shapeFlag&32){const r=t._;r?(ig(a,t,n),n&&ey(a,"_",r,!0)):og(t,a)}else t&&sg(e,t)},ak=(e,t,n)=>{const{vnode:a,slots:r}=e;let l=!0,o=wt;if(a.shapeFlag&32){const i=t._;i?n&&i===1?l=!1:ig(r,t,n):(l=!t.$stable,og(t,r)),o=t}else t&&(sg(e,t),o={default:1});if(l)for(const i in r)!uf(i)&&o[i]==null&&delete r[i]},sn=ik;function rk(e){return lk(e)}function lk(e,t){const n=su();n.__VUE__=!0;const{insert:a,remove:r,patchProp:l,createElement:o,createText:i,createComment:u,setText:d,setElementText:c,parentNode:f,nextSibling:m,setScopeId:v=ca,insertStaticContent:y}=e,x=(w,M,q,ie=null,te=null,fe=null,Ee=void 0,Se=null,Te=!!M.dynamicChildren)=>{if(w===M)return;w&&!Dl(w,M)&&(ie=Y(w),Z(w,te,fe,!0),w=null),M.patchFlag===-2&&(Te=!1,M.dynamicChildren=null);const{type:de,ref:$e,shapeFlag:ke}=M;switch(de){case yu:C(w,M,q,ie);break;case Un:k(w,M,q,ie);break;case oc:w==null&&E(M,q,ie,Ee);break;case ve:D(w,M,q,ie,te,fe,Ee,Se,Te);break;default:ke&1?T(w,M,q,ie,te,fe,Ee,Se,Te):ke&6?N(w,M,q,ie,te,fe,Ee,Se,Te):(ke&64||ke&128)&&de.process(w,M,q,ie,te,fe,Ee,Se,Te,ee)}$e!=null&&te?jo($e,w&&w.ref,fe,M||w,!M):$e==null&&w&&w.ref!=null&&jo(w.ref,null,fe,w,!0)},C=(w,M,q,ie)=>{if(w==null)a(M.el=i(M.children),q,ie);else{const te=M.el=w.el;M.children!==w.children&&d(te,M.children)}},k=(w,M,q,ie)=>{w==null?a(M.el=u(M.children||""),q,ie):M.el=w.el},E=(w,M,q,ie)=>{[w.el,w.anchor]=y(w.children,M,q,ie,w.el,w.anchor)},B=({el:w,anchor:M},q,ie)=>{let te;for(;w&&w!==M;)te=m(w),a(w,q,ie),w=te;a(M,q,ie)},O=({el:w,anchor:M})=>{let q;for(;w&&w!==M;)q=m(w),r(w),w=q;r(M)},T=(w,M,q,ie,te,fe,Ee,Se,Te)=>{if(M.type==="svg"?Ee="svg":M.type==="math"&&(Ee="mathml"),w==null)P(M,q,ie,te,fe,Ee,Se,Te);else{const de=w.el&&w.el._isVueCE?w.el:null;try{de&&de._beginPatch(),S(w,M,te,fe,Ee,Se,Te)}finally{de&&de._endPatch()}}},P=(w,M,q,ie,te,fe,Ee,Se)=>{let Te,de;const{props:$e,shapeFlag:ke,transition:Le,dirs:Fe}=w;if(Te=w.el=o(w.type,fe,$e&&$e.is,$e),ke&8?c(Te,w.children):ke&16&&H(w.children,Te,null,ie,te,lc(w,fe),Ee,Se),Fe&&Vr(w,null,ie,"created"),R(Te,w,w.scopeId,Ee,ie),$e){for(const tt in $e)tt!=="value"&&!Bo(tt)&&l(Te,tt,null,$e[tt],fe,ie);"value"in $e&&l(Te,"value",null,$e.value,fe),(de=$e.onVnodeBeforeMount)&&Xn(de,ie,w)}Fe&&Vr(w,null,ie,"beforeMount");const Ke=ok(te,Le);Ke&&Le.beforeEnter(Te),a(Te,M,q),((de=$e&&$e.onVnodeMounted)||Ke||Fe)&&sn(()=>{de&&Xn(de,ie,w),Ke&&Le.enter(Te),Fe&&Vr(w,null,ie,"mounted")},te)},R=(w,M,q,ie,te)=>{if(q&&v(w,q),ie)for(let fe=0;fe{for(let de=Te;de{const Se=M.el=w.el;let{patchFlag:Te,dynamicChildren:de,dirs:$e}=M;Te|=w.patchFlag&16;const ke=w.props||wt,Le=M.props||wt;let Fe;if(q&&zr(q,!1),(Fe=Le.onVnodeBeforeUpdate)&&Xn(Fe,q,M,w),$e&&Vr(M,w,q,"beforeUpdate"),q&&zr(q,!0),(ke.innerHTML&&Le.innerHTML==null||ke.textContent&&Le.textContent==null)&&c(Se,""),de?I(w.dynamicChildren,de,Se,q,ie,lc(M,te),fe):Ee||se(w,M,Se,null,q,ie,lc(M,te),fe,!1),Te>0){if(Te&16)z(Se,ke,Le,q,te);else if(Te&2&&ke.class!==Le.class&&l(Se,"class",null,Le.class,te),Te&4&&l(Se,"style",ke.style,Le.style,te),Te&8){const Ke=M.dynamicProps;for(let tt=0;tt{Fe&&Xn(Fe,q,M,w),$e&&Vr(M,w,q,"updated")},ie)},I=(w,M,q,ie,te,fe,Ee)=>{for(let Se=0;Se{if(M!==q){if(M!==wt)for(const fe in M)!Bo(fe)&&!(fe in q)&&l(w,fe,M[fe],null,te,ie);for(const fe in q){if(Bo(fe))continue;const Ee=q[fe],Se=M[fe];Ee!==Se&&fe!=="value"&&l(w,fe,Se,Ee,te,ie)}"value"in q&&l(w,"value",M.value,q.value,te)}},D=(w,M,q,ie,te,fe,Ee,Se,Te)=>{const de=M.el=w?w.el:i(""),$e=M.anchor=w?w.anchor:i("");let{patchFlag:ke,dynamicChildren:Le,slotScopeIds:Fe}=M;Fe&&(Se=Se?Se.concat(Fe):Fe),w==null?(a(de,q,ie),a($e,q,ie),H(M.children||[],q,$e,te,fe,Ee,Se,Te)):ke>0&&ke&64&&Le&&w.dynamicChildren&&w.dynamicChildren.length===Le.length?(I(w.dynamicChildren,Le,q,te,fe,Ee,Se),(M.key!=null||te&&M===te.subTree)&&df(w,M,!0)):se(w,M,q,$e,te,fe,Ee,Se,Te)},N=(w,M,q,ie,te,fe,Ee,Se,Te)=>{M.slotScopeIds=Se,w==null?M.shapeFlag&512?te.ctx.activate(M,q,ie,Ee,Te):X(M,q,ie,te,fe,Ee,Te):W(w,M,Te)},X=(w,M,q,ie,te,fe,Ee)=>{const Se=w.component=pk(w,ie,te);if(By(w)&&(Se.ctx.renderer=ee),vk(Se,!1,Ee),Se.asyncDep){if(te&&te.registerDep(Se,K,Ee),!w.el){const Te=Se.subTree=L(Un);k(null,Te,M,q),w.placeholder=Te.el}}else K(Se,w,M,q,te,fe,Ee)},W=(w,M,q)=>{const ie=M.component=w.component;if(Jx(w,M,q))if(ie.asyncDep&&!ie.asyncResolved){ae(ie,M,q);return}else ie.next=M,ie.update();else M.el=w.el,ie.vnode=M},K=(w,M,q,ie,te,fe,Ee)=>{const Se=()=>{if(w.isMounted){let{next:ke,bu:Le,u:Fe,parent:Ke,vnode:tt}=w;{const Ot=ug(w);if(Ot){ke&&(ke.el=tt.el,ae(w,ke,Ee)),Ot.asyncDep.then(()=>{sn(()=>{w.isUnmounted||de()},te)});return}}let et=ke,ot;zr(w,!1),ke?(ke.el=tt.el,ae(w,ke,Ee)):ke=tt,Le&&di(Le),(ot=ke.props&&ke.props.onVnodeBeforeUpdate)&&Xn(ot,Ke,ke,tt),zr(w,!0);const rt=tv(w),Tt=w.subTree;w.subTree=rt,x(Tt,rt,f(Tt.el),Y(Tt),w,te,fe),ke.el=rt.el,et===null&&Zx(w,rt.el),Fe&&sn(Fe,te),(ot=ke.props&&ke.props.onVnodeUpdated)&&sn(()=>Xn(ot,Ke,ke,tt),te)}else{let ke;const{el:Le,props:Fe}=M,{bm:Ke,m:tt,parent:et,root:ot,type:rt}=w,Tt=Vl(M);zr(w,!1),Ke&&di(Ke),!Tt&&(ke=Fe&&Fe.onVnodeBeforeMount)&&Xn(ke,et,M),zr(w,!0);{ot.ce&&ot.ce._hasShadowRoot()&&ot.ce._injectChildStyle(rt,w.parent?w.parent.type:void 0);const Ot=w.subTree=tv(w);x(null,Ot,q,ie,w,te,fe),M.el=Ot.el}if(tt&&sn(tt,te),!Tt&&(ke=Fe&&Fe.onVnodeMounted)){const Ot=M;sn(()=>Xn(ke,et,Ot),te)}(M.shapeFlag&256||et&&Vl(et.vnode)&&et.vnode.shapeFlag&256)&&w.a&&sn(w.a,te),w.isMounted=!0,M=q=ie=null}};w.scope.on();const Te=w.effect=new iy(Se);w.scope.off();const de=w.update=Te.run.bind(Te),$e=w.job=Te.runIfDirty.bind(Te);$e.i=w,$e.id=w.uid,Te.scheduler=()=>of($e),zr(w,!0),de()},ae=(w,M,q)=>{M.component=w;const ie=w.vnode.props;w.vnode=M,w.next=null,Qx(w,M.props,ie,q),ak(w,M.children,q),Ra(),Kp(w),qa()},se=(w,M,q,ie,te,fe,Ee,Se,Te=!1)=>{const de=w&&w.children,$e=w?w.shapeFlag:0,ke=M.children,{patchFlag:Le,shapeFlag:Fe}=M;if(Le>0){if(Le&128){ge(de,ke,q,ie,te,fe,Ee,Se,Te);return}else if(Le&256){he(de,ke,q,ie,te,fe,Ee,Se,Te);return}}Fe&8?($e&16&&_e(de,te,fe),ke!==de&&c(q,ke)):$e&16?Fe&16?ge(de,ke,q,ie,te,fe,Ee,Se,Te):_e(de,te,fe,!0):($e&8&&c(q,""),Fe&16&&H(ke,q,ie,te,fe,Ee,Se,Te))},he=(w,M,q,ie,te,fe,Ee,Se,Te)=>{w=w||Nl,M=M||Nl;const de=w.length,$e=M.length,ke=Math.min(de,$e);let Le;for(Le=0;Le$e?_e(w,te,fe,!0,!1,ke):H(M,q,ie,te,fe,Ee,Se,Te,ke)},ge=(w,M,q,ie,te,fe,Ee,Se,Te)=>{let de=0;const $e=M.length;let ke=w.length-1,Le=$e-1;for(;de<=ke&&de<=Le;){const Fe=w[de],Ke=M[de]=Te?$a(M[de]):la(M[de]);if(Dl(Fe,Ke))x(Fe,Ke,q,null,te,fe,Ee,Se,Te);else break;de++}for(;de<=ke&&de<=Le;){const Fe=w[ke],Ke=M[Le]=Te?$a(M[Le]):la(M[Le]);if(Dl(Fe,Ke))x(Fe,Ke,q,null,te,fe,Ee,Se,Te);else break;ke--,Le--}if(de>ke){if(de<=Le){const Fe=Le+1,Ke=Fe<$e?M[Fe].el:ie;for(;de<=Le;)x(null,M[de]=Te?$a(M[de]):la(M[de]),q,Ke,te,fe,Ee,Se,Te),de++}}else if(de>Le)for(;de<=ke;)Z(w[de],te,fe,!0),de++;else{const Fe=de,Ke=de,tt=new Map;for(de=Ke;de<=Le;de++){const Ve=M[de]=Te?$a(M[de]):la(M[de]);Ve.key!=null&&tt.set(Ve.key,de)}let et,ot=0;const rt=Le-Ke+1;let Tt=!1,Ot=0;const zt=new Array(rt);for(de=0;de=rt){Z(Ve,te,fe,!0);continue}let We;if(Ve.key!=null)We=tt.get(Ve.key);else for(et=Ke;et<=Le;et++)if(zt[et-Ke]===0&&Dl(Ve,M[et])){We=et;break}We===void 0?Z(Ve,te,fe,!0):(zt[We-Ke]=de+1,We>=Ot?Ot=We:Tt=!0,x(Ve,M[We],q,null,te,fe,Ee,Se,Te),ot++)}const ze=Tt?sk(zt):Nl;for(et=ze.length-1,de=rt-1;de>=0;de--){const Ve=Ke+de,We=M[Ve],Nt=M[Ve+1],rn=Ve+1<$e?Nt.el||cg(Nt):ie;zt[de]===0?x(null,We,q,rn,te,fe,Ee,Se,Te):Tt&&(et<0||de!==ze[et]?oe(We,q,rn,2):et--)}}},oe=(w,M,q,ie,te=null)=>{const{el:fe,type:Ee,transition:Se,children:Te,shapeFlag:de}=w;if(de&6){oe(w.component.subTree,M,q,ie);return}if(de&128){w.suspense.move(M,q,ie);return}if(de&64){Ee.move(w,M,q,ee);return}if(Ee===ve){a(fe,M,q);for(let ke=0;keSe.enter(fe),te));else{const{leave:ke,delayLeave:Le,afterLeave:Fe}=Se,Ke=()=>{w.ctx.isUnmounted?r(fe):a(fe,M,q)},tt=()=>{const et=fe._isLeaving||!!fe[aa];fe._isLeaving&&fe[aa](!0),Se.persisted&&!et?Ke():ke(fe,()=>{Ke(),Fe&&Fe()})};Le?Le(fe,Ke,tt):tt()}else a(fe,M,q)},Z=(w,M,q,ie=!1,te=!1)=>{const{type:fe,props:Ee,ref:Se,children:Te,dynamicChildren:de,shapeFlag:$e,patchFlag:ke,dirs:Le,cacheIndex:Fe,memo:Ke}=w;if(ke===-2&&(te=!1),Se!=null&&(Ra(),jo(Se,null,q,w,!0),qa()),Fe!=null&&(M.renderCache[Fe]=void 0),$e&256){M.ctx.deactivate(w);return}const tt=$e&1&&Le,et=!Vl(w);let ot;if(et&&(ot=Ee&&Ee.onVnodeBeforeUnmount)&&Xn(ot,M,w),$e&6)xe(w.component,q,ie);else{if($e&128){w.suspense.unmount(q,ie);return}tt&&Vr(w,null,M,"beforeUnmount"),$e&64?w.type.remove(w,M,q,ee,ie):de&&!de.hasOnce&&(fe!==ve||ke>0&&ke&64)?_e(de,M,q,!1,!0):(fe===ve&&ke&384||!te&&$e&16)&&_e(Te,M,q),ie&&ue(w)}const rt=Ke!=null&&Fe==null;(et&&(ot=Ee&&Ee.onVnodeUnmounted)||tt||rt)&&sn(()=>{ot&&Xn(ot,M,w),tt&&Vr(w,null,M,"unmounted"),rt&&(w.el=null)},q)},ue=w=>{const{type:M,el:q,anchor:ie,transition:te}=w;if(M===ve){j(q,ie);return}if(M===oc){O(w);return}const fe=()=>{r(q),te&&!te.persisted&&te.afterLeave&&te.afterLeave()};if(w.shapeFlag&1&&te&&!te.persisted){const{leave:Ee,delayLeave:Se}=te,Te=()=>Ee(q,fe);Se?Se(w.el,fe,Te):Te()}else fe()},j=(w,M)=>{let q;for(;w!==M;)q=m(w),r(w),w=q;r(M)},xe=(w,M,q)=>{const{bum:ie,scope:te,job:fe,subTree:Ee,um:Se,m:Te,a:de}=w;rv(Te),rv(de),ie&&di(ie),te.stop(),fe&&(fe.flags|=8,Z(Ee,w,M,q)),Se&&sn(Se,M),sn(()=>{w.isUnmounted=!0},M)},_e=(w,M,q,ie=!1,te=!1,fe=0)=>{for(let Ee=fe;Ee{if(w.shapeFlag&6)return Y(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const M=m(w.anchor||w.el),q=M&&M[Ry];return q?m(q):M};let me=!1;const J=(w,M,q)=>{let ie;w==null?M._vnode&&(Z(M._vnode,null,null,!0),ie=M._vnode.component):x(M._vnode||null,w,M,null,null,null,q),M._vnode=w,me||(me=!0,Kp(ie),Dy(),me=!1)},ee={p:x,um:Z,m:oe,r:ue,mt:X,mc:H,pc:se,pbc:I,n:Y,o:e};return{render:J,hydrate:void 0,createApp:Ux(J)}}function lc({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function zr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ok(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function df(e,t,n=!1){const a=e.children,r=t.children;if(Je(a)&&Je(r))for(let l=0;l>1,e[n[i]]0&&(t[a]=n[l-1]),n[l]=a)}}for(l=n.length,o=n[l-1];l-- >0;)n[l]=o,o=t[o];return n}function ug(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ug(t)}function rv(e){if(e)for(let t=0;te.__isSuspense;function ik(e,t){t&&t.pendingBranch?Je(e)?t.effects.push(...e):t.effects.push(e):gx(e)}const ve=Symbol.for("v-fgt"),yu=Symbol.for("v-txt"),Un=Symbol.for("v-cmt"),oc=Symbol.for("v-stc"),Ho=[];let kn=null;function p(e=!1){Ho.push(kn=e?null:[])}function uk(){Ho.pop(),kn=Ho[Ho.length-1]||null}let as=1;function Si(e,t=!1){as+=e,e<0&&kn&&t&&(kn.hasOnce=!0)}function fg(e){return e.dynamicChildren=as>0?kn||Nl:null,uk(),as>0&&kn&&kn.push(e),e}function g(e,t,n,a,r,l){return fg(b(e,t,n,a,r,l,!0))}function U(e,t,n,a,r){return fg(L(e,t,n,a,r,!0))}function rs(e){return e?e.__v_isVNode===!0:!1}function Dl(e,t){return e.type===t.type&&e.key===t.key}const pg=({key:e})=>e??null,fi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?St(e)||Dt(e)||nt(e)?{i:Jt,r:e,k:t,f:!!n}:e:null);function b(e,t=null,n=null,a=0,r=null,l=e===ve?0:1,o=!1,i=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pg(t),ref:t&&fi(t),scopeId:My,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:a,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Jt};return i?(ff(u,n),l&128&&e.normalize(u)):n&&(u.shapeFlag|=St(n)?8:16),as>0&&!o&&kn&&(u.patchFlag>0||l&6)&&u.patchFlag!==32&&kn.push(u),u}const L=ck;function ck(e,t=null,n=null,a=0,r=null,l=!1){if((!e||e===Hy)&&(e=Un),rs(e)){const i=mr(e,t,!0);return n&&ff(i,n),as>0&&!l&&kn&&(i.shapeFlag&6?kn[kn.indexOf(e)]=i:kn.push(i)),i.patchFlag=-2,i}if(bk(e)&&(e=e.__vccOpts),t){t=ut(t);let{class:i,style:u}=t;i&&!St(i)&&(t.class=pe(i)),yt(u)&&(fu(u)&&!Je(u)&&(u=Ft({},u)),t.style=cn(u))}const o=St(e)?1:dg(e)?128:kx(e)?64:yt(e)?4:nt(e)?2:0;return b(e,t,n,a,r,o,l,!0)}function ut(e){return e?fu(e)||ag(e)?Ft({},e):e:null}function mr(e,t,n=!1,a=!1){const{props:r,ref:l,patchFlag:o,children:i,transition:u}=e,d=t?je(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&pg(d),ref:t&&t.ref?n&&l?Je(l)?l.concat(fi(t)):[l,fi(t)]:fi(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mr(e.ssContent),ssFallback:e.ssFallback&&mr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&a&&ns(c,u.clone(c)),c}function ye(e=" ",t=0){return L(yu,null,e,t)}function G(e="",t=!1){return t?(p(),U(Un,null,e)):L(Un,null,e)}function la(e){return e==null||typeof e=="boolean"?L(Un):Je(e)?L(ve,null,e.slice()):rs(e)?$a(e):L(yu,null,String(e))}function $a(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:mr(e)}function ff(e,t){let n=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(Je(t))n=16;else if(typeof t=="object")if(a&65){const r=t.default;r&&(r._c&&(r._d=!1),ff(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ag(t)?t._ctx=Jt:r===3&&Jt&&(Jt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else nt(t)?(t={default:t,_ctx:Jt},n=32):(t=String(t),a&64?(n=16,t=[ye(t)]):n=8);e.children=t,e.shapeFlag|=n}function je(...e){const t={};for(let n=0;nan||Jt;let Ei,md;{const e=su(),t=(n,a)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(a),l=>{r.length>1?r.forEach(o=>o(l)):r[0](l)}};Ei=t("__VUE_INSTANCE_SETTERS__",n=>an=n),md=t("__VUE_SSR_SETTERS__",n=>ls=n)}const xs=e=>{const t=an;return Ei(e),e.scope.on(),()=>{e.scope.off(),Ei(t)}},lv=()=>{an&&an.scope.off(),Ei(null)};function vg(e){return e.vnode.shapeFlag&4}let ls=!1;function vk(e,t=!1,n=!1){t&&md(t);const{props:a,children:r}=e.vnode,l=vg(e);Xx(e,a,l,t),nk(e,r,n||t);const o=l?mk(e,t):void 0;return t&&md(!1),o}function mk(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Lx);const{setup:a}=n;if(a){Ra();const r=e.setupContext=a.length>1?yk(e):null,l=xs(e),o=_s(a,e,0,[e.props,r]),i=Zh(o);if(qa(),l(),(i||e.sp)&&!Vl(e)&&Ny(e),i){if(o.then(lv,lv),t)return o.then(u=>{ov(e,u)}).catch(u=>{pu(u,e,0)});e.asyncDep=o}else ov(e,o)}else mg(e)}function ov(e,t,n){nt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:yt(t)&&(e.setupState=Sy(t)),mg(e)}function mg(e,t,n){const a=e.type;e.render||(e.render=a.render||ca);{const r=xs(e);Ra();try{Nx(e)}finally{qa(),r()}}}const hk={get(e,t){return nn(e,"get",""),e[t]}};function yk(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,hk),slots:e.slots,emit:e.emit,expose:t}}function gu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Sy(_i(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Uo)return Uo[n](e)},has(t,n){return n in t||n in Uo}})):e.proxy}function gk(e,t=!0){return nt(e)?e.displayName||e.name:e.name||t&&e.__name}function bk(e){return nt(e)&&"__vccOpts"in e}const _=(e,t)=>px(e,t,ls);function In(e,t,n){try{Si(-1);const a=arguments.length;return a===2?yt(t)&&!Je(t)?rs(t)?L(e,null,[t]):L(e,t):L(e,null,t):(a>3?n=Array.prototype.slice.call(arguments,2):a===3&&rs(n)&&(n=[n]),L(e,t,n))}finally{Si(1)}}const _k="3.5.35";let hd;const sv=typeof window<"u"&&window.trustedTypes;if(sv)try{hd=sv.createPolicy("vue",{createHTML:e=>e})}catch{}const hg=hd?e=>hd.createHTML(e):e=>e,xk="http://www.w3.org/2000/svg",kk="http://www.w3.org/1998/Math/MathML",ka=typeof document<"u"?document:null,iv=ka&&ka.createElement("template"),wk={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,a)=>{const r=t==="svg"?ka.createElementNS(xk,e):t==="mathml"?ka.createElementNS(kk,e):n?ka.createElement(e,{is:n}):ka.createElement(e);return e==="select"&&a&&a.multiple!=null&&r.setAttribute("multiple",a.multiple),r},createText:e=>ka.createTextNode(e),createComment:e=>ka.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ka.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,a,r,l){const o=n?n.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===l||!(r=r.nextSibling)););else{iv.innerHTML=hg(a==="svg"?`${e}`:a==="mathml"?`${e}`:e);const i=iv.content;if(a==="svg"||a==="mathml"){const u=i.firstChild;for(;u.firstChild;)i.appendChild(u.firstChild);i.removeChild(u)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Xa="transition",bo="animation",Zl=Symbol("_vtc"),yg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},$k=Ft({},Ax,yg),jr=(e,t=[])=>{Je(e)?e.forEach(n=>n(...t)):e&&e(...t)},uv=e=>e?Je(e)?e.some(t=>t.length>1):e.length>1:!1;function Ck(e){const t={};for(const D in e)D in yg||(t[D]=e[D]);if(e.css===!1)return t;const{name:n="v",type:a,duration:r,enterFromClass:l=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:u=l,appearActiveClass:d=o,appearToClass:c=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,y=Sk(r),x=y&&y[0],C=y&&y[1],{onBeforeEnter:k,onEnter:E,onEnterCancelled:B,onLeave:O,onLeaveCancelled:T,onBeforeAppear:P=k,onAppear:R=E,onAppearCancelled:H=B}=t,S=(D,N,X,W)=>{D._enterCancelled=W,rr(D,N?c:i),rr(D,N?d:o),X&&X()},I=(D,N)=>{D._isLeaving=!1,rr(D,f),rr(D,v),rr(D,m),N&&N()},z=D=>(N,X)=>{const W=D?R:E,K=()=>S(N,D,X);jr(W,[N,K]),cv(()=>{rr(N,D?u:l),ea(N,D?c:i),uv(W)||dv(N,a,x,K)})};return Ft(t,{onBeforeEnter(D){jr(k,[D]),ea(D,l),ea(D,o)},onBeforeAppear(D){jr(P,[D]),ea(D,u),ea(D,d)},onEnter:z(!1),onAppear:z(!0),onLeave(D,N){D._isLeaving=!0;const X=()=>I(D,N);ea(D,f),D._enterCancelled?(ea(D,m),yd(D)):(yd(D),ea(D,m)),cv(()=>{D._isLeaving&&(rr(D,f),ea(D,v),uv(O)||dv(D,a,C,X))}),jr(O,[D,X])},onEnterCancelled(D){S(D,!1,void 0,!0),jr(B,[D])},onAppearCancelled(D){S(D,!0,void 0,!0),jr(H,[D])},onLeaveCancelled(D){I(D),jr(T,[D])}})}function Sk(e){if(e==null)return null;if(yt(e))return[sc(e.enter),sc(e.leave)];{const t=sc(e);return[t,t]}}function sc(e){return M_(e)}function ea(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Zl]||(e[Zl]=new Set)).add(t)}function rr(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const n=e[Zl];n&&(n.delete(t),n.size||(e[Zl]=void 0))}function cv(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ek=0;function dv(e,t,n,a){const r=e._endId=++Ek,l=()=>{r===e._endId&&a()};if(n!=null)return setTimeout(l,n);const{type:o,timeout:i,propCount:u}=gg(e,t);if(!o)return a();const d=o+"end";let c=0;const f=()=>{e.removeEventListener(d,m),l()},m=v=>{v.target===e&&++c>=u&&f()};setTimeout(()=>{c(n[y]||"").split(", "),r=a(`${Xa}Delay`),l=a(`${Xa}Duration`),o=fv(r,l),i=a(`${bo}Delay`),u=a(`${bo}Duration`),d=fv(i,u);let c=null,f=0,m=0;t===Xa?o>0&&(c=Xa,f=o,m=l.length):t===bo?d>0&&(c=bo,f=d,m=u.length):(f=Math.max(o,d),c=f>0?o>d?Xa:bo:null,m=c?c===Xa?l.length:u.length:0);const v=c===Xa&&/\b(?:transform|all)(?:,|$)/.test(a(`${Xa}Property`).toString());return{type:c,timeout:f,propCount:m,hasTransform:v}}function fv(e,t){for(;e.lengthpv(n)+pv(e[a])))}function pv(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function yd(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ak(e,t,n){const a=e[Zl];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ai=Symbol("_vod"),bg=Symbol("_vsh"),Ti={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ai]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):_o(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:a}){!t!=!n&&(a?t?(a.beforeEnter(e),_o(e,!0),a.enter(e)):a.leave(e,()=>{_o(e,!1)}):_o(e,t))},beforeUnmount(e,{value:t}){_o(e,t)}};function _o(e,t){e.style.display=t?e[Ai]:"none",e[bg]=!t}const Tk=Symbol(""),Dk=/(?:^|;)\s*display\s*:/;function Ok(e,t,n){const a=e.style,r=St(n);let l=!1;if(n&&!r){if(t)if(St(t))for(const o of t.split(";")){const i=o.slice(0,o.indexOf(":")).trim();n[i]==null&&Ro(a,i,"")}else for(const o in t)n[o]==null&&Ro(a,o,"");for(const o in n){o==="display"&&(l=!0);const i=n[o];i!=null?Ik(e,o,!St(t)&&t?t[o]:void 0,i)||Ro(a,o,i):Ro(a,o,"")}}else if(r){if(t!==n){const o=a[Tk];o&&(n+=";"+o),a.cssText=n,l=Dk.test(n)}}else t&&e.removeAttribute("style");Ai in e&&(e[Ai]=l?a.display:"",e[bg]&&(a.display="none"))}const vv=/\s*!important$/;function Ro(e,t,n){if(Je(n))n.forEach(a=>Ro(e,t,a));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const a=Mk(e,t);vv.test(n)?e.setProperty(Ar(a),n.replace(vv,""),"important"):e[a]=n}}const mv=["Webkit","Moz","ms"],ic={};function Mk(e,t){const n=ic[t];if(n)return n;let a=Zt(t);if(a!=="filter"&&a in e)return ic[t]=a;a=ou(a);for(let r=0;ruc||(Lk.then(()=>uc=0),uc=Date.now());function Bk(e,t){const n=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=n.attached)return;const r=n.value;if(Je(r)){const l=a.stopImmediatePropagation;a.stopImmediatePropagation=()=>{l.call(a),a._stopped=!0};const o=r.slice(),i=[a];for(let u=0;ue.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fk=(e,t,n,a,r,l)=>{const o=r==="svg";t==="class"?Ak(e,a,o):t==="style"?Ok(e,n,a):tu(t)?nu(t)||Rk(e,t,n,a,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vk(e,t,a,o))?(gv(e,t,a),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yv(e,t,a,o,l,t!=="value")):e._isVueCE&&(zk(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!St(a)))?gv(e,Zt(t),a,l,t):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),yv(e,t,a,o))};function Vk(e,t,n,a){if(a)return!!(t==="innerHTML"||t==="textContent"||t in e&&xv(t)&&nt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return xv(t)&&St(n)?!1:t in e}function zk(e,t){const n=e._def.props;if(!n)return!1;const a=Zt(t);return Array.isArray(n)?n.some(r=>Zt(r)===a):Object.keys(n).some(r=>Zt(r)===a)}const _g=new WeakMap,xg=new WeakMap,Di=Symbol("_moveCb"),kv=Symbol("_enterCb"),jk=e=>(delete e.props.mode,e),Uk=jk({name:"TransitionGroup",props:Ft({},$k,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ma(),a=Ex();let r,l;return sf(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!Yk(r[0].el,n.vnode.el,o)){r=[];return}r.forEach(Kk),r.forEach(Wk);const i=r.filter(Gk);yd(n.vnode.el),i.forEach(u=>{const d=u.el,c=d.style;ea(d,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=d[Di]=m=>{m&&m.target!==d||(!m||m.propertyName.endsWith("transform"))&&(d.removeEventListener("transitionend",f),d[Di]=null,rr(d,o))};d.addEventListener("transitionend",f)}),r=[]}),()=>{const o=pt(e),i=Ck(o);let u=o.tag||ve;if(r=[],l)for(let d=0;d{i.split(/\s+/).forEach(u=>u&&a.classList.remove(u))}),n.split(/\s+/).forEach(i=>i&&a.classList.add(i)),a.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(a);const{hasTransform:o}=gg(a);return l.removeChild(a),o}const Oi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Je(t)?n=>di(t,n):t};function Jk(e){e.target.composing=!0}function wv(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const jl=Symbol("_assign");function $v(e,t,n){return t&&(e=e.trim()),n&&(e=tf(e)),e}const al={created(e,{modifiers:{lazy:t,trim:n,number:a}},r){e[jl]=Oi(r);const l=a||r.props&&r.props.type==="number";Zr(e,t?"change":"input",o=>{o.target.composing||e[jl]($v(e.value,n,l))}),(n||l)&&Zr(e,"change",()=>{e.value=$v(e.value,n,l)}),t||(Zr(e,"compositionstart",Jk),Zr(e,"compositionend",wv),Zr(e,"change",wv))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:a,trim:r,number:l}},o){if(e[jl]=Oi(o),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?tf(e.value):e.value,u=t??"";if(i===u)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(a&&t===n||r&&e.value.trim()===u)||(e.value=u)}},Zk={deep:!0,created(e,t,n){e[jl]=Oi(n),Zr(e,"change",()=>{const a=e._modelValue,r=Xk(e),l=e.checked,o=e[jl];if(Je(a)){const i=ny(a,r),u=i!==-1;if(l&&!u)o(a.concat(r));else if(!l&&u){const d=[...a];d.splice(i,1),o(d)}}else if(au(a)){const i=new Set(a);l?i.add(r):i.delete(r),o(i)}else o(wg(e,l))})},mounted:Cv,beforeUpdate(e,t,n){e[jl]=Oi(n),Cv(e,t,n)}};function Cv(e,{value:t,oldValue:n},a){e._modelValue=t;let r;if(Je(t))r=ny(t,a.props.value)>-1;else if(au(t))r=t.has(a.props.value);else{if(t===n)return;r=bs(t,wg(e,!0))}e.checked!==r&&(e.checked=r)}function Xk(e){return"_value"in e?e._value:e.value}function wg(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Qk=["ctrl","shift","alt","meta"],ew={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Qk.some(n=>e[`${n}Key`]&&!t.includes(n))},mt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),a=t.join(".");return n[a]||(n[a]=((r,...l)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),a=t.join(".");return n[a]||(n[a]=(r=>{if(!("key"in r))return;const l=Ar(r.key);if(t.some(o=>o===l||tw[o]===l))return e(r)}))},nw=Ft({patchProp:Fk},wk);let Sv;function aw(){return Sv||(Sv=rk(nw))}const rw=((...e)=>{const t=aw().createApp(...e),{mount:n}=t;return t.mount=a=>{const r=ow(a);if(!r)return;const l=t._component;!nt(l)&&!l.render&&!l.template&&(l.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,lw(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function lw(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ow(e){return St(e)?document.querySelector(e):e}const Ol=typeof document<"u";function $g(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function sw(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&$g(e.default)}const gt=Object.assign;function cc(e,t){const n={};for(const a in t){const r=t[a];n[a]=Hn(r)?r.map(e):e(r)}return n}const Ko=()=>{},Hn=Array.isArray;function Ev(e,t){const n={};for(const a in e)n[a]=a in t?t[a]:e[a];return n}const Cg=Symbol("");function Xl(e,t){return gt(new Error,{type:e,[Cg]:!0},t)}function ta(e,t){return e instanceof Error&&Cg in e&&(t==null||!!(e.type&t))}const pf=Symbol(""),Av=Symbol(""),bu=Symbol(""),vf=Symbol(""),gd=Symbol("");function ha(){return it(bu)}function yn(e){return it(vf)}const Sg=/#/g,iw=/&/g,uw=/\//g,cw=/=/g,dw=/\?/g,Eg=/\+/g,fw=/%5B/g,pw=/%5D/g,Ag=/%5E/g,vw=/%60/g,Tg=/%7B/g,mw=/%7C/g,Dg=/%7D/g,hw=/%20/g;function mf(e){return e==null?"":encodeURI(""+e).replace(mw,"|").replace(fw,"[").replace(pw,"]")}function yw(e){return mf(e).replace(Tg,"{").replace(Dg,"}").replace(Ag,"^")}function bd(e){return mf(e).replace(Eg,"%2B").replace(hw,"+").replace(Sg,"%23").replace(iw,"%26").replace(vw,"`").replace(Tg,"{").replace(Dg,"}").replace(Ag,"^")}function gw(e){return bd(e).replace(cw,"%3D")}function bw(e){return mf(e).replace(Sg,"%23").replace(dw,"%3F")}function _w(e){return bw(e).replace(uw,"%2F")}function Mi(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const xw=/\/$/,kw=e=>e.replace(xw,"");function dc(e,t,n="/"){let a,r={},l="",o="";const i=t.indexOf("#");let u=t.indexOf("?");return u=i>=0&&u>i?-1:u,u>=0&&(a=t.slice(0,u),l=t.slice(u,i>0?i:t.length),r=e(l.slice(1))),i>=0&&(a=a||t.slice(0,i),o=t.slice(i,t.length)),a=Sw(a??t,n),{fullPath:a+l+o,path:a,query:r,hash:Mi(o)}}function ww(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Tv(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $w(e,t,n){const a=t.matched.length-1,r=n.matched.length-1;return a>-1&&a===r&&Ql(t.matched[a],n.matched[r])&&Og(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ql(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Og(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Cw(e[n],t[n]))return!1;return!0}function Cw(e,t){return Hn(e)?Dv(e,t):Hn(t)?Dv(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Dv(e,t){return Hn(t)?e.length===t.length&&e.every((n,a)=>n===t[a]):e.length===1&&e[0]===t}function Sw(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),a=e.split("/"),r=a[a.length-1];(r===".."||r===".")&&a.push("");let l=n.length-1,o,i;for(o=0;o1&&l--;else break;return n.slice(0,l).join("/")+"/"+a.slice(o).join("/")}const Qa={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};function Ew(e){if(!e)if(Ol){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),kw(e)}const Aw=/^[^#]+#/;function Tw(e,t){return e.replace(Aw,"#")+t}function Dw(e,t){const n=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-n.left-(t.left||0),top:a.top-n.top-(t.top||0)}}const _u=()=>({left:window.scrollX,top:window.scrollY});function Ow(e){let t;if("el"in e){const n=e.el,a=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?a?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Dw(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ov(e,t){return(history.state?history.state.position-t:-1)+e}const _d=new Map;function Mw(e,t){_d.set(e,t)}function Iw(e){const t=_d.get(e);return _d.delete(e),t}function Pw(e){return typeof e=="string"||e&&typeof e=="object"}function Mg(e){return typeof e=="string"||typeof e=="symbol"}function Rw(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;ar&&bd(r)):[a&&bd(a)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function qw(e){const t={};for(const n in e){const a=e[n];a!==void 0&&(t[n]=Hn(a)?a.map(r=>r==null?null:""+r):a==null?a:""+a)}return t}function xo(){let e=[];function t(a){return e.push(a),()=>{const r=e.indexOf(a);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ig(e,t,n){const a=e.value;if(!a)return;let r=a;const l=()=>{r[t].delete(n)};ja(l),Vy(l),Fy(()=>{const o=e.value;o&&(r=o),r[t].add(n)}),r[t].add(n)}function Pg(e){Ig(it(pf,{}),"leaveGuards",e)}function Lw(e){Ig(it(pf,{}),"updateGuards",e)}function sr(e,t,n,a,r,l=o=>o()){const o=a&&(a.enterCallbacks[r]=a.enterCallbacks[r]||[]);return()=>new Promise((i,u)=>{const d=m=>{m===!1?u(Xl(4,{from:n,to:t})):m instanceof Error?u(m):Pw(m)?u(Xl(2,{from:t,to:m})):(o&&a.enterCallbacks[r]===o&&typeof m=="function"&&o.push(m),i())},c=l(()=>e.call(a&&a.instances[r],t,n,d));let f=Promise.resolve(c);e.length<3&&(f=f.then(d)),f.catch(m=>u(m))})}function fc(e,t,n,a,r=l=>l()){const l=[];for(const o of e)for(const i in o.components){let u=o.components[i];if(!(t!=="beforeRouteEnter"&&!o.instances[i]))if($g(u)){const d=(u.__vccOpts||u)[t];d&&l.push(sr(d,n,a,o,i,r))}else{let d=u();l.push(()=>d.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${i}" at "${o.path}"`);const f=sw(c)?c.default:c;o.mods[i]=c,o.components[i]=f;const m=(f.__vccOpts||f)[t];return m&&sr(m,n,a,o,i,r)()}))}}return l}function Nw(e,t){const n=[],a=[],r=[],l=Math.max(t.matched.length,e.matched.length);for(let o=0;oQl(d,i))?a.push(i):n.push(i));const u=e.matched[o];u&&(t.matched.find(d=>Ql(d,u))||r.push(u))}return[n,a,r]}let Bw=()=>location.protocol+"//"+location.host;function Rg(e,t){const{pathname:n,search:a,hash:r}=t,l=e.indexOf("#");if(l>-1){let o=r.includes(e.slice(l))?e.slice(l).length:1,i=r.slice(o);return i[0]!=="/"&&(i="/"+i),Tv(i,"")}return Tv(n,e)+a+r}function Fw(e,t,n,a){let r=[],l=[],o=null;const i=({state:m})=>{const v=Rg(e,location),y=n.value,x=t.value;let C=0;if(m){if(n.value=v,t.value=m,o&&o===y){o=null;return}C=x?m.position-x.position:0}else a(v);r.forEach(k=>{k(n.value,y,{delta:C,type:"pop",direction:C?C>0?"forward":"back":""})})};function u(){o=n.value}function d(m){r.push(m);const v=()=>{const y=r.indexOf(m);y>-1&&r.splice(y,1)};return l.push(v),v}function c(){if(document.visibilityState==="hidden"){const{history:m}=window;if(!m.state)return;m.replaceState(gt({},m.state,{scroll:_u()}),"")}}function f(){for(const m of l)m();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:u,listen:d,destroy:f}}function Iv(e,t,n,a=!1,r=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:r?_u():null}}function Vw(e){const{history:t,location:n}=window,a={value:Rg(e,n)},r={value:t.state};r.value||l(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(u,d,c){const f=e.indexOf("#"),m=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:Bw()+e+u;try{t[c?"replaceState":"pushState"](d,"",m),r.value=d}catch(v){console.error(v),n[c?"replace":"assign"](m)}}function o(u,d){l(u,gt({},t.state,Iv(r.value.back,u,r.value.forward,!0),d,{position:r.value.position}),!0),a.value=u}function i(u,d){const c=gt({},r.value,t.state,{forward:u,scroll:_u()});l(c.current,c,!0),l(u,gt({},Iv(a.value,u,null),{position:c.position+1},d),!1),a.value=u}return{location:a,state:r,push:i,replace:o}}function zw(e){e=Ew(e);const t=Vw(e),n=Fw(e,t.state,t.location,t.replace);function a(l,o=!0){o||n.pauseListeners(),history.go(l)}const r=gt({location:"",base:e,go:a,createHref:Tw.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}const jw={type:0,value:""},Uw=/[a-zA-Z0-9_]/;function Hw(e){if(!e)return[[]];if(e==="/")return[[jw]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${d}": ${v}`)}let n=0,a=n;const r=[];let l;function o(){l&&r.push(l),l=[]}let i=0,u,d="",c="";function f(){d&&(n===0?l.push({type:0,value:d}):n===1||n===2||n===3?(l.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),l.push({type:1,value:d,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function m(){d+=u}for(;it.length?t.length===1&&t[0]===80?1:-1:0}function qg(e,t){let n=0;const a=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Jw={strict:!1,end:!0,sensitive:!1};function Zw(e,t,n){const a=Gw(Hw(e.path),n),r=gt(a,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Xw(e,t){const n=[],a=new Map;t=Ev(Jw,t);function r(f){return a.get(f)}function l(f,m,v){const y=!v,x=Lv(f);x.aliasOf=v&&v.record;const C=Ev(t,f),k=[x];if("alias"in f){const O=typeof f.alias=="string"?[f.alias]:f.alias;for(const T of O)k.push(Lv(gt({},x,{components:v?v.record.components:x.components,path:T,aliasOf:v?v.record:x})))}let E,B;for(const O of k){const{path:T}=O;if(m&&T[0]!=="/"){const P=m.record.path,R=P[P.length-1]==="/"?"":"/";O.path=m.record.path+(T&&R+T)}if(E=Zw(O,m,C),v?v.alias.push(E):(B=B||E,B!==E&&B.alias.push(E),y&&f.name&&!Nv(E)&&o(f.name)),Lg(E)&&u(E),x.children){const P=x.children;for(let R=0;R{o(B)}:Ko}function o(f){if(Mg(f)){const m=a.get(f);m&&(a.delete(f),n.splice(n.indexOf(m),1),m.children.forEach(o),m.alias.forEach(o))}else{const m=n.indexOf(f);m>-1&&(n.splice(m,1),f.record.name&&a.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function i(){return n}function u(f){const m=t2(f,n);n.splice(m,0,f),f.record.name&&!Nv(f)&&a.set(f.record.name,f)}function d(f,m){let v,y={},x,C;if("name"in f&&f.name){if(v=a.get(f.name),!v)throw Xl(1,{location:f});C=v.record.name,y=gt(qv(m.params,v.keys.filter(B=>!B.optional).concat(v.parent?v.parent.keys.filter(B=>B.optional):[]).map(B=>B.name)),f.params&&qv(f.params,v.keys.map(B=>B.name))),x=v.stringify(y)}else if(f.path!=null)x=f.path,v=n.find(B=>B.re.test(x)),v&&(y=v.parse(x),C=v.record.name,v.keys.forEach(B=>{B.optional&&!y[B.name]&&delete y[B.name]}));else{if(v=m.name?a.get(m.name):n.find(B=>B.re.test(m.path)),!v)throw Xl(1,{location:f,currentLocation:m});C=v.record.name,y=gt({},m.params,f.params),x=v.stringify(y)}const k=[];let E=v;for(;E;)k.unshift(E.record),E=E.parent;return{name:C,path:x,params:y,matched:k,meta:e2(k)}}e.forEach(f=>l(f));function c(){n.length=0,a.clear()}return{addRoute:l,resolve:d,removeRoute:o,clearRoutes:c,getRoutes:i,getRecordMatcher:r}}function qv(e,t){const n={};for(const a of t)a in e&&(n[a]=e[a]);return n}function Lv(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Qw(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Qw(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const a in e.components)t[a]=typeof n=="object"?n[a]:n;return t}function Nv(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function e2(e){return e.reduce((t,n)=>gt(t,n.meta),{})}function t2(e,t){let n=0,a=t.length;for(;n!==a;){const l=n+a>>1;qg(e,t[l])<0?a=l:n=l+1}const r=n2(e);return r&&(a=t.lastIndexOf(r,a-1)),a}function n2(e){let t=e;for(;t=t.parent;)if(Lg(t)&&qg(e,t)===0)return t}function Lg({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Bv(e){const t=it(bu),n=it(vf),a=_(()=>{const u=s(e.to);return t.resolve(u)}),r=_(()=>{const{matched:u}=a.value,{length:d}=u,c=u[d-1],f=n.matched;if(!c||!f.length)return-1;const m=f.findIndex(Ql.bind(null,c));if(m>-1)return m;const v=Fv(u[d-2]);return d>1&&Fv(c)===v&&f[f.length-1].path!==v?f.findIndex(Ql.bind(null,u[d-2])):m}),l=_(()=>r.value>-1&&l2(n.params,a.value.params)),o=_(()=>r.value>-1&&r.value===n.matched.length-1&&Og(n.params,a.value.params));function i(u={}){if(r2(u)){const d=t[s(e.replace)?"replace":"push"](s(e.to)).catch(Ko);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:a,href:_(()=>a.value.href),isActive:l,isExactActive:o,navigate:i}}function a2(e){return e.length===1?e[0]:e}const qn=le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Bv,setup(e,{slots:t}){const n=zn(Bv(e)),{options:a}=it(bu),r=_(()=>({[Vv(e.activeClass,a.linkActiveClass,"router-link-active")]:n.isActive,[Vv(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&a2(t.default(n));return e.custom?l:In("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},l)}}});function r2(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function l2(e,t){for(const n in t){const a=t[n],r=e[n];if(typeof a=="string"){if(a!==r)return!1}else if(!Hn(r)||r.length!==a.length||a.some((l,o)=>l.valueOf()!==r[o].valueOf()))return!1}return!0}function Fv(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Vv=(e,t,n)=>e??t??n,o2=le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const a=it(gd),r=_(()=>e.route||a.value),l=it(Av,0),o=_(()=>{let d=s(l);const{matched:c}=r.value;let f;for(;(f=c[d])&&!f.components;)d++;return d}),i=_(()=>r.value.matched[o.value]);vt(Av,_(()=>o.value+1)),vt(pf,i),vt(gd,r);const u=A();return Ne(()=>[u.value,i.value,e.name],([d,c,f],[m,v,y])=>{c&&(c.instances[f]=d,v&&v!==c&&d&&d===m&&(c.leaveGuards.size||(c.leaveGuards=v.leaveGuards),c.updateGuards.size||(c.updateGuards=v.updateGuards))),d&&c&&(!v||!Ql(c,v)||!m)&&(c.enterCallbacks[f]||[]).forEach(x=>x(d))},{flush:"post"}),()=>{const d=r.value,c=e.name,f=i.value,m=f&&f.components[c];if(!m)return zv(n.default,{Component:m,route:d});const v=f.props[c],y=v?v===!0?d.params:typeof v=="function"?v(d):v:null,C=In(m,gt({},y,t,{onVnodeUnmounted:k=>{k.component.isUnmounted&&(f.instances[c]=null)},ref:u}));return zv(n.default,{Component:C,route:d})||C}}});function zv(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const xd=o2;function s2(e){const t=Xw(e.routes,e),n=e.parseQuery||Rw,a=e.stringifyQuery||Mv,r=e.history,l=xo(),o=xo(),i=xo(),u=ul(Qa);let d=Qa;Ol&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=cc.bind(null,Y=>""+Y),f=cc.bind(null,_w),m=cc.bind(null,Mi);function v(Y,me){let J,ee;return Mg(Y)?(J=t.getRecordMatcher(Y),ee=me):ee=Y,t.addRoute(ee,J)}function y(Y){const me=t.getRecordMatcher(Y);me&&t.removeRoute(me)}function x(){return t.getRoutes().map(Y=>Y.record)}function C(Y){return!!t.getRecordMatcher(Y)}function k(Y,me){if(me=gt({},me||u.value),typeof Y=="string"){const q=dc(n,Y,me.path),ie=t.resolve({path:q.path},me),te=r.createHref(q.fullPath);return gt(q,ie,{params:m(ie.params),redirectedFrom:void 0,href:te})}let J;if(Y.path!=null)J=gt({},Y,{path:dc(n,Y.path,me.path).path});else{const q=gt({},Y.params);for(const ie in q)q[ie]==null&&delete q[ie];J=gt({},Y,{params:f(q)}),me.params=f(me.params)}const ee=t.resolve(J,me),ne=Y.hash||"";ee.params=c(m(ee.params));const w=ww(a,gt({},Y,{hash:yw(ne),path:ee.path})),M=r.createHref(w);return gt({fullPath:w,hash:ne,query:a===Mv?qw(Y.query):Y.query||{}},ee,{redirectedFrom:void 0,href:M})}function E(Y){return typeof Y=="string"?dc(n,Y,u.value.path):gt({},Y)}function B(Y,me){if(d!==Y)return Xl(8,{from:me,to:Y})}function O(Y){return R(Y)}function T(Y){return O(gt(E(Y),{replace:!0}))}function P(Y,me){const J=Y.matched[Y.matched.length-1];if(J&&J.redirect){const{redirect:ee}=J;let ne=typeof ee=="function"?ee(Y,me):ee;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=E(ne):{path:ne},ne.params={}),gt({query:Y.query,hash:Y.hash,params:ne.path!=null?{}:Y.params},ne)}}function R(Y,me){const J=d=k(Y),ee=u.value,ne=Y.state,w=Y.force,M=Y.replace===!0,q=P(J,ee);if(q)return R(gt(E(q),{state:typeof q=="object"?gt({},ne,q.state):ne,force:w,replace:M}),me||J);const ie=J;ie.redirectedFrom=me;let te;return!w&&$w(a,ee,J)&&(te=Xl(16,{to:ie,from:ee}),oe(ee,ee,!0,!1)),(te?Promise.resolve(te):I(ie,ee)).catch(fe=>ta(fe)?ta(fe,2)?fe:ge(fe):se(fe,ie,ee)).then(fe=>{if(fe){if(ta(fe,2))return R(gt({replace:M},E(fe.to),{state:typeof fe.to=="object"?gt({},ne,fe.to.state):ne,force:w}),me||ie)}else fe=D(ie,ee,!0,M,ne);return z(ie,ee,fe),fe})}function H(Y,me){const J=B(Y,me);return J?Promise.reject(J):Promise.resolve()}function S(Y){const me=j.values().next().value;return me&&typeof me.runWithContext=="function"?me.runWithContext(Y):Y()}function I(Y,me){let J;const[ee,ne,w]=Nw(Y,me);J=fc(ee.reverse(),"beforeRouteLeave",Y,me);for(const q of ee)q.leaveGuards.forEach(ie=>{J.push(sr(ie,Y,me))});const M=H.bind(null,Y,me);return J.push(M),_e(J).then(()=>{J=[];for(const q of l.list())J.push(sr(q,Y,me));return J.push(M),_e(J)}).then(()=>{J=fc(ne,"beforeRouteUpdate",Y,me);for(const q of ne)q.updateGuards.forEach(ie=>{J.push(sr(ie,Y,me))});return J.push(M),_e(J)}).then(()=>{J=[];for(const q of w)if(q.beforeEnter)if(Hn(q.beforeEnter))for(const ie of q.beforeEnter)J.push(sr(ie,Y,me));else J.push(sr(q.beforeEnter,Y,me));return J.push(M),_e(J)}).then(()=>(Y.matched.forEach(q=>q.enterCallbacks={}),J=fc(w,"beforeRouteEnter",Y,me,S),J.push(M),_e(J))).then(()=>{J=[];for(const q of o.list())J.push(sr(q,Y,me));return J.push(M),_e(J)}).catch(q=>ta(q,8)?q:Promise.reject(q))}function z(Y,me,J){i.list().forEach(ee=>S(()=>ee(Y,me,J)))}function D(Y,me,J,ee,ne){const w=B(Y,me);if(w)return w;const M=me===Qa,q=Ol?history.state:{};J&&(ee||M?r.replace(Y.fullPath,gt({scroll:M&&q&&q.scroll},ne)):r.push(Y.fullPath,ne)),u.value=Y,oe(Y,me,J,M),ge()}let N;function X(){N||(N=r.listen((Y,me,J)=>{if(!xe.listening)return;const ee=k(Y),ne=P(ee,xe.currentRoute.value);if(ne){R(gt(ne,{replace:!0,force:!0}),ee).catch(Ko);return}d=ee;const w=u.value;Ol&&Mw(Ov(w.fullPath,J.delta),_u()),I(ee,w).catch(M=>ta(M,12)?M:ta(M,2)?(R(gt(E(M.to),{force:!0}),ee).then(q=>{ta(q,20)&&!J.delta&&J.type==="pop"&&r.go(-1,!1)}).catch(Ko),Promise.reject()):(J.delta&&r.go(-J.delta,!1),se(M,ee,w))).then(M=>{M=M||D(ee,w,!1),M&&(J.delta&&!ta(M,8)?r.go(-J.delta,!1):J.type==="pop"&&ta(M,20)&&r.go(-1,!1)),z(ee,w,M)}).catch(Ko)}))}let W=xo(),K=xo(),ae;function se(Y,me,J){ge(Y);const ee=K.list();return ee.length?ee.forEach(ne=>ne(Y,me,J)):console.error(Y),Promise.reject(Y)}function he(){return ae&&u.value!==Qa?Promise.resolve():new Promise((Y,me)=>{W.add([Y,me])})}function ge(Y){return ae||(ae=!Y,X(),W.list().forEach(([me,J])=>Y?J(Y):me()),W.reset()),Y}function oe(Y,me,J,ee){const{scrollBehavior:ne}=e;if(!Ol||!ne)return Promise.resolve();const w=!J&&Iw(Ov(Y.fullPath,0))||(ee||!J)&&history.state&&history.state.scroll||null;return He().then(()=>ne(Y,me,w)).then(M=>M&&Ow(M)).catch(M=>se(M,Y,me))}const Z=Y=>r.go(Y);let ue;const j=new Set,xe={currentRoute:u,listening:!0,addRoute:v,removeRoute:y,clearRoutes:t.clearRoutes,hasRoute:C,getRoutes:x,resolve:k,options:e,push:O,replace:T,go:Z,back:()=>Z(-1),forward:()=>Z(1),beforeEach:l.add,beforeResolve:o.add,afterEach:i.add,onError:K.add,isReady:he,install(Y){Y.component("RouterLink",qn),Y.component("RouterView",xd),Y.config.globalProperties.$router=xe,Object.defineProperty(Y.config.globalProperties,"$route",{enumerable:!0,get:()=>s(u)}),Ol&&!ue&&u.value===Qa&&(ue=!0,O(r.location).catch(ee=>{}));const me={};for(const ee in Qa)Object.defineProperty(me,ee,{get:()=>u.value[ee],enumerable:!0});Y.provide(bu,xe),Y.provide(vf,$y(me)),Y.provide(gd,u);const J=Y.unmount;j.add(Y),Y.unmount=function(){j.delete(Y),j.size<1&&(d=Qa,N&&N(),N=null,u.value=Qa,ue=!1,ae=!1),J()}}};function _e(Y){return Y.reduce((me,J)=>me.then(()=>S(J)),Promise.resolve())}return xe}const i2=/^[A-Za-z0-9_-]+$/;function xu(e){const t=e.split(".");if(t.length!==3||!t.every(l=>i2.test(l)))return null;const[n,a,r]=t;return{vendor:n,plugin:a,controller:r}}function Kn(e){const t=xu(e);return t?`/${t.vendor}/${t.plugin}/${t.controller}`:null}function ks(e){return`${e.vendor}.${e.plugin}.${e.controller}`}function ro(e){const t=e.replace(/^\/+|\/+$/g,"").split("/");if(t.length<3)return null;const n=t.slice(0,3).join(".");return xu(n)?n:null}function jv(e){const t=xu(e);return t?`${t.vendor}.${t.plugin}`:null}const u2=/\{[^{}]+\}/g,c2=()=>typeof process=="object"&&Number.parseInt(process?.versions?.node?.substring(0,2))>=18&&process.versions.undici;function d2(){return Math.random().toString(36).slice(2,11)}function f2(e){let{baseUrl:t="",Request:n=globalThis.Request,fetch:a=globalThis.fetch,querySerializer:r,bodySerializer:l,pathSerializer:o,headers:i,requestInitExt:u=void 0,...d}={...e};u=c2()?u:void 0,t=Kv(t);const c=[];async function f(m,v){const{baseUrl:y,fetch:x=a,Request:C=n,headers:k,params:E={},parseAs:B="json",querySerializer:O,bodySerializer:T=l??v2,pathSerializer:P,body:R,middleware:H=[],...S}=v||{};let I=t;y&&(I=Kv(y)??t);let z=typeof r=="function"?r:Uv(r);O&&(z=typeof O=="function"?O:Uv({...typeof r=="object"?r:{},...O}));const D=P||o||p2,N=R===void 0?void 0:T(R,Hv(i,k,E.header)),X=Hv(N===void 0||N instanceof FormData?{}:{"Content-Type":"application/json"},i,k,E.header),W=[...c,...H],K={redirect:"follow",...d,...S,body:N,headers:X};let ae,se,he=new C(m2(m,{baseUrl:I,params:E,querySerializer:z,pathSerializer:D}),K),ge;for(const ue in S)ue in he||(he[ue]=S[ue]);if(W.length){ae=d2(),se=Object.freeze({baseUrl:I,fetch:x,parseAs:B,querySerializer:z,bodySerializer:T,pathSerializer:D});for(const ue of W)if(ue&&typeof ue=="object"&&typeof ue.onRequest=="function"){const j=await ue.onRequest({request:he,schemaPath:m,params:E,options:se,id:ae});if(j)if(j instanceof C)he=j;else if(j instanceof Response){ge=j;break}else throw new Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!ge){try{ge=await x(he,u)}catch(ue){let j=ue;if(W.length)for(let xe=W.length-1;xe>=0;xe--){const _e=W[xe];if(_e&&typeof _e=="object"&&typeof _e.onError=="function"){const Y=await _e.onError({request:he,error:j,schemaPath:m,params:E,options:se,id:ae});if(Y){if(Y instanceof Response){j=void 0,ge=Y;break}if(Y instanceof Error){j=Y;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(j)throw j}if(W.length)for(let ue=W.length-1;ue>=0;ue--){const j=W[ue];if(j&&typeof j=="object"&&typeof j.onResponse=="function"){const xe=await j.onResponse({request:he,response:ge,schemaPath:m,params:E,options:se,id:ae});if(xe){if(!(xe instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");ge=xe}}}}const oe=ge.headers.get("Content-Length");if(ge.status===204||he.method==="HEAD"||oe==="0"&&!ge.headers.get("Transfer-Encoding")?.includes("chunked"))return ge.ok?{data:void 0,response:ge}:{error:void 0,response:ge};if(ge.ok)return{data:await(async()=>{if(B==="stream")return ge.body;if(B==="json"&&!oe){const j=await ge.text();return j?JSON.parse(j):void 0}return await ge[B]()})(),response:ge};let Z=await ge.text();try{Z=JSON.parse(Z)}catch{}return{error:Z,response:ge}}return{request(m,v,y){return f(v,{...y,method:m.toUpperCase()})},GET(m,v){return f(m,{...v,method:"GET"})},PUT(m,v){return f(m,{...v,method:"PUT"})},POST(m,v){return f(m,{...v,method:"POST"})},DELETE(m,v){return f(m,{...v,method:"DELETE"})},OPTIONS(m,v){return f(m,{...v,method:"OPTIONS"})},HEAD(m,v){return f(m,{...v,method:"HEAD"})},PATCH(m,v){return f(m,{...v,method:"PATCH"})},TRACE(m,v){return f(m,{...v,method:"TRACE"})},use(...m){for(const v of m)if(v){if(typeof v!="object"||!("onRequest"in v||"onResponse"in v||"onError"in v))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");c.push(v)}},eject(...m){for(const v of m){const y=c.indexOf(v);y!==-1&&c.splice(y,1)}}}}function ku(e,t,n){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${n?.allowReserved===!0?t:encodeURIComponent(t)}`}function Ng(e,t,n){if(!t||typeof t!="object")return"";const a=[],r={simple:",",label:".",matrix:";"}[n.style]||"&";if(n.style!=="deepObject"&&n.explode===!1){for(const i in t)a.push(i,n.allowReserved===!0?t[i]:encodeURIComponent(t[i]));const o=a.join(",");switch(n.style){case"form":return`${e}=${o}`;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return o}}for(const o in t){const i=n.style==="deepObject"?`${e}[${o}]`:o;a.push(ku(i,t[o],n))}const l=a.join(r);return n.style==="label"||n.style==="matrix"?`${r}${l}`:l}function Bg(e,t,n){if(!Array.isArray(t))return"";if(n.explode===!1){const l={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",o=(n.allowReserved===!0?t:t.map(i=>encodeURIComponent(i))).join(l);switch(n.style){case"simple":return o;case"label":return`.${o}`;case"matrix":return`;${e}=${o}`;default:return`${e}=${o}`}}const a={simple:",",label:".",matrix:";"}[n.style]||"&",r=[];for(const l of t)n.style==="simple"||n.style==="label"?r.push(n.allowReserved===!0?l:encodeURIComponent(l)):r.push(ku(e,l,n));return n.style==="label"||n.style==="matrix"?`${a}${r.join(a)}`:r.join(a)}function Uv(e){return function(n){const a=[];if(n&&typeof n=="object")for(const r in n){const l=n[r];if(l!=null){if(Array.isArray(l)){if(l.length===0)continue;a.push(Bg(r,l,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if(typeof l=="object"){a.push(Ng(r,l,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}a.push(ku(r,l,e))}}return a.join("&")}}function p2(e,t){let n=e;for(const a of e.match(u2)??[]){let r=a.substring(1,a.length-1),l=!1,o="simple";if(r.endsWith("*")&&(l=!0,r=r.substring(0,r.length-1)),r.startsWith(".")?(o="label",r=r.substring(1)):r.startsWith(";")&&(o="matrix",r=r.substring(1)),!t||t[r]===void 0||t[r]===null)continue;const i=t[r];if(Array.isArray(i)){n=n.replace(a,Bg(r,i,{style:o,explode:l}));continue}if(typeof i=="object"){n=n.replace(a,Ng(r,i,{style:o,explode:l}));continue}if(o==="matrix"){n=n.replace(a,`;${ku(r,i)}`);continue}n=n.replace(a,o==="label"?`.${encodeURIComponent(i)}`:encodeURIComponent(i))}return n}function v2(e,t){return e instanceof FormData?e:t&&(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])==="application/x-www-form-urlencoded"?new URLSearchParams(e).toString():JSON.stringify(e)}function m2(e,t){let n=`${t.baseUrl}${e}`;t.params?.path&&(n=t.pathSerializer(n,t.params.path));let a=t.querySerializer(t.params.query??{});return a.startsWith("?")&&(a=a.substring(1)),a&&(n+=`?${a}`),n}function Hv(...e){const t=new Headers;for(const n of e){if(!n||typeof n!="object")continue;const a=n instanceof Headers?n.entries():Object.entries(n);for(const[r,l]of a)if(l===null)t.delete(r);else if(Array.isArray(l))for(const o of l)t.append(r,o);else l!==void 0&&t.set(r,l)}return t}function Kv(e){return e.endsWith("/")?e.substring(0,e.length-1):e}const Wv="/backend",h2="__SUMMER_ADMIN_BASE__",y2="__SUMMER_ADMIN_BUILD__",g2=/^[0-9a-f]{6,64}$/;function b2(e=document){const t=e.querySelector('meta[name="summer-admin-base"]')?.content.trim()??"";if(t===""||t===h2||!t.startsWith("/"))return Wv;const n=t.replace(/\/+$/,"");return n===""?Wv:n}function _2(e=document){const t=e.querySelector('meta[name="summer-admin-build"]')?.content.trim()??"";return t===y2||!g2.test(t)?"":t}const Gv=b2(),cl={base:Gv,api:`${Gv}/api/v1`,build:_2()},Fg="XMLHttpRequest";let Ii=null,Vg=null,ko=null;const pc=new WeakMap;function x2(e){Ii=e}function k2(){Ii?.()}function w2(e){Vg=e}function $2(e){return new URL(e.url,"http://local").pathname}function Yv(e){const t=$2(e);return t.endsWith("/auth/login")||t.endsWith("/auth/refresh")}function hf(){return ko||(ko=(async()=>{try{const{data:e,response:t}=await Re.POST("/auth/refresh");if(!t.ok||!e)return!1;const n=e.data.expires_in;return Vg?.(typeof n=="number"?n:null),!0}catch{return!1}finally{ko=null}})(),ko)}const C2={onRequest({request:e}){return e.headers.set("X-Requested-With",Fg),Yv(e)||pc.set(e,e.clone()),e},async onResponse({request:e,response:t}){if(t.status!==401||Yv(e))return t;const n=pc.get(e);if(pc.delete(e),!n||!await hf())return Ii?.(),t;const a=await globalThis.fetch(n);return a.status===401&&Ii?.(),a}},Re=f2({baseUrl:cl.api,credentials:"same-origin",fetch:e=>globalThis.fetch(e)});Re.use(C2);const yf=A({}),gf=A(typeof document>"u"?"pl":document.documentElement.lang||"pl"),Wn=Ct(gf),zg=A([]),S2=Ct(zg);function E2(e,t){yf.value=e,t&&(gf.value=t,typeof document<"u"&&(document.documentElement.lang=t))}async function jg(e){const{data:t,response:n}=await Re.GET("/lang",e?{params:{query:{locale:e}}}:{});!n.ok||!t||(zg.value=Array.isArray(t.meta.locales)?[...t.meta.locales]:[],E2(t.data,t.meta.locale))}function Jv(e){const t=e.codePointAt(0);if(t===void 0)return e;const n=String.fromCodePoint(t);return n.toUpperCase()+e.slice(n.length)}function Pi(e,t={}){if(e==="")return e;const n=[];for(const[r,l]of Object.entries(t)){const o=r.replace(/^:/,"");if(o==="")continue;const i=String(l);n.push([`:${Jv(o)}`,Jv(i)]),n.push([`:${o.toUpperCase()}`,i.toUpperCase()]),n.push([`:${o}`,i])}n.sort((r,l)=>l[0].length-r[0].length);let a=e;for(const[r,l]of n)a=a.split(r).join(l);return a}const Zv=new Map;function A2(e,t=gf.value){let n=Zv.get(t);if(n===void 0){try{n=new Intl.PluralRules(t)}catch{n=null}Zv.set(t,n)}return n?n.select(e):"other"}function Ze(e,t,n={}){if(!e)return"";if(t===void 0)return Pi(e.other??"",n);const a=e[A2(t)]??e.other??"";return Pi(a,{count:t,...n})}function h(e,t={}){const n=yf.value[e]?.other;return n===void 0?e:Pi(n,t)}function rl(e,t,n={}){const a=yf.value[e];return a?Ze(a,t,n):e}const bf=A(""),qo=Ct(bf);function _f(e){bf.value=e}function xf(){bf.value=""}const Ri=A([]);async function Ug(){const{data:e,response:t}=await Re.GET("/navigation");return Ri.value=t.ok&&e?e.data:[],Ri.value}function T2(e){Ri.value=e}const qi=_(()=>Ri.value.filter(e=>e.sideMenu.length>0).map((e,t)=>({entry:e,index:t})).sort((e,t)=>e.entry.order-t.entry.order||e.index-t.index).map(({entry:e})=>e));function kf(e){for(const t of e.sideMenu){const n=Kn(t.controller);if(n)return n}return Kn(e.controller)}function ws(e,t){const n=`${e}.${t}`;return qi.value.find(a=>jv(a.controller)===n||a.sideMenu.some(r=>jv(r.controller)===n))??null}function D2(){for(const e of qi.value){const t=kf(e);if(t)return t}return null}const hr=A([]),O2=_(()=>hr.value.length>0);async function Hg(){const{data:e,response:t}=await Re.GET("/settings");return hr.value=t.ok&&e?e.data:[],hr.value}function M2(e){hr.value=e}function os(e){return hr.value.find(t=>t.code===e)??null}function wf(e){return e.path?e.path:e.controller?Kn(e.controller)??"/settings":`/settings/${encodeURIComponent(e.code)}`}function wu(e){return e?hr.value.find(t=>t.controller!==""&&t.controller===e)??null:null}function Kg(e){return hr.value.find(t=>!!t.path&&t.path===e)??null}const kd=_(()=>{const e=hr.value.map((n,a)=>({entry:n,index:a})).sort((n,a)=>n.entry.order-a.entry.order||n.index-a.index).map(({entry:n})=>n),t=[];for(const n of e){let a=t.find(r=>r.category===n.category);a||(a={category:n.category,entries:[]},t.push(a)),a.entries.push(n)}return t});function vc(e){if(!e)return null;const t=kd.value.find(n=>n.category===e.category);return!t||t.entries.length<2?null:{category:t.category,current:e,entries:t.entries}}const Xv="SummerCMS";function I2(e){if(e.name==="login")return h("backend::lang.auth.title");if(e.name==="settings")return h("backend::lang.settings.title");if(e.name==="account")return h("backend::lang.myaccount.menu_label");if(e.name==="plugins")return h("backend::lang.plugins.title");if(e.name==="connect")return h("backend::lang.mcp_connect.page_title");if(e.name==="settings-form")return os(String(e.params.code??""))?.label??String(e.params.code??"");if(e.name==="home")return h("backend::lang.nav.empty");if(e.name==="not-found")return h("backend::lang.page.not_found");const t=ws(String(e.params.vendor??""),String(e.params.plugin??"")),n=ro(e.path),r=t?.sideMenu.find(l=>l.controller===n)?.label??t?.label??wu(n)?.label??"";return(e.name==="create"||e.name==="record"||e.name==="preview")&&qo.value||r}function P2(e){const t=I2(e).trim();return t===""?Xv:`${t} | ${Xv}`}const Qv=e=>e==="";const R2=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();const em=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const q2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());const L2=e=>{const t=q2(e);return t.charAt(0).toUpperCase()+t.slice(1)};var wl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const N2=Symbol("lucide-icons");function B2(){return it(N2,{})}const F2=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":a,strokeWidth:r,"stroke-width":l,size:o,color:i,...u},{slots:d})=>{const{size:c,color:f,strokeWidth:m=2,absoluteStrokeWidth:v=!1,class:y=""}=B2(),x=_(()=>{const C=Qv(n)||Qv(a)||n===!0||a===!0||v===!0,k=r||l||m||wl["stroke-width"];return C?Number(k)*24/Number(o??c??wl.width):k});return In("svg",{...wl,...u,width:o??c??wl.width,height:o??c??wl.height,stroke:i??f??wl.stroke,"stroke-width":x.value,class:R2("lucide",y,...e?[`lucide-${em(L2(e))}-icon`,`lucide-${em(e)}`]:["lucide-icon"])},[...t.map(C=>In(...C)),...d.default?[d.default()]:[]])};const be=(e,t)=>(n,{slots:a,attrs:r})=>In(F2,{...r,...n,iconNode:t,name:e},a.default?{default:a.default}:void 0);const V2=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],z2=be("archive",V2);const j2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Wg=be("arrow-down",j2);const U2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$s=be("arrow-left",U2);const H2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],K2=be("arrow-right",H2);const W2=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Gg=be("arrow-up-down",W2);const G2=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Yg=be("arrow-up-right",G2);const Y2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Jg=be("arrow-up",Y2);const J2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],Zg=be("ban",J2);const Z2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],X2=be("bell",Z2);const Q2=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],e$=be("bold",Q2);const t$=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],n$=be("book",t$);const a$=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],r$=be("bookmark",a$);const l$=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],tm=be("bot",l$);const o$=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],s$=be("box",o$);const i$=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],u$=be("briefcase",i$);const c$=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],d$=be("building",c$);const f$=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Xg=be("calendar",f$);const p$=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],v$=be("camera",p$);const m$=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["circle",{cx:"8",cy:"10",r:"2",key:"1xl4ub"}],["path",{d:"M8 12h8",key:"1wcyev"}],["circle",{cx:"16",cy:"10",r:"2",key:"r14t7q"}],["path",{d:"m6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3",key:"l01ucn"}]],h$=be("cassette-tape",m$);const y$=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16h8",key:"srdodz"}],["path",{d:"M7 11h12",key:"127s9w"}],["path",{d:"M7 6h3",key:"w9rmul"}]],g$=be("chart-bar",y$);const b$=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ln=be("check",b$);const _$=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yr=be("chevron-down",_$);const x$=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],$u=be("chevron-left",x$);const k$=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cs=be("chevron-right",k$);const w$=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Qg=be("chevron-up",w$);const $$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ht=be("circle-alert",$$);const C$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],S$=be("circle-arrow-up",C$);const E$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],A$=be("circle-check",E$);const T$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],D$=be("circle-question-mark",T$);const O$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],M$=be("circle",O$);const I$=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],P$=be("clipboard-list",I$);const R$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Li=be("clock",R$);const q$=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],L$=be("cloud",q$);const N$=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],eb=be("code",N$);const B$=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ni=be("copy",B$);const F$=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],V$=be("credit-card",F$);const z$=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],j$=be("database",z$);const U$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M6 12c0-1.7.7-3.2 1.8-4.2",key:"oqkarx"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M18 12c0 1.7-.7 3.2-1.8 4.2",key:"1eah9h"}]],H$=be("disc-3",U$);const K$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],W$=be("disc",K$);const G$=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],wd=be("download",G$);const Y$=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],tb=be("external-link",Y$);const J$=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Z$=be("eye-off",J$);const X$=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Q$=be("eye",X$);const eC=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ql=be("file-text",eC);const tC=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],nC=be("file",tC);const aC=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],rC=be("files",aC);const lC=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],oC=be("flag",lC);const sC=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],iC=be("folder",sC);const uC=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],cC=be("funnel",uC);const dC=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],fC=be("gauge",dC);const pC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],vC=be("globe",pC);const mC=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],hC=be("graduation-cap",mC);const yC=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Bi=be("grip-vertical",yC);const gC=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],bC=be("heading-3",gC);const _C=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],xC=be("heart",_C);const kC=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],wC=be("house",kC);const $C=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],nm=be("image-off",$C);const CC=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],nb=be("image-plus",CC);const SC=[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19.5 3-3 3 3",key:"9vmjn0"}],["path",{d:"M17 22v-5.5",key:"1aa6fl"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],EC=be("image-up",SC);const AC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ab=be("image",AC);const TC=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],DC=be("inbox",TC);const OC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Na=be("info",OC);const MC=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],IC=be("italic",MC);const PC=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],RC=be("key-round",PC);const qC=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],LC=be("key",qC);const NC=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],BC=be("languages",NC);const FC=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],VC=be("layout-grid",FC);const zC=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],jC=be("leaf",zC);const UC=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],HC=be("library",UC);const KC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],WC=be("life-buoy",KC);const GC=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],rb=be("link",GC);const YC=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m7 8-4 4 4 4",key:"o5hrat"}]],JC=be("list-indent-decrease",YC);const ZC=[["path",{d:"M21 5H11",key:"us1j55"}],["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 19H11",key:"saa85w"}],["path",{d:"m3 8 4 4-4 4",key:"1a3j6y"}]],XC=be("list-indent-increase",ZC);const QC=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],lb=be("list-ordered",QC);const eS=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],ob=be("list",eS);const tS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Oa=be("loader-circle",tS);const nS=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ur=be("lock",nS);const aS=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],sb=be("log-out",aS);const rS=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],lS=be("mail",rS);const oS=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],sS=be("map-pin",oS);const iS=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],uS=be("message-circle",iS);const cS=[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]],dS=be("mic-vocal",cS);const fS=[["path",{d:"M5 12h14",key:"1ays0h"}]],ib=be("minus",fS);const pS=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],vS=be("moon",pS);const mS=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],hS=be("network",mS);const yS=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],gS=be("palette",yS);const bS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],$f=be("panel-left-close",bS);const _S=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],ub=be("panel-left-open",_S);const xS=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],kS=be("paperclip",xS);const wS=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],$S=be("pause",wS);const CS=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Wo=be("pencil",CS);const SS=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ES=be("phone",SS);const AS=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],TS=be("play",AS);const DS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ss=be("plus",DS);const OS=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],cb=be("puzzle",OS);const MS=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],IS=be("quote",MS);const PS=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],RS=be("redo-2",PS);const qS=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],LS=be("refresh-cw",qS);const NS=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],pi=be("rotate-ccw",NS);const BS=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],db=be("search-x",BS);const FS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lo=be("search",FS);const VS=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zS=be("send",VS);const jS=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fb=be("settings",jS);const US=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],HS=be("shield-check",US);const KS=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],WS=be("shopping-cart",KS);const GS=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],YS=be("sliders-horizontal",GS);const JS=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],pb=be("star",JS);const ZS=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]],XS=be("sun-moon",ZS);const QS=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Es=be("sun",QS);const e3=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],t3=be("table",e3);const n3=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],a3=be("tags",n3);const r3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Tr=be("trash-2",r3);const l3=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Fi=be("triangle-alert",l3);const o3=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],s3=be("trophy",o3);const i3=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],u3=be("underline",i3);const c3=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],vb=be("undo-2",c3);const d3=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],f3=be("unlink",d3);const p3=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Go=be("upload",p3);const v3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],mb=be("user-minus",v3);const m3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],hb=be("user-plus",m3);const h3=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],y3=be("user-round",h3);const g3=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],b3=be("user",g3);const _3=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],x3=be("users-round",_3);const k3=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],w3=be("users",k3);const $3=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],C3=be("wand-sparkles",$3);const S3=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],E3=be("wrench",S3);const A3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xt=be("x",A3),am={archive:z2,"arrow-down":Wg,"arrow-left":$s,"arrow-right":K2,"arrow-up":Jg,"arrow-up-right":Yg,bell:X2,book:n$,bookmark:r$,box:s$,briefcase:u$,building:d$,calendar:Xg,camera:v$,"cassette-tape":h$,"chart-bar":g$,check:Ln,"chevron-down":yr,"chevron-left":$u,"chevron-right":Cs,circle:M$,"circle-alert":ht,"circle-check":A$,"circle-question-mark":D$,"clipboard-list":P$,clock:Li,cloud:L$,code:eb,copy:Ni,"credit-card":V$,database:j$,disc:W$,"disc-3":H$,download:wd,"external-link":tb,file:nC,"file-text":ql,files:rC,flag:oC,folder:iC,funnel:cC,gauge:fC,globe:vC,"graduation-cap":hC,heart:xC,house:wC,image:ab,inbox:DC,info:Na,key:LC,languages:BC,"layout-grid":VC,leaf:jC,library:HC,"life-buoy":WC,link:rb,list:ob,"list-ordered":lb,lock:ur,"log-out":sb,mail:lS,"map-pin":sS,"message-circle":uS,"mic-vocal":dS,minus:ib,network:hS,palette:gS,"panel-left-close":$f,"panel-left-open":ub,paperclip:kS,pause:$S,pencil:Wo,phone:ES,play:TS,plus:Ss,puzzle:cb,"refresh-cw":LS,search:lo,"search-x":db,settings:fb,"shield-check":HS,"shopping-cart":WS,star:pb,sun:Es,table:t3,tags:a3,"trash-2":Tr,"triangle-alert":Fi,trophy:s3,upload:Go,user:b3,"user-minus":mb,"user-plus":hb,users:w3,"users-round":x3,"wand-sparkles":C3,wrench:E3,x:Xt},T3={"icon-archive":"archive","icon-bar-chart":"chart-bar","icon-bell":"bell","icon-book":"book","icon-bookmark":"bookmark","icon-briefcase":"briefcase","icon-building":"building","icon-calendar":"calendar","icon-camera":"camera","icon-check":"check","icon-check-circle":"circle-check","icon-circle":"circle","icon-clock":"clock","icon-clock-o":"clock","icon-cloud":"cloud","icon-code":"code","icon-cog":"settings","icon-cogs":"settings","icon-comment":"message-circle","icon-comments":"message-circle","icon-comments-o":"message-circle","icon-copy":"copy","icon-credit-card":"credit-card","icon-cube":"box","icon-dashboard":"gauge","icon-database":"database","icon-download":"download","icon-edit":"pencil","icon-envelope":"mail","icon-envelope-o":"mail","icon-exclamation-triangle":"triangle-alert","icon-external-link":"external-link","icon-file":"file","icon-file-o":"file","icon-file-text":"file-text","icon-file-text-o":"file-text","icon-files-o":"files","icon-filter":"funnel","icon-flag":"flag","icon-folder":"folder","icon-folder-o":"folder","icon-globe":"globe","icon-graduation-cap":"graduation-cap","icon-group":"users","icon-heart":"heart","icon-home":"house","icon-inbox":"inbox","icon-info-circle":"info","icon-key":"key","icon-language":"languages","icon-leaf":"leaf","icon-life-ring":"life-buoy","icon-link":"link","icon-list":"list","icon-list-alt":"clipboard-list","icon-list-ol":"list-ordered","icon-list-ul":"list","icon-lock":"lock","icon-magic":"wand-sparkles","icon-map-marker":"map-pin","icon-minus":"minus","icon-paperclip":"paperclip","icon-pause":"pause","icon-pencil":"pencil","icon-phone":"phone","icon-photo":"image","icon-picture-o":"image","icon-play":"play","icon-plus":"plus","icon-question":"circle-question-mark","icon-question-circle":"circle-question-mark","icon-refresh":"refresh-cw","icon-search":"search","icon-shopping-cart":"shopping-cart","icon-sign-out":"log-out","icon-sitemap":"network","icon-star":"star","icon-table":"table","icon-tachometer":"gauge","icon-tags":"tags","icon-th":"layout-grid","icon-th-large":"layout-grid","icon-times":"x","icon-trash":"trash-2","icon-trash-o":"trash-2","icon-trophy":"trophy","icon-upload":"upload","icon-user":"user","icon-users":"users","icon-warning":"triangle-alert","icon-wrench":"wrench"},rm=Es;function mc(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function As(e){if(!e)return rm;const t=e.trim();return mc(am,t)??mc(am,mc(T3,t)??"")??rm}const D3="(prefers-color-scheme: dark)",vi=["system","light","dark"];function yb(e){return typeof e=="string"&&vi.includes(e)}function O3(e=window,t="system"){const n=e.document.documentElement;if(t!=="system")return n.classList.toggle("dark",t==="dark"),()=>{};if(typeof e.matchMedia!="function")return n.classList.remove("dark"),()=>{};const a=e.matchMedia(D3),r=o=>{n.classList.toggle("dark",o)};r(a.matches);const l=o=>r(o.matches);return a.addEventListener("change",l),()=>a.removeEventListener("change",l)}const M3=4e3,ss=A([]),$d=new Map;let I3=1;const P3=Ct(ss);function Ie(e,t="success"){const n=I3++;return ss.value=[{id:n,text:e,tone:t},...ss.value],$d.set(n,setTimeout(()=>gb(n),M3)),n}function gb(e){const t=$d.get(e);t!==void 0&&(clearTimeout(t),$d.delete(e)),ss.value=ss.value.filter(n=>n.id!==e)}const bb="summer-admin.theme",Cf="summer-admin.locale",R3=/^[A-Za-z]{2,8}(?:[-_][A-Za-z0-9]{1,8})?$/,eo=A("system");let lm=()=>{};const om=Ct(eo),Vi=A(""),q3=Ct(Vi);function zi(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function Sf(e,t){try{t===null?zi()?.removeItem(e):zi()?.setItem(e,t)}catch{}}function Cd(e){Sf(bb,e==="system"?null:e)}function L3(){try{const e=zi()?.getItem(bb);return yb(e)?e:"system"}catch{return"system"}}function N3(){try{const e=zi()?.getItem(Cf)??"";return e.length<=16&&R3.test(e)?e:""}catch{return""}}const _b={reload(){window.location.reload()}};function ji(e){lm(),eo.value=e,lm=typeof window>"u"?()=>{}:O3(window,e)}function B3(e){const t=vi.indexOf(e);return vi[(t+1)%vi.length]??"system"}async function F3(e){const t=eo.value;ji(e),Cd(e);let n=!1;try{const{response:a}=await Re.PUT("/account/preferences",{body:{theme:e}});n=a.ok}catch{n=!1}n||(eo.value===e&&(ji(t),Cd(t)),Ie(h("backend::lang.myaccount.preferences_failed"),"danger"))}function sm(){return F3(B3(eo.value))}async function V3(e){const t=e?.preferences;t&&(yb(t.theme)&&(t.theme!==eo.value&&ji(t.theme),Cd(t.theme)),typeof t.locale=="string"&&(Vi.value=t.locale,t.locale!==""&&t.locale!==Wn.value&&await jg(t.locale).catch(()=>{}),Sf(Cf,t.locale===""?null:t.locale)))}async function z3(e){if(e===Vi.value)return;let t=!1;try{const{response:n}=await Re.PUT("/account/preferences",{body:{locale:e}});t=n.ok}catch{t=!1}if(!t){Ie(h("backend::lang.myaccount.preferences_failed"),"danger");return}Vi.value=e,Sf(Cf,e===""?null:e),_b.reload()}const xb="summer-admin.sidebar",j3="(max-width: 1099px)",Cu=A(!1),Yo=A(!1),U3=_(()=>Yo.value||Cu.value);function kb(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function H3(){try{return kb()?.getItem(xb)==="true"}catch{return!1}}function Ef(e){Cu.value=e;try{kb()?.setItem(xb,e?"true":"false")}catch{}}function K3(){if(Cu.value=H3(),typeof window>"u"||typeof window.matchMedia!="function")return Yo.value=!1,()=>{};const e=window.matchMedia(j3);Yo.value=e.matches;const t=n=>{Yo.value=n.matches};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}function wb(){return{collapsed:U3,narrow:Ct(Yo),manual:Ct(Cu),setCollapsed:Ef,watchViewport:K3}}const W3=["id","aria-label"],G3={class:"px-2.5 pt-1 pb-2 text-[14px] font-bold","aria-hidden":"true"},Y3=le({__name:"SectionFlyout",props:{entry:{},id:{}},emits:["escape","leave","navigate"],setup(e,{expose:t,emit:n}){const a=e,r=n,l=yn(),o=A(null),i=_(()=>ro(l.path)),u=_(()=>a.entry.sideMenu.flatMap(v=>{const y=Kn(v.controller);return y?[{item:v,to:y,icon:As(v.icon),current:i.value===v.controller}]:[]}));function d(){return[...o.value?.querySelectorAll('[role="menuitem"]')??[]]}async function c(){await He(),d()[0]?.focus()}function f(v){return!!v&&!!o.value?.contains(v)}function m(v){const y=d(),x=y.indexOf(document.activeElement);switch(v.key){case"ArrowDown":v.preventDefault(),y[(x+1)%y.length]?.focus();break;case"ArrowUp":v.preventDefault(),y[(x-1+y.length)%y.length]?.focus();break;case"Home":v.preventDefault(),y[0]?.focus();break;case"End":v.preventDefault(),y[y.length-1]?.focus();break;case"Escape":v.preventDefault(),r("escape");break;case"Tab":r("leave");break}}return t({focusFirst:c,contains:f}),(v,y)=>(p(),g("div",{id:e.id,ref_key:"root",ref:o,role:"menu","data-section-flyout":"","aria-label":e.entry.label,class:"fixed top-3 left-[calc(var(--spacing-rail)+8px)] z-40 flex w-[230px] flex-col gap-0.5 rounded-[14px] border border-border bg-surface p-2 text-text shadow-pop",onKeydown:m},[b("span",G3,$(e.entry.label),1),(p(!0),g(ve,null,Me(u.value,x=>(p(),U(s(qn),{key:x.item.code,to:x.to,role:"menuitem",tabindex:"-1","aria-current":x.current?"page":void 0,class:pe([x.current?"bg-sel font-semibold text-text":"font-medium text-muted hover:bg-hover hover:text-text","flex h-[38px] items-center gap-3 rounded-tab px-2.5 no-underline transition-colors duration-150 ease-out"]),onClick:y[0]||(y[0]=C=>r("navigate"))},{default:F(()=>[(p(),U(Kt(x.icon),{size:18,"aria-hidden":"true"})),b("span",null,$(x.item.label),1)]),_:2},1032,["to","aria-current","class"]))),128))],40,W3))}}),J3=["aria-label"],Z3=["aria-label","title"],X3={class:"max-w-full [overflow-wrap:anywhere]"},Q3=["aria-label","title"],eE={class:"max-w-full [overflow-wrap:anywhere]"},tE=200,nE=le({__name:"PluginRail",setup(e){const t=yn(),{collapsed:n,narrow:a,setCollapsed:r}=wb(),l={system:{icon:XS,key:"backend::lang.nav.theme_system"},light:{icon:Es,key:"backend::lang.nav.theme_light"},dark:{icon:vS,key:"backend::lang.nav.theme_dark"}},o=_(()=>l[om.value].icon),i=_(()=>h("backend::lang.nav.theme",{mode:h(l[om.value].key)})),u=_(()=>ws(String(t.params.vendor??""),String(t.params.plugin??""))),d=_(()=>t.path==="/settings"||t.path.startsWith("/settings/")||Kg(t.path)!==null||u.value===null&&wu(ro(t.path))!==null),c=_(()=>qi.value.map(z=>({entry:z,to:kf(z)??"/",icon:As(z.icon),current:u.value?.code===z.code}))),f=A(null),m=A(null),v=_(()=>qi.value.find(z=>z.code===f.value)??null),y=new Map;let x=null,C=!1;function k(z){return`section-flyout-${z}`}function E(z,D){const N=D?.$el;N instanceof HTMLElement?y.set(z,N):y.delete(z)}function B(){x!==null&&(clearTimeout(x),x=null)}function O(){B(),f.value=null}function T(){B(),x=setTimeout(()=>{x=null;const z=document.activeElement,D=f.value;D!==null&&(y.get(D)===z||m.value?.contains(z))||(f.value=null)},tE)}function P(z){n.value&&(B(),f.value=z)}function R(z){C||P(z)}async function H(z,D){n.value&&(z.key==="Enter"||z.key==="ArrowDown"?(z.preventDefault(),P(D),await He(),await m.value?.focusFirst()):z.key==="Escape"&&f.value!==null&&(z.preventDefault(),O()))}function S(){const z=f.value;O(),z!==null&&(C=!0,y.get(z)?.focus(),C=!1)}function I(){r(!1),He(()=>document.querySelector("[data-sidebar-collapse]")?.focus())}return Ne(n,z=>{z||O()}),Et(B),(z,D)=>(p(),g("nav",{"aria-label":s(h)("backend::lang.nav.plugins"),class:"sticky top-0 flex h-screen w-rail shrink-0 flex-col items-center gap-1.5 self-start overflow-y-auto border-r border-side-border bg-side pt-3.5 pb-3"},[b("button",{type:"button","data-theme-toggle":"","aria-label":i.value,title:i.value,class:"mb-3.5 flex size-10 shrink-0 items-center justify-center rounded-inner bg-accent-soft transition-colors duration-150 ease-out hover:bg-side-hover",onClick:D[0]||(D[0]=(...N)=>s(sm)&&s(sm)(...N))},[(p(),U(Kt(o.value),{size:22,class:"text-accent","aria-hidden":"true"}))],8,Z3),(p(!0),g(ve,null,Me(c.value,N=>(p(),U(s(qn),{key:N.entry.code,ref_for:!0,ref:X=>E(N.entry.code,X),to:N.to,"data-rail-item":N.entry.code,"aria-current":N.current?"page":void 0,"aria-haspopup":s(n)?"menu":void 0,"aria-expanded":s(n)?f.value===N.entry.code?"true":"false":void 0,"aria-controls":s(n)&&f.value===N.entry.code?k(N.entry.code):void 0,class:pe([N.current?"bg-accent-soft font-bold text-accent":"text-side-text hover:bg-side-hover hover:text-white","flex w-[92px] flex-col items-center gap-1 rounded-inner px-1 py-2 text-center text-[11px] leading-[1.2] tracking-[-0.01em] no-underline transition-colors duration-150 ease-out"]),onMouseenter:X=>P(N.entry.code),onMouseleave:T,onFocus:X=>R(N.entry.code),onBlur:T,onKeydown:X=>H(X,N.entry.code)},{default:F(()=>[(p(),U(Kt(N.icon),{size:20,"aria-hidden":"true"})),b("span",X3,$(N.entry.label),1)]),_:2},1032,["to","data-rail-item","aria-current","aria-haspopup","aria-expanded","aria-controls","class","onMouseenter","onFocus","onKeydown"]))),128)),s(n)&&v.value?(p(),U(Y3,{key:0,id:k(v.value.code),ref_key:"flyout",ref:m,entry:v.value,onMouseenter:B,onMouseleave:T,onFocusin:B,onFocusout:T,onEscape:S,onLeave:T,onNavigate:O},null,8,["id","entry"])):G("",!0),D[1]||(D[1]=b("span",{class:"flex-1","aria-hidden":"true"},null,-1)),s(n)&&!s(a)?(p(),g("button",{key:1,type:"button","data-sidebar-expand":"","aria-label":s(h)("backend::lang.nav.expand"),title:s(h)("backend::lang.nav.expand"),class:"mb-1 flex size-10 items-center justify-center rounded-inner text-side-text transition-colors duration-150 ease-out hover:bg-side-hover hover:text-white",onClick:I},[L(s(ub),{size:20,"aria-hidden":"true"})],8,Q3)):G("",!0),s(O2)?(p(),U(s(qn),{key:2,to:"/settings","data-rail-settings":"","aria-current":d.value?"page":void 0,class:pe([d.value?"bg-accent-soft font-bold text-accent":"text-side-text hover:bg-side-hover hover:text-white","flex w-[92px] flex-col items-center gap-1 rounded-inner px-1 py-2 text-center text-[11px] leading-[1.2] tracking-[-0.01em] no-underline transition-colors duration-150 ease-out"])},{default:F(()=>[L(s(fb),{size:20,"aria-hidden":"true"}),b("span",eE,$(s(h)("backend::lang.nav.settings")),1)]),_:1},8,["aria-current","class"])):G("",!0)],8,J3))}}),aE=["aria-label"],rE={class:"mb-3.5 flex h-10 items-center justify-between gap-2 pl-2"},lE={class:"truncate text-[16px] font-bold"},oE=["aria-label","title"],sE=le({__name:"SectionPanel",props:{entry:{}},setup(e){const t=e,n=yn(),a=_(()=>ro(n.path)),r=_(()=>t.entry.sideMenu.flatMap(o=>{const i=Kn(o.controller);return i?[{item:o,to:i,icon:As(o.icon),current:a.value===o.controller}]:[]}));function l(){Ef(!0),He(()=>document.querySelector("[data-sidebar-expand]")?.focus())}return(o,i)=>(p(),g("aside",{"aria-label":s(h)("backend::lang.nav.sections"),class:"sticky top-0 flex h-screen w-panel shrink-0 flex-col gap-0.5 self-start overflow-y-auto border-r border-border bg-surface px-3 py-3.5"},[b("div",rE,[b("span",lE,$(e.entry.label),1),b("button",{type:"button","data-sidebar-collapse":"","aria-label":s(h)("backend::lang.nav.collapse"),title:s(h)("backend::lang.nav.collapse"),class:"flex size-[30px] shrink-0 items-center justify-center rounded-tab text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text",onClick:l},[L(s($f),{size:18,"aria-hidden":"true"})],8,oE)]),(p(!0),g(ve,null,Me(r.value,u=>(p(),U(s(qn),{key:u.item.code,to:u.to,"aria-current":u.current?"page":void 0,class:pe([u.current?"bg-sel font-semibold text-text":"font-medium text-muted hover:bg-hover hover:text-text","flex h-nav items-center gap-3 rounded-control px-3 no-underline transition-colors duration-150 ease-out"])},{default:F(()=>[(p(),U(Kt(u.icon),{size:18,"aria-hidden":"true"})),b("span",null,$(u.item.label),1)]),_:2},1032,["to","aria-current","class"]))),128))],8,aE))}}),iE=["aria-label"],uE={class:"mb-3.5 flex h-10 items-center justify-between gap-2 pl-2"},cE={class:"truncate text-[16px] font-bold"},dE=["aria-label","title"],fE=le({__name:"SettingsPanel",props:{section:{}},setup(e){function t(){Ef(!0),He(()=>document.querySelector("[data-sidebar-expand]")?.focus())}return(n,a)=>(p(),g("aside",{"data-settings-panel":"","aria-label":s(h)("backend::lang.nav.sections"),class:"sticky top-0 flex h-screen w-panel shrink-0 flex-col gap-0.5 self-start overflow-y-auto border-r border-border bg-surface px-3 py-3.5"},[b("div",uE,[b("span",cE,$(e.section.category||s(h)("backend::lang.nav.settings")),1),b("button",{type:"button","data-sidebar-collapse":"","aria-label":s(h)("backend::lang.nav.collapse"),title:s(h)("backend::lang.nav.collapse"),class:"flex size-[30px] shrink-0 items-center justify-center rounded-tab text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text",onClick:t},[L(s($f),{size:18,"aria-hidden":"true"})],8,dE)]),(p(!0),g(ve,null,Me(e.section.entries,r=>(p(),U(s(qn),{key:r.code,to:s(wf)(r),"data-settings-panel-item":r.code,"aria-current":r.code===e.section.current.code?"page":void 0,class:pe([r.code===e.section.current.code?"bg-sel font-semibold text-text":"font-medium text-muted hover:bg-hover hover:text-text","flex h-nav items-center gap-3 rounded-control px-3 no-underline transition-colors duration-150 ease-out"])},{default:F(()=>[(p(),U(Kt(s(As)(r.icon)),{size:18,"aria-hidden":"true"})),b("span",null,$(r.label),1)]),_:2},1032,["to","data-settings-panel-item","aria-current","class"]))),128))],8,iE))}}),pE=["aria-label"],vE={class:"flex min-w-0 items-center gap-2"},mE=["aria-current"],hE=le({__name:"Breadcrumbs",setup(e){const t=yn(),n=_(()=>{if(t.name==="account")return[{label:h("backend::lang.myaccount.menu_label")}];if(t.name==="plugins")return[{label:h("backend::lang.nav.settings"),to:"/settings"},{label:h("backend::lang.plugins.title")}];if(t.name==="settings"||t.name==="settings-form"){const i=[{label:h("backend::lang.nav.settings"),to:"/settings"}],u=t.name==="settings-form"?os(String(t.params.code??"")):null;return u&&i.push({label:u.label}),i}const a=ws(String(t.params.vendor??""),String(t.params.plugin??"")),r=ro(t.path);if(!a){const i=wu(r);if(!i)return[];const u=[{label:h("backend::lang.nav.settings"),to:"/settings"},{label:i.label,to:wf(i)}];return(t.name==="record"||t.name==="create")&&qo.value!==""&&u.push({label:qo.value}),u}const l=[{label:a.label,to:kf(a)??void 0}],o=a.sideMenu.find(i=>i.controller===r)??null;return o&&l.push({label:o.label,to:Kn(o.controller)??void 0}),(t.name==="record"||t.name==="create")&&qo.value!==""&&l.push({label:qo.value}),l});return(a,r)=>(p(),g("nav",{"aria-label":s(h)("backend::lang.nav.breadcrumbs"),class:"min-w-0"},[b("ol",vE,[(p(!0),g(ve,null,Me(n.value,(l,o)=>(p(),g("li",{key:o,"data-crumb":"",class:"flex min-w-0 items-center gap-2"},[o>0?(p(),U(s(Cs),{key:0,size:14,class:"shrink-0 text-muted","aria-hidden":"true"})):G("",!0),o===n.value.length-1||!l.to?(p(),g("span",{key:1,"aria-current":o===n.value.length-1?"page":void 0,class:pe([o===n.value.length-1?"font-semibold text-text":"text-muted","truncate"])},$(l.label),11,mE)):(p(),U(s(qn),{key:2,to:l.to,class:"truncate text-muted no-underline transition-colors duration-150 ease-out hover:text-text"},{default:F(()=>[ye($(l.label),1)]),_:2},1032,["to"]))]))),128))])],8,pE))}});function im(e){return typeof e=="string"?`'${e}'`:new gE().serialize(e)}const yE=" _-,;:!?.'\"()[]{}@*/\\&#%`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz",Us=(function(){const e=new Uint8Array(128);for(let t=0;t<69;t++)e[yE.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function hc(e,t){if(e===t)return 0;const n=Math.min(e.length,t.length);let a=0;for(let r=0;ro?-1:1)}return e.length!==t.length?e.lengththis.compare(o[0],i[0]));let l=`${n}{`;for(let o=0;othis.compare(a,r)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}for(const t of["Error","RegExp","URL"])e.prototype["$"+t]=function(n){return`${t}(${n})`};for(const t of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+t]=function(n){return`${t}[${n.join(",")}]`};for(const t of["BigInt64Array","BigUint64Array"])e.prototype["$"+t]=function(n){return`${t}[${n.join("n,")}${n.length>0?"n":""}]`};return e})();function is(e,t){return e===t||im(e)===im(t)}function Hs(e,t){let n=e;const a=t.toString(),r=a.indexOf("."),l=r>=0?a.length-r:0;if(l>0){const o=10**l;n=Math.round(n*o)/o}return n}function yc(e,t,n,a){t=Number(t),n=Number(n);const r=(e-(Number.isNaN(t)?0:t))%a;let l=Hs(Math.abs(r)*2>=a?e+Math.sign(r)*(a-Math.abs(r)):e-r,a);return Number.isNaN(t)?!Number.isNaN(n)&&l>n&&(l=Math.floor(Hs(n/a,a))*a):ln&&(l=t+Math.floor(Hs((n-t)/a,a))*a),l=Hs(l,a),l}function At(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,a=Symbol(n);return[o=>{const i=it(a,o);if(i||i===null)return i;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(vt(a,o),o)]}function Gt(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Af(e,t,n){const a=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),a.dispatchEvent(r)}function wn(e){return e==null}function um(e,t){return wn(e)?!1:Array.isArray(e)?e.some(n=>is(n,t)):is(e,t)}function bE(e,t){var n;const a=ul();return Sn(()=>{a.value=e()},{...t,flush:(n=t?.flush)!==null&&n!==void 0?n:"sync"}),Ct(a)}function $b(e,t){return nf()?(sy(e,t),!0):!1}function _E(e){let t=!1,n;const a=oy(!0);return((...r)=>(t||(n=a.run(()=>e(...r)),t=!0),n))}const Ua=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const xE=e=>typeof e<"u",kE=Object.prototype.toString,wE=e=>kE.call(e)==="[object Object]",cm=$E();function $E(){var e,t,n;return Ua&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((n=window)===null||n===void 0?void 0:n.navigator.userAgent))}function gc(e){return Array.isArray(e)?e:[e]}function CE(e){return ma()}function Cb(e){if(!Ua)return e;let t=0,n,a;const r=()=>{t-=1,a&&t<=0&&(a.stop(),n=void 0,a=void 0)};return((...l)=>(t+=1,a||(a=oy(!0),n=a.run(()=>e(...l))),$b(r),n))}function SE(e){return zn(Dt(e)?new Proxy({},{get(t,n,a){return s(Reflect.get(e.value,n,a))},set(t,n,a){return Dt(e.value[n])&&!Dt(a)?e.value[n].value=a:e.value[n]=a,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function EE(e){return SE(_(e))}function Tf(e,...t){const n=t.flat(),a=n[0];return EE(()=>Object.fromEntries(typeof a=="function"?Object.entries(Ht(e)).filter(([r,l])=>!a(dn(l),r)):Object.entries(Ht(e)).filter(r=>!n.includes(r[0]))))}function AE(e,t=1e4){return ix((n,a)=>{let r=dn(e),l;const o=()=>setTimeout(()=>{r=dn(e),a()},dn(t));return $b(()=>{clearTimeout(l)}),{get(){return n(),r},set(i){r=i,a(),clearTimeout(l),l=o()}}})}function TE(e,t){CE()&&Et(e,t)}function DE(e,t,n){return Ne(e,t,{...n,immediate:!0})}const Df=Ua?window:void 0;function dl(e){var t;const n=dn(e);return(t=n?.$el)!==null&&t!==void 0?t:n}function to(...e){const t=(a,r,l,o)=>(a.addEventListener(r,l,o),()=>a.removeEventListener(r,l,o)),n=_(()=>{const a=gc(dn(e[0])).filter(r=>r!=null);return a.every(r=>typeof r!="string")?a:void 0});return DE(()=>{var a,r;return[(a=(r=n.value)===null||r===void 0?void 0:r.map(l=>dl(l)))!==null&&a!==void 0?a:[Df].filter(l=>l!=null),gc(dn(n.value?e[1]:e[0])),gc(s(n.value?e[2]:e[1])),dn(n.value?e[3]:e[2])]},([a,r,l,o],i,u)=>{if(!a?.length||!r?.length||!l?.length)return;const d=wE(o)?{...o}:o,c=a.flatMap(f=>r.flatMap(m=>l.map(v=>t(f,m,v,d))));u(()=>{c.forEach(f=>f())})},{flush:"post"})}function OE(){const e=ul(!1),t=ma();return t&&xt(()=>{e.value=!0},t),e}function ME(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function IE(...e){let t,n,a={};e.length===3?(t=e[0],n=e[1],a=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],a=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=Df,eventName:l="keydown",passive:o=!1,dedupe:i=!1}=a,u=ME(t);return to(r,l,c=>{c.repeat&&dn(i)||u(c)&&n(c)},o)}function PE(e){return JSON.parse(JSON.stringify(e))}function qt(e,t,n,a={}){var r,l;const{clone:o=!1,passive:i=!1,eventName:u,deep:d=!1,defaultValue:c,shouldEmit:f}=a,m=ma(),v=n||m?.emit||(m==null||(r=m.$emit)===null||r===void 0?void 0:r.bind(m))||(m==null||(l=m.proxy)===null||l===void 0||(l=l.$emit)===null||l===void 0?void 0:l.bind(m?.proxy));let y=u;t||(t="modelValue"),y=y||`update:${t.toString()}`;const x=E=>o?typeof o=="function"?o(E):PE(E):E,C=()=>xE(e[t])?x(e[t]):c,k=E=>{f?f(E)&&v(y,E):v(y,E)};if(i){const E=A(C());let B=!1;return Ne(()=>e[t],O=>{B||(B=!0,E.value=x(O),He(()=>B=!1))}),Ne(E,O=>{!B&&(O!==e[t]||d)&&k(O)},{deep:d}),E}else return _({get(){return C()},set(E){k(E)}})}function Of(e){return e?e.flatMap(t=>t.type===ve?Of(t.children):[t]):[]}const RE=["INPUT","TEXTAREA"];function dm(e,t,n,a={}){if(!t||a.enableIgnoredElement&&RE.includes(t.nodeName))return null;const{arrowKeyOptions:r="both",attributeName:l="[data-reka-collection-item]",itemsArray:o=[],loop:i=!0,dir:u="ltr",preventScroll:d=!0,focus:c=!1}=a,[f,m,v,y,x,C]=[e.key==="ArrowRight",e.key==="ArrowLeft",e.key==="ArrowUp",e.key==="ArrowDown",e.key==="Home",e.key==="End"],k=v||y,E=f||m;if(!x&&!C&&(!k&&!E||r==="vertical"&&E||r==="horizontal"&&k))return null;const B=n?Array.from(n.querySelectorAll(l)):o;if(!B.length)return null;d&&e.preventDefault();let O=null;return E||k?O=Sb(B,t,{goForward:k?y:u==="ltr"?f:m,loop:i}):x?O=B.at(0)||null:C&&(O=B.at(-1)||null),c&&O?.focus(),O}function Sb(e,t,n,a=e.includes(t)?e.length:e.length+1){if(--a===0)return null;const r=e.indexOf(t);let l;if(r===-1?l=n.goForward?0:e.length-1:l=n.goForward?r+1:r-1,!n.loop&&(l<0||l>=e.length))return null;const o=(l+e.length)%e.length,i=e[o];return i?i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false"?Sb(e,i,n,a):i:null}const[Su]=At("ConfigProvider");function bc(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Sd(e,t,n=".",a){if(!bc(t))return Sd(e,{},n,a);const r={...t};for(const l of Object.keys(e)){if(l==="__proto__"||l==="constructor")continue;const o=e[l];o!=null&&(a&&a(r,l,o,n)||(Array.isArray(o)&&Array.isArray(r[l])?r[l]=[...o,...r[l]]:bc(o)&&bc(r[l])?r[l]=Sd(o,r[l],(n?`${n}.`:"")+l.toString(),a):r[l]=o))}return r}function qE(e){return(...t)=>t.reduce((n,a)=>Sd(n,a,"",e),{})}const Eb=qE(),LE=Cb(()=>{const e=A(new Map),t=A(),n=_(()=>{for(const o of e.value.values())if(o)return!0;return!1}),a=Su({scrollBody:A(!0)});let r=null;const l=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",cm&&r?.(),t.value=void 0};return Ne(n,(o,i)=>{if(!Ua)return;if(!o){i&&l();return}t.value===void 0&&(t.value=document.body.style.overflow);const u=window.innerWidth-document.documentElement.clientWidth,d={padding:u,margin:0},c=a.scrollBody?.value?typeof a.scrollBody.value=="object"?Eb({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 c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),cm&&(r=to(document,"touchmove",f=>NE(f),{passive:!1})),He(()=>{n.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),e});function Mf(e){const t=Math.random().toString(36).substring(2,7),n=LE();n.value.set(t,e??!1);const a=_({get:()=>n.value.get(t)??!1,set:r=>n.value.set(t,r)});return TE(()=>{n.value.delete(t)}),a}function Ab(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Ul(e,t){return e-t*Math.floor(e/t)}const Tb=1721426;function Qr(e,t,n,a){t=Ts(e,t);let r=t-1,l=-2;return n<=2?l=0:cr(t)&&(l=-1),Tb-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+l+a)}function cr(e){return e%4===0&&(e%100!==0||e%400===0)}function Ts(e,t){return e==="BC"?1-t:t}function Eu(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const BE={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 Gn{fromJulianDay(t){let n=t,a=n-Tb,r=Math.floor(a/146097),l=Ul(a,146097),o=Math.floor(l/36524),i=Ul(l,36524),u=Math.floor(i/1461),d=Ul(i,1461),c=Math.floor(d/365),f=r*400+o*100+u*4+c+(o!==4&&c!==4?1:0),[m,v]=Eu(f),y=n-Qr(m,v,1,1),x=2;n0&&t===Yn()&&!Mb())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:a,day:r,hour:l,minute:o,second:i}=Pb(e,t);return Ib(n,a,r,l,o,i,0)-Math.floor(e/1e3)*1e3}const hm=new Map;function Pb(e,t){let n=hm.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),hm.set(t,n));let a=n.formatToParts(new Date(e)),r={};for(let l of a)l.type!=="literal"&&(r[l.type]=l.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const ym=864e5;function WE(e,t,n,a){return(n===a?[n]:[n,a]).filter(l=>GE(e,t,l))}function GE(e,t,n){let a=Pb(n,t);return e.year===a.year&&e.month===a.month&&e.day===a.day&&e.hour===a.hour&&e.minute===a.minute&&e.second===a.second}function Ea(e,t,n="compatible"){let a=fa(e);if(t==="UTC")return no(a);if(t===Yn()&&n==="compatible"&&!Mb()){a=vn(a,new Gn);let u=new Date,d=Ts(a.era,a.year);return u.setFullYear(d,a.month-1,a.day),u.setHours(a.hour,a.minute,a.second,a.millisecond),u.getTime()}let r=no(a),l=Ad(r-ym,t),o=Ad(r+ym,t),i=WE(a,t,r-l,r-o);if(i.length===1)return i[0];if(i.length>1)switch(n){case"compatible":case"earlier":return i[0];case"later":return i[i.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-l,r-o);case"compatible":case"later":return Math.max(r-l,r-o);case"reject":throw new RangeError("No such absolute time found")}}function Rb(e,t,n="compatible"){return new Date(Ea(e,t,n))}function Aa(e,t){let n=Ad(e,t),a=new Date(e+n),r=a.getUTCFullYear(),l=a.getUTCMonth()+1,o=a.getUTCDate(),i=a.getUTCHours(),u=a.getUTCMinutes(),d=a.getUTCSeconds(),c=a.getUTCMilliseconds();return new Ba(r<1?"BC":"AD",r<1?-r+1:r,l,o,t,n,i,u,d,c)}function YE(e){return new _t(e.calendar,e.era,e.year,e.month,e.day)}function fa(e,t){let n=0,a=0,r=0,l=0;if("timeZone"in e)({hour:n,minute:a,second:r,millisecond:l}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:a,second:r,millisecond:l}=t),new br(e.calendar,e.era,e.year,e.month,e.day,n,a,r,l)}function vn(e,t){if(Pf(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),a=e.copy();return a.calendar=t,a.era=n.era,a.year=n.year,a.month=n.month,a.day=n.day,ll(a),a}function Rf(e,t,n){if(e instanceof Ba)return e.timeZone===t?e:Tu(e,t);let a=Ea(e,t,n);return Aa(a,t)}function JE(e){let t=no(e)-e.offset;return new Date(t)}function Tu(e,t){let n=no(e)-e.offset;return vn(Aa(n,t),e.calendar)}const wo=36e5;function Du(e,t){let n=e.copy(),a="hour"in n?Bb(n,t):0;Td(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Dd(n),qb(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=a,ZE(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){let o=n.calendar.isInverseEra?.(n);n.year=r,n.month=o?1:n.calendar.getMonthsInYear(n),n.day=o?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let l=n.calendar.getMonthsInYear(n);return n.month>l&&(n.month=l,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Td(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function Dd(e){for(;e.month<1;)Td(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Td(e,1)}function ZE(e){for(;e.day<1;)e.month--,Dd(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Dd(e)}function qb(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ll(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),qb(e)}function qf(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function Lb(e,t){return Du(e,qf(t))}function Lf(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),ll(n),n}function us(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Nb(n),n}function XE(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Ks(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Ks(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Ks(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Ks(e.hour,24),t}function Nb(e){e.millisecond=Math.max(0,Math.min(e.millisecond,999)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Ks(e,t){let n=e%t;return n<0&&(n+=t),n}function Bb(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,XE(e)}function Fb(e,t){let n=e.copy();return Bb(n,t),n}function QE(e,t){return Fb(e,qf(t))}function Nf(e,t,n,a){let r=e.copy();switch(t){case"era":{let l=e.calendar.getEras(),o=l.indexOf(e.era);if(o<0)throw new Error("Invalid era: "+e.era);o=Ta(o,n,0,l.length-1,a?.round),r.era=l[o],ll(r);break}case"year":r.calendar.isInverseEra?.(r)&&(n=-n),r.year=Ta(e.year,n,-1/0,9999,a?.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e);break;case"month":r.month=Ta(e.month,n,1,e.calendar.getMonthsInYear(e),a?.round);break;case"day":r.day=Ta(e.day,n,1,e.calendar.getDaysInMonth(e),a?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(r),ll(r),r}function Bf(e,t,n,a){let r=e.copy();switch(t){case"hour":{let l=e.hour,o=0,i=23;if(a?.hourCycle===12){let u=l>=12;o=u?12:0,i=u?23:11}r.hour=Ta(l,n,o,i,a?.round);break}case"minute":r.minute=Ta(e.minute,n,0,59,a?.round);break;case"second":r.second=Ta(e.second,n,0,59,a?.round);break;case"millisecond":r.millisecond=Ta(e.millisecond,n,0,999,a?.round);break;default:throw new Error("Unsupported field "+t)}return r}function Ta(e,t,n,a,r=!1){if(r){e+=Math.sign(t),e0?e=Math.ceil(e/l)*l:e=Math.floor(e/l)*l,e>a&&(e=n)}else e+=t,ea&&(e=n+(e-a-1));return e}function Vb(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let r=Du(fa(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Ea(r,e.timeZone)}else n=no(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let a=Aa(n,e.timeZone);return vn(a,e.calendar)}function eA(e,t){return Vb(e,qf(t))}function tA(e,t,n,a){switch(t){case"hour":{let r=0,l=23;if(a?.hourCycle===12){let y=e.hour>=12;r=y?12:0,l=y?23:11}let o=fa(e),i=vn(us(o,{hour:r}),new Gn),u=[Ea(i,e.timeZone,"earlier"),Ea(i,e.timeZone,"later")].filter(y=>Aa(y,e.timeZone).day===i.day)[0],d=vn(us(o,{hour:l}),new Gn),c=[Ea(d,e.timeZone,"earlier"),Ea(d,e.timeZone,"later")].filter(y=>Aa(y,e.timeZone).day===d.day).pop(),f=no(e)-e.offset,m=Math.floor(f/wo),v=f%wo;return f=Ta(m,n,Math.floor(u/wo),Math.floor(c/wo),a?.round)*wo+v,vn(Aa(f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return Bf(e,t,n,a);case"era":case"year":case"month":case"day":{let r=Nf(fa(e),t,n,a),l=Ea(r,e.timeZone);return vn(Aa(l,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function nA(e,t,n){let a=fa(e),r=us(Lf(a,t),t);if(r.compare(a)===0)return e;let l=Ea(r,e.timeZone,n);return vn(Aa(l,e.timeZone),e.calendar)}const aA=/^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,rA=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,zb=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function lA(e){let t=e.match(aA);if(!t)throw new Error("Invalid ISO 8601 time string: "+e);return new sa(en(t[1],0,23),t[2]?en(t[2],0,59):0,t[3]?en(t[3],0,59):0,t[4]?en(t[4],0,1/0)*1e3:0)}function jb(e){let t=e.match(rA);if(!t)throw zb.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let n=new _t(en(t[1],0,9999),en(t[2],1,12),1);return n.day=en(t[3],1,n.calendar.getDaysInMonth(n)),n}function gm(e,t){let n=e.match(zb);if(!n)throw new Error("Invalid ISO 8601 date time string: "+e);let a=en(n[1],-9999,9999),r=a<1?"BC":"AD",l=new Ba(r,a<1?-a+1:a,en(n[2],1,12),1,t,0,n[4]?en(n[4],0,23):0,n[5]?en(n[5],0,59):0,n[6]?en(n[6],0,59):0,n[7]?en(n[7],0,1/0)*1e3:0);return l.day=en(n[3],0,l.calendar.getDaysInMonth(l)),n[8]&&(l.offset=en(n[8],-23,23)*36e5+en(n[9]??"0",0,59)*6e4),Tu(l,t)}function en(e,t,n){let a=Number(e);if(an)throw new RangeError(`Value out of range: ${t} <= ${a} <= ${n}`);return a}function Ub(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function Hb(e){let t=vn(e,new Gn),n;return t.era==="BC"?n=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):n=String(t.year).padStart(4,"0"),`${n}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Kb(e){return`${Hb(e)}T${Ub(e)}`}function oA(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4),r=Math.floor(e%36e5%6e4/1e3),l=`${t}${String(n).padStart(2,"0")}:${String(a).padStart(2,"0")}`;return r!==0&&(l+=`:${String(r).padStart(2,"0")}`),l}function sA(e){return`${Kb(e)}${oA(e.offset)}[${e.timeZone}]`}function Ff(e){let t=typeof e[0]=="object"?e.shift():new Gn,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let a=e.shift(),r=e.shift(),l=e.shift();return[t,n,a,r,l]}class _t{#e;constructor(...t){let[n,a,r,l,o]=Ff(t);this.calendar=n,this.era=a,this.year=r,this.month=l,this.day=o,ll(this)}copy(){return this.era?new _t(this.calendar,this.era,this.year,this.month,this.day):new _t(this.calendar,this.year,this.month,this.day)}add(t){return Du(this,t)}subtract(t){return Lb(this,t)}set(t){return Lf(this,t)}cycle(t,n,a){return Nf(this,t,n,a)}toDate(t){return Rb(this,t)}toString(){return Hb(this)}compare(t){return Db(this,t)}}class sa{#e;constructor(t=0,n=0,a=0,r=0){this.hour=t,this.minute=n,this.second=a,this.millisecond=r,Nb(this)}copy(){return new sa(this.hour,this.minute,this.second,this.millisecond)}add(t){return Fb(this,t)}subtract(t){return QE(this,t)}set(t){return us(this,t)}cycle(t,n,a){return Bf(this,t,n,a)}toString(){return Ub(this)}compare(t){return Ob(this,t)}}class br{#e;constructor(...t){let[n,a,r,l,o]=Ff(t);this.calendar=n,this.era=a,this.year=r,this.month=l,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ll(this)}copy(){return this.era?new br(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new br(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Du(this,t)}subtract(t){return Lb(this,t)}set(t){return Lf(us(this,t),t)}cycle(t,n,a){switch(t){case"era":case"year":case"month":case"day":return Nf(this,t,n,a);default:return Bf(this,t,n,a)}}toDate(t,n){return Rb(this,t,n)}toString(){return Kb(this)}compare(t){let n=Db(this,t);return n===0?Ob(this,fa(t)):n}}class Ba{#e;constructor(...t){let[n,a,r,l,o]=Ff(t),i=t.shift(),u=t.shift();this.calendar=n,this.era=a,this.year=r,this.month=l,this.day=o,this.timeZone=i,this.offset=u,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ll(this)}copy(){return this.era?new Ba(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ba(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Vb(this,t)}subtract(t){return eA(this,t)}set(t,n){return nA(this,t,n)}cycle(t,n,a){return tA(this,t,n,a)}toDate(){return JE(this)}toString(){return sA(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-Rf(t,this.timeZone).toDate().getTime()}}const Kl=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],iA=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],mi=[1867,1911,1925,1988,2018],ir=["meiji","taisho","showa","heisei","reiwa"];function bm(e){const t=Kl.findIndex(([n,a,r])=>e.year=0){let[,r,l]=Kl[n];t.month=Math.max(r,t.month),t.month===r&&(t.day=Math.max(l,t.day))}}getEras(){return ir}getYearsInEra(t){let n=ir.indexOf(t.era),a=Kl[n],r=Kl[n+1];if(r==null)return 9999-a[0]+1;let l=r[0]-a[0];return(t.month0?["minguo",t]:["before_minguo",1-t]}class dA extends Gn{fromJulianDay(t){let n=super.fromJulianDay(t),a=Ts(n.era,n.year),[r,l]=km(a);return new _t(this,r,l,n.month,n.day)}toJulianDay(t){return super.toJulianDay(wm(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,a]=km(Gb(t));t.era=n,t.year=a}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(wm(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Ui}constructor(...t){super(...t),this.identifier="roc"}}function wm(e){let[t,n]=Eu(Gb(e));return new _t(t,n,e.month,e.day)}const $m=1948320,Cm=[0,31,62,93,124,155,186,216,246,276,306,336];class fA{fromJulianDay(t){let n=t-$m,a=1+Math.floor((33*n+3)/12053),r=365*(a-1)+Math.floor((8*a+21)/33),l=n-r,o=l<216?Math.floor(l/31):Math.floor((l-6)/30),i=l-Cm[o]+1;return new _t(this,a,o+1,i)}toJulianDay(t){let n=$m-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=Cm[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||Ul(25*t.year+11,33)<8?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const wc=78,Sm=80;class pA extends Gn{fromJulianDay(t){let n=super.fromJulianDay(t),a=n.year-wc,r=t-Qr(n.era,n.year,1,1),l;r=8&&(o+=(t.month-7)*30),o+=t.day-1,o)}getDaysInMonth(t){return t.month===1&&cr(t.year+wc)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Hi=1948440,Em=1948439,Dn=1300,$l=1600,vA=460322;function Ki(e,t,n,a){return a+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function Yb(e,t,n){let a=Math.floor((30*(n-t)+10646)/10631),r=Math.min(12,Math.ceil((n-(29+Ki(t,a,1,1)))/29.5)+1),l=n-Ki(t,a,r,1)+1;return new _t(e,a,r,l)}function Am(e){return(14+11*e)%30<11}class Vf{fromJulianDay(t){return Yb(this,Hi,t)}toJulianDay(t){return Ki(Hi,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&Am(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return Am(t.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class mA extends Vf{fromJulianDay(t){return Yb(this,Em,t)}toJulianDay(t){return Ki(Em,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const hA="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let Od,Wl;function hi(e){return vA+Wl[e-Dn]}function Lo(e,t){let n=e-Dn,a=1<<11-(t-1);return(Od[n]&a)===0?29:30}function Tm(e,t){let n=hi(e);for(let a=1;at.charCodeAt(0)).buffer)),!Wl){Wl=new Uint32Array($l-Dn+1);let t=0;for(let n=Dn;n<=$l;n++){Wl[n-Dn]=t;for(let a=1;a<=12;a++)t+=Lo(n,a)}}}fromJulianDay(t){let n=t-Hi,a=hi(Dn),r=hi($l);if(nr)return super.fromJulianDay(t);{let l=Dn-1,o=1,i=1;for(;i>0;){l++,i=n-hi(l)+1;let u=Dm(l);if(i===u){o=12;break}else if(id;)i-=d,o++,d=Lo(l,o);break}}return new _t(this,l,o,n-Tm(l,o)+1)}}toJulianDay(t){return t.year$l?super.toJulianDay(t):Hi+Tm(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year$l?super.getDaysInMonth(t):Lo(t.year,t.month)}getDaysInYear(t){return t.year$l?super.getDaysInYear(t):Dm(t.year)}}const Om=347997,Jb=1080,Zb=24*Jb,gA=29,bA=12*Jb+793,_A=gA*Zb+bA;function Xr(e){return Ul(e*7+1,19)<7}function yi(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,a=t*29+Math.floor(n/25920);return Ul(3*(a+1),7)<3&&(a+=1),a}function xA(e){let t=yi(e-1),n=yi(e);return yi(e+1)-n===356?2:n-t===382?1:0}function Jo(e){return yi(e)+xA(e)}function Xb(e){return Jo(e+1)-Jo(e)}function kA(e){let t=Xb(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function Ws(e,t){if(t>=6&&!Xr(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=kA(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Xr(e)?30:0:30}class wA{fromJulianDay(t){let n=t-Om,a=n*Zb/_A,r=Math.floor((19*a+234)/235)+1,l=Jo(r),o=Math.floor(n-l);for(;o<1;)r--,l=Jo(r),o=Math.floor(n-l);let i=1,u=0;for(;u6?t.month--:!Xr(n.year)&&Xr(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const Md=1723856,Mm=1824665,Id=5500;function Zo(e,t,n,a){return e+365*t+Math.floor(t/4)+30*(n-1)+a-1}function zf(e,t){let n=Math.floor(4*(t-e)/1461);t>=Zo(e,n+1,1,1)&&n++;let a=1+Math.floor((t-Zo(e,n,1,1))/30),r=t+1-Zo(e,n,a,1);return[n,a,r]}function Qb(e){return Math.floor(e%4/3)}function e1(e,t){return t%13!==0?30:Qb(e)+5}class jf{fromJulianDay(t){let[n,a,r]=zf(Md,t),l="AM";return n<=0&&(l="AA",n+=Id),new _t(this,l,n,a,r)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=Id),Zo(Md,n,t.month,t.day)}getDaysInMonth(t){return e1(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+Qb(t.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class $A extends jf{fromJulianDay(t){let[n,a,r]=zf(Md,t);return n+=Id,new _t(this,"AA",n,a,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class CA extends jf{fromJulianDay(t){let[n,a,r]=zf(Mm,t),l="CE";return n<=0&&(l="BCE",n=1-n),new _t(this,l,n,a,r)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),Zo(Mm,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),e1(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function SA(e){switch(e){case"buddhist":return new cA;case"ethiopic":return new jf;case"ethioaa":return new $A;case"coptic":return new CA;case"hebrew":return new wA;case"indian":return new pA;case"islamic-civil":return new Vf;case"islamic-tbla":return new mA;case"islamic-umalqura":return new yA;case"japanese":return new uA;case"persian":return new fA;case"roc":return new dA;default:return new Gn}}let $c=new Map;class Bn{constructor(t,n={}){this.formatter=t1(t,n),this.options=n}format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n= start date");let a=this.formatter.formatToParts(t),r=this.formatter.formatToParts(n);return[...a.map(l=>({...l,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(l=>({...l,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return TA()&&(this.resolvedHourCycle||(this.resolvedHourCycle=DA(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}}const EA={true:{ja:"h11"},false:{}};function t1(e,t={}){if(typeof t.hour12=="boolean"&&AA()){t={...t};let r=EA[String(t.hour12)][e.split("-")[0]],l=t.hour12?"h12":"h23";t.hourCycle=r??l,delete t.hour12}let n=e+(t?Object.entries(t).sort((r,l)=>r[0]l.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(l=>l.type==="hour").value,10);if(a===0&&r===23)return"h23";if(a===24&&r===23)return"h24";if(a===0&&r===11)return"h11";if(a===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}function On(e,t=Yn()){return cs(e)?e.toDate():e.toDate(t)}function OA(e){return e instanceof br}function cs(e){return e instanceof Ba}function Pd(e){return OA(e)||cs(e)}function vr(e){if(e instanceof Date){const t=e.getFullYear(),n=e.getMonth()+1;return new Date(t,n,0).getDate()}else return e.set({day:100}).day}function dr(e,t){return e.compare(t)<0}function Ec(e,t){return e.compare(t)>0}function MA(e,t,n){const a=Au(e,n,"sun");return t>a?e.subtract({days:a+7-t}):t===a?e:e.subtract({days:a-t})}function IA(e,t,n){const a=Au(e,n,"sun"),r=t===0?6:t-1;return a===r?e:a>r?e.add({days:7-a+r}):e.add({days:r-a})}function Uf(e){const{defaultValue:t,defaultPlaceholder:n,granularity:a="day",locale:r="en"}=e;if(Array.isArray(t)&&t.length)return t.at(-1).copy();if(t&&!Array.isArray(t))return t.copy();if(n)return n.copy();const l=new Date,o=l.getFullYear(),i=l.getMonth()+1,u=l.getDate(),d=["hour","minute","second"],c=new Bn(r),f=SA(c.resolvedOptions().calendar);return d.includes(a??"day")?vn(new br(o,i,u,0,0,0),f):vn(new _t(o,i,u),f)}function PA(e){const{defaultValue:t,defaultPlaceholder:n}=e;return t?t.copy():n?n.copy():new sa(0,0,0)}function RA(e,t){const n=[];for(let a=0;at.set({day:k+1})),i=Ed(t),u=vm(t),d=MA(i,n,r),c=IA(u,n,r),f=Im(d.subtract({days:1}),i),m=Im(u,c.add({days:1})),v=f.length+o.length+m.length;if(a&&v<42){const C=42-v;let k=m.at(-1);k||(k=vm(t));const E=Array.from({length:C},(B,O)=>{const T=O+1;return k.add({days:T})});m.push(...E)}const y=f.concat(o,m),x=RA(y,7);return{value:t,cells:y,rows:x}}function Ur(e){const{numberOfMonths:t,dateObj:n,...a}=e,r=[];if(!t||t===1)return r.push(Tc({...a,dateObj:n})),r;r.push(Tc({...a,dateObj:n}));for(let l=1;l({label:u(On(C.set({month:E}))),value:E}))}function c(C,k={}){return new Bn(n.value,{...t,year:"numeric",...k}).format(C)}function f(C,k){return cs(C)?new Bn(n.value,{...t,...k,timeZone:C.timeZone}).formatToParts(On(C)):new Bn(n.value,{...t,...k}).formatToParts(On(C))}function m(C,k="narrow"){return new Bn(n.value,{...t,weekday:k}).format(C)}function v(C){const E=new Bn(n.value,{...t,hour:"numeric",minute:"numeric"}).formatToParts(C).find(B=>B.type==="dayPeriod")?.value;return E==="PM"||E==="pm"||E==="p.m."?"PM":"AM"}const y={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function x(C,k,E={}){const B={...y,...E},T=f(C,B).find(P=>P.type===k);return T?T.value:""}return{setLocale:r,getLocale:a,fullMonth:u,fullYear:c,fullMonthAndYear:i,toParts:f,custom:l,part:x,dayPeriod:v,selectedDate:o,dayOfWeek:m,getMonths:d}}function ya(e){const t=Su({dir:A("ltr")});return _(()=>e?.value||t.dir?.value||"ltr")}function fl(e){const t=ma(),n=t?.type.emits,a={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(r=>{a[Fo(Zt(r))]=(...l)=>e(r,...l)}),a}let Dc=0;function o1(){Sn(e=>{if(!Ua)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Pm()),document.body.insertAdjacentElement("beforeend",t[1]??Pm()),Dc++,e(()=>{Dc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),Dc--})})}function Pm(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Kf(e){return _(()=>dn(e)?!!dl(e)?.closest("form"):!0)}function Xe(){const e=ma(),t=A(),n=_(()=>a());sf(()=>{n.value!==a()&&lx(t)});function a(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:dl(t)}const r=Object.assign({},e.exposed),l={};for(const i in e.props)Object.defineProperty(l,i,{enumerable:!0,configurable:!0,get:()=>e.props[i]});if(Object.keys(r).length>0)for(const i in r)Object.defineProperty(l,i,{enumerable:!0,configurable:!0,get:()=>r[i]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=l;function o(i){if(t.value=i,!!i&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>i instanceof Element?i:i.$el}),!(i instanceof Element)&&!Object.hasOwn(i,"$el"))){const u=i.$.exposed,d=Object.assign({},l);for(const c in u)Object.defineProperty(d,c,{enumerable:!0,configurable:!0,get:()=>u[c]});e.exposed=d}}return{forwardRef:o,currentRef:t,currentElement:n}}function Ou(e){const t=ma(),n=Object.keys(t?.type.props??{}).reduce((r,l)=>{const o=(t?.type.props[l]).default;return o!==void 0&&(r[l]=o),r},{}),a=dx(e);return _(()=>{const r={},l=t?.vnode.props??{};return Object.keys(l).forEach(o=>{r[Zt(o)]=l[o]}),Object.keys({...n,...r}).reduce((o,i)=>(a.value[i]!==void 0&&(o[i]=a.value[i]),o),{})})}function ga(e,t){const n=Ou(e),a=t?fl(t):{};return _(()=>({...n.value,...a}))}var NA=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Cl=new WeakMap,Gs=new WeakMap,Ys={},Oc=0,s1=function(e){return e&&(e.host||s1(e.parentNode))},BA=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=s1(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},FA=function(e,t,n,a){var r=BA(t,Array.isArray(e)?e:[e]);Ys[n]||(Ys[n]=new WeakMap);var l=Ys[n],o=[],i=new Set,u=new Set(r),d=function(f){!f||i.has(f)||(i.add(f),d(f.parentNode))};r.forEach(d);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(m){if(i.has(m))c(m);else try{var v=m.getAttribute(a),y=v!==null&&v!=="false",x=(Cl.get(m)||0)+1,C=(l.get(m)||0)+1;Cl.set(m,x),l.set(m,C),o.push(m),x===1&&y&&Gs.set(m,!0),C===1&&m.setAttribute(n,"true"),y||m.setAttribute(a,"true")}catch(k){console.error("aria-hidden: cannot operate on ",m,k)}})};return c(t),i.clear(),Oc++,function(){o.forEach(function(f){var m=Cl.get(f)-1,v=l.get(f)-1;Cl.set(f,m),l.set(f,v),m||(Gs.has(f)||f.removeAttribute(a),Gs.delete(f)),v||f.removeAttribute(n)}),Oc--,Oc||(Cl=new WeakMap,Cl=new WeakMap,Gs=new WeakMap,Ys={})}},VA=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),r=NA(e);return r?(a.push.apply(a,Array.from(r.querySelectorAll("[aria-live], script"))),FA(a,r,n,"aria-hidden")):function(){return null}};function Wf(e){let t;Ne(()=>dl(e),n=>{let a=!1;try{a=!!n?.closest("[popover]:not(:popover-open)")}catch{}n&&!a?t=VA(n):t&&t()}),ja(()=>{t&&t()})}function Fa(e,t="reka"){let n;const a=Su({useId:void 0});return a.useId?n=a.useId():n=Ly?.(),t?`${t}-${n}`:n}function oo(){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"}}function Mu(e){const t=Su({locale:A("en")});return _(()=>e?.value||t.locale?.value||"en")}function zA(e){const t=A(),n=_(()=>t.value?.width??0),a=_(()=>t.value?.height??0);return xt(()=>{const r=dl(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const l=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let u,d;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;u=f.inlineSize,d=f.blockSize}else u=r.offsetWidth,d=r.offsetHeight;t.value={width:u,height:d}});return l.observe(r,{box:"border-box"}),()=>l.unobserve(r)}else t.value=void 0}),{width:n,height:a}}function jA(e,t){const n=A(e);function a(l){return t[n.value][l]??n.value}return{state:n,dispatch:l=>{n.value=a(l)}}}function UA(e){const t=AE("",1e3);return{search:t,handleTypeaheadSearch:(r,l)=>{t.value=t.value+r;{const o=Gt(),i=l.map(m=>({...m,textValue:m.value?.textValue??m.ref.textContent?.trim()??""})),u=i.find(m=>m.ref===o),d=i.map(m=>m.textValue),c=KA(d,t.value,u?.textValue),f=i.find(m=>m.textValue===c);return f&&f.ref.focus(),f?.ref}},resetTypeahead:()=>{t.value=""}}}function HA(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function KA(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let o=HA(e,Math.max(l,0));r.length===1&&(o=o.filter(d=>d!==n));const u=o.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}function WA(e,t){const n=A({}),a=A("none"),r=A(e),l=e.value?"mounted":"unmounted";let o;const i=t.value?.ownerDocument.defaultView??Df,{state:u,dispatch:d}=jA(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=C=>{if(Ua){const k=new CustomEvent(C,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(k)}};Ne(e,async(C,k)=>{const E=k!==C;if(await He(),E){const B=a.value,O=Js(t.value);C?(d("MOUNT"),c("enter"),O==="none"&&c("after-enter")):O==="none"||O==="undefined"||n.value?.display==="none"?(d("UNMOUNT"),c("leave"),c("after-leave")):k&&B!==O?(d("ANIMATION_OUT"),c("leave")):(d("UNMOUNT"),c("after-leave"))}},{immediate:!0});const f=C=>{const k=Js(t.value),E=k.includes(CSS.escape(C.animationName)),B=u.value==="mounted"?"enter":"leave";if(C.target===t.value&&E&&(c(`after-${B}`),d("ANIMATION_END"),!r.value)){const O=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=i?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=O)})}C.target===t.value&&k==="none"&&d("ANIMATION_END")},m=C=>{C.target===t.value&&(a.value=Js(t.value))},v=Ne(t,(C,k)=>{C?(n.value=getComputedStyle(C),C.addEventListener("animationstart",m),C.addEventListener("animationcancel",f),C.addEventListener("animationend",f)):(d("ANIMATION_END"),o!==void 0&&i?.clearTimeout(o),k?.removeEventListener("animationstart",m),k?.removeEventListener("animationcancel",f),k?.removeEventListener("animationend",f))},{immediate:!0}),y=Ne(u,()=>{const C=Js(t.value);a.value=u.value==="mounted"?C:"none"});return ja(()=>{v(),y()}),{isPresent:_(()=>["mounted","unmountSuspended"].includes(u.value))}}function Js(e){return e&&getComputedStyle(e).animationName||"none"}var pl=le({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){const{present:a,forceMount:r}=Ht(e),l=A(),{isPresent:o}=WA(a,l);n({present:o});let i=t.default({present:o.value});i=Of(i||[]);const u=ma();if(i&&i?.length>1){const d=u?.parent?.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(c=>` - ${c}`).join(` +`)].join(` +`))}return()=>r.value||a.value||o.value?In(t.default({present:o.value})[0],{ref:d=>{const c=dl(d);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?l.value=c.firstElementChild:l.value=c),c}}):null}});const Rd=le({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;const a=Of(n.default()),r=a.findIndex(u=>u.type!==Un);if(r===-1)return a;const l=a[r];delete l.props?.ref;const o=l.props?je(t,l.props):t,i=mr({...l,props:{}},o);return a.length===1?i:(a[r]=i,a)}}}),GA=["area","img","input"],Qe=le({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const a=e.asChild?"template":e.as;return typeof a=="string"&&GA.includes(a)?()=>In(a,t):a!=="template"?()=>In(e.as,t,{default:n.default}):()=>In(Rd,t,{default:n.default})}});function ol(){const e=A(),t=_(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:dl(e));return{primitiveElement:e,currentElement:t}}const[Ha,YA]=At("DialogRoot");var JA=le({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=qt(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),l=A(),o=A(),{modal:i}=Ht(n);return YA({open:r,modal:i,openModal:()=>{r.value=!0},onOpenChange:u=>{r.value=u},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:l,contentElement:o}),(u,d)=>we(u.$slots,"default",{open:s(r),close:()=>r.value=!1})}}),Dr=JA,ZA=le({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Xe();const n=Ha();return(a,r)=>(p(),U(s(Qe),je(t,{type:a.as==="button"?"button":void 0,onClick:r[0]||(r[0]=l=>s(n).onOpenChange(!1))}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["type"]))}}),_r=ZA;const XA="dismissableLayer.pointerDownOutside",QA="dismissableLayer.focusOutside";function i1(e,t){if(!(t instanceof Element))return!1;const n=t.closest("[data-dismissable-layer]"),a=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(a===n||r.indexOf(a){});return Sn(o=>{if(!Ua||!dn(n))return;const i=async d=>{const c=d.target;if(!(!t?.value||!c)){if(i1(t.value,c)){r.value=!1;return}if(d.target&&!r.value){let m=function(){Af(XA,e,f)};const f={originalEvent:d};d.pointerType==="touch"?(a.removeEventListener("click",l.value),l.value=m,a.addEventListener("click",l.value,{once:!0})):m()}else a.removeEventListener("click",l.value);r.value=!1}},u=window.setTimeout(()=>{a.addEventListener("pointerdown",i)},0);o(()=>{window.clearTimeout(u),a.removeEventListener("pointerdown",i),a.removeEventListener("click",l.value)})}),{onPointerDownCapture:()=>{dn(n)&&(r.value=!0)}}}function t4(e,t,n=!0){const a=t?.value?.ownerDocument??globalThis?.document,r=A(!1);return Sn(l=>{if(!Ua||!dn(n))return;const o=async i=>{if(!t?.value)return;await He(),await He();const u=i.target;!t.value||!u||i1(t.value,u)||i.target&&!r.value&&Af(QA,e,{originalEvent:i})};a.addEventListener("focusin",o),l(()=>a.removeEventListener("focusin",o))}),{onFocusCapture:()=>{dn(n)&&(r.value=!0)},onBlurCapture:()=>{dn(n)&&(r.value=!1)}}}const bn=zn({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});var n4=le({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:l}=Xe(),o=_(()=>l.value?.ownerDocument??globalThis.document),i=_(()=>bn.layersRoot),u=_(()=>l.value?Array.from(i.value).indexOf(l.value):-1),d=_(()=>bn.layersWithOutsidePointerEventsDisabled.size>0),c=_(()=>{const v=Array.from(i.value),[y]=[...bn.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y);return u.value>=x}),f=e4(async v=>{const y=[...bn.branches].some(x=>x?.contains(v.target));!c.value||y||(a("pointerDownOutside",v),a("interactOutside",v),await He(),v.defaultPrevented||a("dismiss"))},l),m=t4(v=>{[...bn.branches].some(x=>x?.contains(v.target))||(a("focusOutside",v),a("interactOutside",v),v.defaultPrevented||a("dismiss"))},l);return IE("Escape",v=>{u.value===i.value.size-1&&(a("escapeKeyDown",v),v.defaultPrevented||a("dismiss"))}),Ne([l,()=>n.disableOutsidePointerEvents],([v,y],x,C)=>{v&&(y&&(bn.layersWithOutsidePointerEventsDisabled.size===0&&(bn.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),bn.layersWithOutsidePointerEventsDisabled.add(v),C(()=>{bn.layersWithOutsidePointerEventsDisabled.delete(v),bn.layersWithOutsidePointerEventsDisabled.size===0&&!wn(bn.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=bn.originalBodyPointerEvents)})),i.value.add(v))},{immediate:!0}),Sn(v=>{v(()=>{l.value&&(i.value.delete(l.value),bn.layersWithOutsidePointerEventsDisabled.delete(l.value))})}),(v,y)=>(p(),U(s(Qe),{ref:s(r),"as-child":v.asChild,as:v.as,"data-dismissable-layer":"",style:cn({pointerEvents:d.value?c.value?"auto":"none":void 0}),onFocusCapture:s(m).onFocusCapture,onBlurCapture:s(m).onBlurCapture,onPointerdownCapture:s(f).onPointerDownCapture},{default:F(()=>[we(v.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Gf=n4;const a4=_E(()=>A([]));function r4(){const e=a4();return{add(t){const n=e.value[0];t!==n&&n?.pause(),e.value=Rm(e.value,t),e.value.unshift(t)},remove(t){e.value=Rm(e.value,t),e.value[0]?.resume()}}}function Rm(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}const Mc="focusScope.autoFocusOnMount",Ic="focusScope.autoFocusOnUnmount",qm={bubbles:!1,cancelable:!0};function l4(e,{select:t=!1}={}){const n=Gt();for(const a of e)if(lr(a,{select:t}),Gt()!==n)return!0}function o4(e){const t=u1(e),n=Lm(t,e),a=Lm(t.reverse(),e);return[n,a]}function u1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lm(e,t){for(const n of e)if(!s4(n,{upTo:t}))return n}function s4(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function i4(e){return e instanceof HTMLInputElement&&"select"in e}function lr(e,{select:t=!1}={}){if(e&&e.focus){const n=Gt();e.focus({preventScroll:!0}),e!==n&&i4(e)&&t&&e.select()}}var u4=le({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,a=t,{currentRef:r,currentElement:l}=Xe(),o=A(null),i=r4(),u=zn({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Sn(c=>{if(!Ua)return;const f=l.value;if(!n.trapped)return;function m(C){if(u.paused||!f)return;const k=C.target;f.contains(k)?o.value=k:lr(o.value,{select:!0})}function v(C){if(u.paused||!f)return;const k=C.relatedTarget;k!==null&&(f.contains(k)||lr(o.value,{select:!0}))}function y(C){const k=o.value;if(k===null||!C.some(O=>O.removedNodes.length>0))return;f.contains(k)||lr(f)}document.addEventListener("focusin",m),document.addEventListener("focusout",v);const x=new MutationObserver(y);f&&x.observe(f,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),x.disconnect()})}),Sn(async c=>{const f=l.value;if(await He(),!f)return;i.add(u);const m=Gt();if(!f.contains(m)){const y=new CustomEvent(Mc,qm);f.addEventListener(Mc,x=>a("mountAutoFocus",x)),f.dispatchEvent(y),y.defaultPrevented||(l4(u1(f),{select:!0}),Gt()===m&&lr(f))}c(()=>{f.removeEventListener(Mc,C=>a("mountAutoFocus",C));const y=new CustomEvent(Ic,qm),x=C=>{a("unmountAutoFocus",C)};f.addEventListener(Ic,x),f.dispatchEvent(y),f.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{y.defaultPrevented||lr(m??document.body,{select:!0}),f.removeEventListener(Ic,x),i.remove(u),f.removeAttribute("data-focus-scope-unmounting")},0)})});function d(c){if(!n.loop&&!n.trapped||u.paused)return;const f=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,m=Gt();if(f&&m){const v=c.currentTarget,[y,x]=o4(v);y&&x?!c.shiftKey&&m===x?(c.preventDefault(),n.loop&&lr(y,{select:!0})):c.shiftKey&&m===y&&(c.preventDefault(),n.loop&&lr(x,{select:!0})):m===v&&c.preventDefault()}}return(c,f)=>(p(),U(s(Qe),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:d},{default:F(()=>[we(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Yf=u4;const c4="menu.itemSelect",qd=["Enter"," "],d4=["ArrowDown","PageUp","Home"],c1=["ArrowUp","PageDown","End"],f4=[...d4,...c1];[...qd],[...qd];function d1(e){return e?"open":"closed"}function f1(e){return e==="indeterminate"}function p1(e){return f1(e)?"indeterminate":e?"checked":"unchecked"}function p4(e){const t=Gt();for(const n of e)if(n===t||(n.focus(),Gt()!==t))return}function v4(e,t){const{x:n,y:a}=e;let r=!1;for(let l=0,o=t.length-1;la!=c>a&&n<(d-i)*(a-u)/(c-u)+i&&(r=!r)}return r}function m4(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return v4(n,t)}function Wi(e){return e.pointerType==="mouse"}var h4=le({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Ha(),{forwardRef:l,currentElement:o}=Xe();return r.titleId||=Fa(void 0,"reka-dialog-title"),r.descriptionId||=Fa(void 0,"reka-dialog-description"),xt(()=>{r.contentElement=o,Gt()!==document.body&&(r.triggerElement.value=Gt())}),(i,u)=>(p(),U(s(Yf),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:u[5]||(u[5]=d=>a("openAutoFocus",d)),onUnmountAutoFocus:u[6]||(u[6]=d=>a("closeAutoFocus",d))},{default:F(()=>[L(s(Gf),je({id:s(r).contentId,ref:s(l),as:i.as,"as-child":i.asChild,"disable-outside-pointer-events":i.disableOutsidePointerEvents,role:"dialog","aria-describedby":s(r).descriptionId,"aria-labelledby":s(r).titleId,"data-state":s(d1)(s(r).open.value)},i.$attrs,{onDismiss:u[0]||(u[0]=d=>s(r).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=d=>a("escapeKeyDown",d)),onFocusOutside:u[2]||(u[2]=d=>a("focusOutside",d)),onInteractOutside:u[3]||(u[3]=d=>a("interactOutside",d)),onPointerDownOutside:u[4]||(u[4]=d=>a("pointerDownOutside",d))}),{default:F(()=>[we(i.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),v1=h4,y4=le({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Ha(),l=fl(a),{forwardRef:o,currentElement:i}=Xe();return Wf(i),(u,d)=>(p(),U(v1,je({...n,...s(l)},{ref:s(o),"trap-focus":s(r).open.value,"disable-outside-pointer-events":n.disableOutsidePointerEvents,onCloseAutoFocus:d[0]||(d[0]=c=>{c.defaultPrevented||(c.preventDefault(),s(r).triggerElement.value?.focus())}),onPointerDownOutside:d[1]||(d[1]=c=>{const f=c.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&c.preventDefault()}),onFocusOutside:d[2]||(d[2]=c=>{c.preventDefault()})}),{default:F(()=>[we(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),g4=y4,b4=le({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=fl(t);Xe();const l=Ha(),o=A(!1),i=A(!1);return(u,d)=>(p(),U(v1,je({...n,...s(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{c.defaultPrevented||(o.value||s(l).triggerElement.value?.focus(),c.preventDefault()),o.value=!1,i.value=!1}),onInteractOutside:d[1]||(d[1]=c=>{c.defaultPrevented||(o.value=!0,c.detail.originalEvent.type==="pointerdown"&&(i.value=!0));const f=c.target;s(l).triggerElement.value?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.value&&c.preventDefault()})}),{default:F(()=>[we(u.$slots,"default")]),_:3},16))}}),_4=b4,x4=le({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Ha(),l=fl(a),{forwardRef:o}=Xe();return(i,u)=>(p(),U(s(pl),{present:i.forceMount||s(r).open.value},{default:F(()=>[s(r).modal.value?(p(),U(g4,je({key:0,ref:s(o)},{...n,...s(l),...i.$attrs}),{default:F(()=>[we(i.$slots,"default")]),_:3},16)):(p(),U(_4,je({key:1,ref:s(o)},{...n,...s(l),...i.$attrs}),{default:F(()=>[we(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Or=x4,k4=le({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(e){const t=e;Xe();const n=Ha();return(a,r)=>(p(),U(s(Qe),je(t,{id:s(n).descriptionId}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["id"]))}}),xr=k4,w4=le({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Ha();return Mf(!0),Xe(),(n,a)=>(p(),U(s(Qe),{as:n.as,"as-child":n.asChild,"data-state":s(t).open.value?"open":"closed",style:{"pointer-events":"auto"},onPointerdown:a[0]||(a[0]=mt(()=>{},["left","self","prevent"]))},{default:F(()=>[we(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),$4=w4,C4=le({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Ha(),{forwardRef:n}=Xe();return(a,r)=>s(t)?.modal.value?(p(),U(s(pl),{key:0,present:a.forceMount||s(t).open.value},{default:F(()=>[L($4,je(a.$attrs,{ref:s(n),as:a.as,"as-child":a.asChild}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):G("v-if",!0)}}),Mr=C4,S4=le({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=OE();return(n,a)=>s(t)||n.forceMount?(p(),U(Sx,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[we(n.$slots,"default")],8,["to","disabled","defer"])):G("v-if",!0)}}),Iu=S4,E4=le({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Iu),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),vl=E4,A4=le({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,n=Ha();return Xe(),(a,r)=>(p(),U(s(Qe),je(t,{id:s(n).titleId}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["id"]))}}),Ir=A4;const[T4,D4]=At("AlertDialogContent");var O4=le({__name:"AlertDialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,r=fl(t);Xe();const l=A();return D4({onCancelElementChange:o=>{l.value=o}}),(o,i)=>(p(),U(s(Or),je({...n,...s(r)},{role:"alertdialog",onPointerDownOutside:i[0]||(i[0]=mt(()=>{},["prevent"])),onInteractOutside:i[1]||(i[1]=mt(()=>{},["prevent"])),onOpenAutoFocus:i[2]||(i[2]=()=>{He(()=>{l.value?.focus({preventScroll:!0})})})}),{default:F(()=>[we(o.$slots,"default")]),_:3},16))}}),M4=O4,I4=le({__name:"AlertDialogCancel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=T4(),{forwardRef:a,currentElement:r}=Xe();return xt(()=>{n.onCancelElementChange(r.value)}),(l,o)=>(p(),U(s(_r),je(t,{ref:s(a)}),{default:F(()=>[we(l.$slots,"default")]),_:3},16))}}),P4=I4,R4=le({__name:"AlertDialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(e){const t=e;return Xe(),(n,a)=>(p(),U(s(xr),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),q4=R4,L4=le({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Xe(),(n,a)=>(p(),U(s(Mr),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),N4=L4,B4=le({__name:"AlertDialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Iu),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),F4=B4,V4=le({__name:"AlertDialogRoot",props:{open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1}},emits:["update:open"],setup(e,{emit:t}){const r=ga(e,t);return Xe(),(l,o)=>(p(),U(s(Dr),je(s(r),{modal:!0}),{default:F(i=>[we(l.$slots,"default",lt(ut(i)))]),_:3},16))}}),z4=V4,j4=le({__name:"AlertDialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e;return Xe(),(n,a)=>(p(),U(s(Ir),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),U4=j4;const Nm="data-reka-collection-item";function Jf(e={}){const{key:t="",isProvider:n=!1}=e,a=`${t}CollectionProvider`;let r;n?(r={collectionRef:A(),itemMap:A(new Map)},vt(a,r)):r=it(a);const l=(c=!1)=>{const f=r.collectionRef.value;if(!f)return[];const m=Array.from(f.querySelectorAll(`[${Nm}]`)),y=Array.from(r.itemMap.value.values()).sort((x,C)=>m.indexOf(x.ref)-m.indexOf(C.ref));return c?y:y.filter(x=>x.ref.dataset.disabled!=="")},o=le({name:"CollectionSlot",inheritAttrs:!1,setup(c,{slots:f,attrs:m}){const{primitiveElement:v,currentElement:y}=ol();return Ne(y,()=>{r.collectionRef.value=y.value}),()=>In(Rd,{ref:v,...m},f)}}),i=le({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(c,{slots:f,attrs:m}){const{primitiveElement:v,currentElement:y}=ol();return Sn(x=>{if(y.value){const C=_i(y.value);r.itemMap.value.set(C,{ref:y.value,value:c.value}),x(()=>r.itemMap.value.delete(C))}}),()=>In(Rd,{...m,[Nm]:"",ref:v},f)}}),u=_(()=>Array.from(r.itemMap.value.values())),d=_(()=>r.itemMap.value.size);return{getItems:l,reactiveItems:u,itemMapSize:d,CollectionSlot:o,CollectionItem:i}}var H4=le({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,n)=>(p(),U(s(Qe),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:F(()=>[we(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Zf=H4,K4=le({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:n,currentElement:a}=ol(),r=_(()=>t.checked??t.value);return Ne(r,(l,o)=>{if(!a.value)return;const i=a.value,u=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(c&&l!==o){const f=new Event("input",{bubbles:!0}),m=new Event("change",{bubbles:!0});c.call(i,l),i.dispatchEvent(f),i.dispatchEvent(m)}}),(l,o)=>(p(),U(Zf,je({ref_key:"primitiveElement",ref:n},{...t,...l.$attrs},{as:"input"}),null,16))}}),Bm=K4,W4=le({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,n=_(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),a=_(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((r,l)=>typeof r=="object"?Object.entries(r).map(([o,i])=>({name:`${t.name}[${l}][${o}]`,value:i})):{name:`${t.name}[${l}]`,value:r}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([r,l])=>({name:`${t.name}[${r}]`,value:l})):[]);return(r,l)=>(p(),g(ve,null,[G(" We render single input if it's required "),n.value?(p(),U(Bm,je({key:r.name},{...t,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(p(!0),g(ve,{key:1},Me(a.value,o=>(p(),U(Bm,je({key:o.name},{ref_for:!0},{...t,...r.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),Xf=W4;const G4="rovingFocusGroup.onEntryFocus",Y4={bubbles:!1,cancelable:!0},J4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Z4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function X4(e,t,n){const a=Z4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return J4[a]}function m1(e,t=!1){const n=Gt();for(const a of e)if(a===n||(a.focus({preventScroll:t}),Gt()!==n))return}function Q4(e,t){return e.map((n,a)=>e[(t+a)%e.length])}const[h1,eT]=At("PopperRoot");var tT=le({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=A();return eT({anchor:t,onAnchorChange:n=>t.value=n}),(n,a)=>we(n.$slots,"default")}}),y1=tT,nT=le({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:a}=Xe(),r=h1();return Iy(()=>{r.onAnchorChange(t.reference??a.value)}),(l,o)=>(p(),U(s(Qe),{ref:s(n),as:l.as,"as-child":l.asChild},{default:F(()=>[we(l.$slots,"default")]),_:3},8,["as","as-child"]))}}),Qf=nT;function aT(e){return e!==null}function rT(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,i=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[d,c]=Ld(n),f={start:"0%",center:"50%",end:"100%"}[c],m=(r.arrow?.x??0)+i/2,v=(r.arrow?.y??0)+u/2;let y="",x="";return d==="bottom"?(y=o?f:`${m}px`,x=`${-u}px`):d==="top"?(y=o?f:`${m}px`,x=`${a.floating.height+u}px`):d==="right"?(y=`${-u}px`,x=o?f:`${v}px`):d==="left"&&(y=`${a.floating.width+u}px`,x=o?f:`${v}px`),{data:{x:y,y:x}}}}}function Ld(e){const[t,n="center"]=e.split("-");return[t,n]}const lT=["top","right","bottom","left"],kr=Math.min,Ma=Math.max,Gi=Math.round,Zs=Math.floor,Ia=e=>({x:e,y:e}),oT={left:"right",right:"left",bottom:"top",top:"bottom"};function g1(e,t,n){return Ma(e,kr(t,n))}function Va(e,t){return typeof e=="function"?e(t):e}function wr(e){return e.split("-")[0]}function so(e){return e.split("-")[1]}function ep(e){return e==="x"?"y":"x"}function tp(e){return e==="y"?"height":"width"}function ia(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function np(e){return ep(ia(e))}function sT(e,t,n){n===void 0&&(n=!1);const a=so(e),r=np(e),l=tp(r);let o=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(o=Yi(o)),[o,Yi(o)]}function iT(e){const t=Yi(e);return[Nd(e),t,Nd(t)]}function Nd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fm=["left","right"],Vm=["right","left"],uT=["top","bottom"],cT=["bottom","top"];function dT(e,t,n){switch(e){case"top":case"bottom":return n?t?Vm:Fm:t?Fm:Vm;case"left":case"right":return t?uT:cT;default:return[]}}function fT(e,t,n,a){const r=so(e);let l=dT(wr(e),n==="start",a);return r&&(l=l.map(o=>o+"-"+r),t&&(l=l.concat(l.map(Nd)))),l}function Yi(e){const t=wr(e);return oT[t]+e.slice(t.length)}function pT(e){var t,n,a,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(a=e.bottom)!=null?a:0,left:(r=e.left)!=null?r:0}}function b1(e){return typeof e!="number"?pT(e):{top:e,right:e,bottom:e,left:e}}function Ji(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function zm(e,t,n){let{reference:a,floating:r}=e;const l=ia(t),o=np(t),i=tp(o),u=wr(t),d=l==="y",c=a.x+a.width/2-r.width/2,f=a.y+a.height/2-r.height/2,m=a[i]/2-r[i]/2;let v;switch(u){case"top":v={x:c,y:a.y-r.height};break;case"bottom":v={x:c,y:a.y+a.height};break;case"right":v={x:a.x+a.width,y:f};break;case"left":v={x:a.x-r.width,y:f};break;default:v={x:a.x,y:a.y}}const y=so(t);return y&&(v[o]+=m*(y==="end"?1:-1)*(n&&d?-1:1)),v}async function vT(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:l,rects:o,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:m=!1,padding:v=0}=Va(t,e),y=b1(v),C=i[m?f==="floating"?"reference":"floating":f],k=Ji(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(C)))==null||n?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(i.floating)),boundary:d,rootBoundary:c,strategy:u})),E=f==="floating"?{x:a,y:r,width:o.floating.width,height:o.floating.height}:o.reference,B=await(l.getOffsetParent==null?void 0:l.getOffsetParent(i.floating)),O=await(l.isElement==null?void 0:l.isElement(B))&&await(l.getScale==null?void 0:l.getScale(B))||{x:1,y:1},T=Ji(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:E,offsetParent:B,strategy:u}):E);return{top:(k.top-T.top+y.top)/O.y,bottom:(T.bottom-k.bottom+y.bottom)/O.y,left:(k.left-T.left+y.left)/O.x,right:(T.right-k.right+y.right)/O.x}}const mT=50,hT=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:l=[],platform:o}=n,i=o.detectOverflow?o:{...o,detectOverflow:vT},u=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:f}=zm(d,a,u),m=a,v=0;const y={};for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:r,rects:l,platform:o,elements:i,middlewareData:u}=t,{element:d,padding:c=0}=Va(e,t)||{};if(d==null)return{};const f=b1(c),m={x:n,y:a},v=np(r),y=tp(v),x=await o.getDimensions(d),C=v==="y",k=C?"top":"left",E=C?"bottom":"right",B=C?"clientHeight":"clientWidth",O=l.reference[y]+l.reference[v]-m[v]-l.floating[y],T=m[v]-l.reference[v],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let R=P?P[B]:0;(!R||!await(o.isElement==null?void 0:o.isElement(P)))&&(R=i.floating[B]||l.floating[y]);const H=O/2-T/2,S=R/2-x[y]/2-1,I=kr(f[k],S),z=kr(f[E],S),D=R-x[y]-z,N=R/2-x[y]/2+H,X=g1(I,N,D),W=!u.arrow&&so(r)!=null&&N!==X&&l.reference[y]/2-(NX<=0)){var z,D;const X=(((z=l.flip)==null?void 0:z.index)||0)+1,W=R[X];if(W&&(!(f==="alignment"?E!==ia(W):!1)||I.every(se=>ia(se.placement)===E?se.overflows[0]>0:!0)))return{data:{index:X,overflows:I},reset:{placement:W}};let K=(D=I.filter(ae=>ae.overflows[0]<=0).sort((ae,se)=>ae.overflows[1]-se.overflows[1])[0])==null?void 0:D.placement;if(!K)switch(v){case"bestFit":{var N;const ae=(N=I.filter(se=>{if(P){const he=ia(se.placement);return he===E||he==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(he=>he>0).reduce((he,ge)=>he+ge,0)]).sort((se,he)=>se[1]-he[1])[0])==null?void 0:N[0];ae&&(K=ae);break}case"initialPlacement":K=i;break}if(r!==K)return{reset:{placement:K}}}return{}}}};function jm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Um(e){return lT.some(t=>e[t]>=0)}const bT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:r="referenceHidden",...l}=Va(e,t);switch(r){case"referenceHidden":{const o=await a.detectOverflow(t,{...l,elementContext:"reference"}),i=jm(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Um(i)}}}case"escaped":{const o=await a.detectOverflow(t,{...l,altBoundary:!0}),i=jm(o,n.floating);return{data:{escapedOffsets:i,escaped:Um(i)}}}default:return{}}}}},_1=new Set(["left","top"]);async function _T(e,t){const{placement:n,platform:a,elements:r}=e,l=await(a.isRTL==null?void 0:a.isRTL(r.floating)),o=wr(n),i=so(n),u=ia(n)==="y",d=_1.has(o)?-1:1,c=l&&u?-1:1,f=Va(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return i&&typeof y=="number"&&(v=i==="end"?y*-1:y),u?{x:v*c,y:m*d}:{x:m*d,y:v*c}}const xT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:l,placement:o,middlewareData:i}=t,u=await _T(t,e);return o===((n=i.offset)==null?void 0:n.placement)&&(a=i.arrow)!=null&&a.alignmentOffset?{}:{x:r+u.x,y:l+u.y,data:{...u,placement:o}}}}},kT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r,platform:l}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:u={fn:E=>{let{x:B,y:O}=E;return{x:B,y:O}}},...d}=Va(e,t),c={x:n,y:a},f=await l.detectOverflow(t,d),m=ia(r),v=ep(m);let y=c[v],x=c[m];const C=(E,B)=>g1(B+f[E==="y"?"top":"left"],B,B-f[E==="y"?"bottom":"right"]);o&&(y=C(v,y)),i&&(x=C(m,x));const k=u.fn({...t,[v]:y,[m]:x});return{...k,data:{x:k.x-n,y:k.y-a,enabled:{[v]:o,[m]:i}}}}}},wT=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,a;const{x:r,y:l,placement:o,rects:i,middlewareData:u}=t,{offset:d=0,mainAxis:c=!0,crossAxis:f=!0}=Va(e,t),m={x:r,y:l},v=ia(o),y=ep(v);let x=m[y],C=m[v];const k=Va(d,t),E=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:(n=k.mainAxis)!=null?n:0,crossAxis:(a=k.crossAxis)!=null?a:0};if(c){const T=y==="y"?"height":"width",P=i.reference[y]-i.floating[T]+E.mainAxis,R=i.reference[y]+i.reference[T]-E.mainAxis;xR&&(x=R)}if(f){var B,O;const T=y==="y"?"width":"height",P=_1.has(wr(o)),R=i.reference[v]-i.floating[T]+(P&&((B=u.offset)==null?void 0:B[v])||0)+(P?0:E.crossAxis),H=i.reference[v]+i.reference[T]+(P?0:((O=u.offset)==null?void 0:O[v])||0)-(P?E.crossAxis:0);CH&&(C=H)}return{[y]:x,[v]:C}}}},$T=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:a,platform:r,elements:l}=t,{apply:o=()=>{},...i}=Va(e,t),u=await r.detectOverflow(t,i),d=wr(n),c=so(n),f=ia(n)==="y",{width:m,height:v}=a.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=c===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(x=d,y=c==="end"?"top":"bottom");const C=v-u.top-u.bottom,k=m-u.left-u.right,E=kr(v-u[y],C),B=kr(m-u[x],k),O=t.middlewareData.shift,T=!O;let P=E,R=B;O!=null&&O.enabled.x&&(R=k),O!=null&&O.enabled.y&&(P=C),T&&!c&&(f?R=m-2*Ma(u.left,u.right):P=v-2*Ma(u.top,u.bottom)),await o({...t,availableWidth:R,availableHeight:P});const H=await r.getDimensions(l.floating);return m!==H.width||v!==H.height?{reset:{rects:!0}}:{}}}};function Pu(){return typeof window<"u"}function ml(e){return ap(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ka(e){var t;return(t=(ap(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ap(e){return Pu()?e instanceof Node||e instanceof hn(e).Node:!1}function pa(e){return Pu()?e instanceof Element||e instanceof hn(e).Element:!1}function Pr(e){return Pu()?e instanceof HTMLElement||e instanceof hn(e).HTMLElement:!1}function Hm(e){return!Pu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}function Ru(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&r!=="inline"&&r!=="contents"}function CT(e){return/^(table|td|th)$/.test(ml(e))}function qu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ST=/transform|translate|scale|rotate|perspective|filter/,ET=/paint|layout|strict|content/,Hr=e=>!!e&&e!=="none";let Pc;function rp(e){const t=pa(e)?va(e):e;return Hr(t.transform)||Hr(t.translate)||Hr(t.scale)||Hr(t.rotate)||Hr(t.perspective)||!lp()&&(Hr(t.backdropFilter)||Hr(t.filter))||ST.test(t.willChange||"")||ET.test(t.contain||"")}function AT(e){let t=sl(e);for(;Pr(t)&&!fs(t);){if(rp(t))return t;if(qu(t))return null;t=sl(t)}return null}function lp(){return Pc==null&&(Pc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pc}function fs(e){return/^(html|body|#document)$/.test(ml(e))}function va(e){return hn(e).getComputedStyle(e)}function Lu(e){return pa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sl(e){if(ml(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hm(e)&&e.host||Ka(e);return Hm(t)?t.host:t}function x1(e){const t=sl(e);return fs(t)?(e.ownerDocument||e).body:Pr(t)&&Ru(t)?t:x1(t)}function ps(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=x1(e),l=r===((a=e.ownerDocument)==null?void 0:a.body),o=hn(r);if(l){const i=Bd(o);return t.concat(o,o.visualViewport||[],Ru(r)?r:[],i&&n?ps(i):[])}else return t.concat(r,ps(r,[],n))}function Bd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function k1(e){const t=va(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=Pr(e),l=r?e.offsetWidth:n,o=r?e.offsetHeight:a,i=Gi(n)!==l||Gi(a)!==o;return i&&(n=l,a=o),{width:n,height:a,$:i}}function op(e){return pa(e)?e:e.contextElement}function Gl(e){const t=op(e);if(!Pr(t))return Ia(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:l}=k1(t);let o=(l?Gi(n.width):n.width)/a,i=(l?Gi(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!i||!Number.isFinite(i))&&(i=1),{x:o,y:i}}const TT=Ia(0);function w1(e){const t=hn(e);return!lp()||!t.visualViewport?TT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DT(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===hn(e)}function il(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),l=op(e);let o=Ia(1);t&&(a?pa(a)&&(o=Gl(a)):o=Gl(e));const i=DT(l,n,a)?w1(l):Ia(0);let u=(r.left+i.x)/o.x,d=(r.top+i.y)/o.y,c=r.width/o.x,f=r.height/o.y;if(l&&a){const m=hn(l),v=pa(a)?hn(a):a;let y=m,x=Bd(y);for(;x&&v!==y;){const C=Gl(x),k=x.getBoundingClientRect(),E=va(x),B=k.left+(x.clientLeft+parseFloat(E.paddingLeft))*C.x,O=k.top+(x.clientTop+parseFloat(E.paddingTop))*C.y;u*=C.x,d*=C.y,c*=C.x,f*=C.y,u+=B,d+=O,y=hn(x),x=Bd(y)}}return Ji({width:c,height:f,x:u,y:d})}function Nu(e,t){const n=Lu(e).scrollLeft;return t?t.left+n:il(Ka(e)).left+n}function $1(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Nu(e,n),r=n.top+t.scrollTop;return{x:a,y:r}}function OT(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const l=r==="fixed",o=Ka(a),i=t?qu(t.floating):!1;if(a===o||i&&l)return n;let u={scrollLeft:0,scrollTop:0},d=Ia(1);const c=Ia(0),f=Pr(a);if((f||!l)&&((ml(a)!=="body"||Ru(o))&&(u=Lu(a)),f)){const v=il(a);d=Gl(a),c.x=v.x+a.clientLeft,c.y=v.y+a.clientTop}const m=o&&!f&&!l?$1(o,u):Ia(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+c.x+m.x,y:n.y*d.y-u.scrollTop*d.y+c.y+m.y}}function MT(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function IT(e){const t=Lu(e),n=e.ownerDocument.body,a=Ma(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=Ma(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-t.scrollLeft+Nu(e);const o=-t.scrollTop;return va(n).direction==="rtl"&&(l+=Ma(e.clientWidth,n.clientWidth)-a),{width:a,height:r,x:l,y:o}}const PT=25;function RT(e,t,n){n===void 0&&(n="viewport");const a=n==="layoutViewport",r=hn(e),l=Ka(e),o=r.visualViewport;let i=l.clientWidth,u=l.clientHeight,d=0,c=0;if(o){const m=!lp()||t==="fixed";a?m||(d=-o.offsetLeft,c=-o.offsetTop):(i=o.width,u=o.height,m&&(d=o.offsetLeft,c=o.offsetTop))}if(Nu(l)<=0){const m=l.ownerDocument,v=m.body,y=getComputedStyle(v),x=m.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(l.clientWidth-v.clientWidth-x),k=getComputedStyle(l).scrollbarGutter==="stable both-edges"?C/2:C;k<=PT&&(i-=k)}return{width:i,height:u,x:d,y:c}}function qT(e,t){const n=il(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,l=Gl(e),o=e.clientWidth*l.x,i=e.clientHeight*l.y,u=r*l.x,d=a*l.y;return{width:o,height:i,x:u,y:d}}function Km(e,t,n){let a;if(t==="viewport"||t==="layoutViewport")a=RT(e,n,t);else if(t==="document")a=IT(Ka(e));else if(pa(t))a=qT(t,n);else{const r=w1(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Ji(a)}function LT(e,t){const n=t.get(e);if(n)return n;let a=ps(e,[],!1).filter(i=>pa(i)&&ml(i)!=="body"),r=null;const l=va(e).position==="fixed";let o=l?sl(e):e;for(;pa(o)&&!fs(o);){const i=va(o),u=rp(o),d=r?r.position:l?"fixed":"";!u&&(d==="fixed"||d==="absolute"&&i.position==="static")?a=a.filter(f=>f!==o):r=i,o=sl(o)}return t.set(e,a),a}function NT(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const o=[...n==="clippingAncestors"?qu(t)?[]:LT(t,this._c):[].concat(n),a],i=Km(t,o[0],r);let u=i.top,d=i.right,c=i.bottom,f=i.left;for(let m=1;m{i(!1,1e-7)},1e3)}R=!1}try{a=new IntersectionObserver(H,{...P,root:l.ownerDocument})}catch{a=new IntersectionObserver(H,P)}a.observe(e)}const u=hn(e),d=()=>i(n);return u.addEventListener("resize",d),i(!0),()=>{u.removeEventListener("resize",d),o()}}function HT(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=a,d=op(e),c=r||l?[...d?ps(d):[],...t?ps(t):[]]:[];c.forEach(k=>{r&&k.addEventListener("scroll",n),l&&k.addEventListener("resize",n)});const f=d&&i?UT(d,n,l):null;let m=-1,v=null;o&&(v=new ResizeObserver(k=>{let[E]=k;E&&E.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var B;(B=v)==null||B.observe(t)})),n()}),d&&!u&&v.observe(d),t&&v.observe(t));let y,x=u?il(e):null;u&&C();function C(){const k=il(e);x&&!S1(x,k)&&n(),x=k,y=requestAnimationFrame(C)}return n(),()=>{var k;c.forEach(E=>{r&&E.removeEventListener("scroll",n),l&&E.removeEventListener("resize",n)}),f?.(),(k=v)==null||k.disconnect(),v=null,u&&cancelAnimationFrame(y)}}const KT=xT,WT=kT,Gm=gT,GT=$T,YT=bT,JT=yT,ZT=wT,XT=(e,t,n)=>{const a=new Map,r=n??{},l={...jT,...r.platform,_c:a};return hT(e,t,{...r,platform:l})};function QT(e){return e!=null&&typeof e=="object"&&"$el"in e}function Fd(e){if(QT(e)){const t=e.$el;return ap(t)&&ml(t)==="#comment"?null:t}return e}function Ml(e){return typeof e=="function"?e():s(e)}function e5(e){return{name:"arrow",options:e,fn(t){const n=Fd(Ml(e.element));return n==null?{}:JT({element:n,padding:e.padding}).fn(t)}}}function E1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ym(e,t){const n=E1(e);return Math.round(t*n)/n}function t5(e,t,n){n===void 0&&(n={});const a=n.whileElementsMounted,r=_(()=>{var R;return(R=Ml(n.open))!=null?R:!0}),l=_(()=>Ml(n.middleware)),o=_(()=>{var R;return(R=Ml(n.placement))!=null?R:"bottom"}),i=_(()=>{var R;return(R=Ml(n.strategy))!=null?R:"absolute"}),u=_(()=>{var R;return(R=Ml(n.transform))!=null?R:!0}),d=_(()=>Fd(e.value)),c=_(()=>Fd(t.value)),f=A(0),m=A(0),v=A(i.value),y=A(o.value),x=ul({}),C=A(!1),k=_(()=>{const R={position:v.value,left:"0",top:"0"};if(!c.value)return R;const H=Ym(c.value,f.value),S=Ym(c.value,m.value);return u.value?{...R,transform:"translate("+H+"px, "+S+"px)",...E1(c.value)>=1.5&&{willChange:"transform"}}:{position:v.value,left:H+"px",top:S+"px"}});let E;function B(){if(d.value==null||c.value==null)return;const R=r.value;XT(d.value,c.value,{middleware:l.value,placement:o.value,strategy:i.value}).then(H=>{f.value=H.x,m.value=H.y,v.value=H.strategy,y.value=H.placement,x.value=H.middlewareData,C.value=R!==!1})}function O(){typeof E=="function"&&(E(),E=void 0)}function T(){if(O(),a===void 0){B();return}if(d.value!=null&&c.value!=null){E=a(d.value,c.value,B);return}}function P(){r.value||(C.value=!1)}return Ne([l,o,i,r],B,{flush:"sync"}),Ne([d,c],T,{flush:"sync"}),Ne(r,P,{flush:"sync"}),nf()&&sy(O),{x:kl(f),y:kl(m),strategy:kl(v),placement:kl(y),middlewareData:kl(x),isPositioned:kl(C),floatingStyles:k,update:B}}const A1={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[cW,n5]=At("PopperContent");var a5=le({inheritAttrs:!1,__name:"PopperContent",props:Yy({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...A1}),emits:["placed"],setup(e,{emit:t}){const n=e,a=t,r=h1(),{forwardRef:l,currentElement:o}=Xe(),i=A(),u=A(),{width:d,height:c}=zA(u),f=_(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),m=_(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),v=_(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),y=_(()=>({padding:m.value,boundary:v.value.filter(aT),altBoundary:v.value.length>0})),x=_(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),C=bE(()=>[KT({mainAxis:n.sideOffset+c.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Gm({...y.value,...x.value}),n.avoidCollisions&&WT({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?ZT():void 0,...y.value}),!n.prioritizePosition&&n.avoidCollisions&&Gm({...y.value,...x.value}),GT({...y.value,apply:({elements:D,rects:N,availableWidth:X,availableHeight:W})=>{const{width:K,height:ae}=N.reference,se=D.floating.style;se.setProperty("--reka-popper-available-width",`${X}px`),se.setProperty("--reka-popper-available-height",`${W}px`),se.setProperty("--reka-popper-anchor-width",`${K}px`),se.setProperty("--reka-popper-anchor-height",`${ae}px`)}}),u.value&&e5({element:u.value,padding:n.arrowPadding}),rT({arrowWidth:d.value,arrowHeight:c.value}),n.hideWhenDetached&&YT({strategy:"referenceHidden",...y.value})]),k=_(()=>n.reference??r.anchor.value),{floatingStyles:E,placement:B,isPositioned:O,middlewareData:T}=t5(k,i,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...D)=>HT(...D,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:C}),P=_(()=>Ld(B.value)[0]),R=_(()=>Ld(B.value)[1]);Iy(()=>{O.value&&a("placed")});const H=_(()=>{const D=T.value.arrow?.centerOffset!==0;return n.hideShiftedArrow&&D}),S=A("");Sn(()=>{o.value&&(S.value=window.getComputedStyle(o.value).zIndex)});const I=_(()=>T.value.arrow?.x??0),z=_(()=>T.value.arrow?.y??0);return n5({placedSide:P,onArrowChange:D=>u.value=D,arrowX:I,arrowY:z,shouldHideArrow:H}),(D,N)=>(p(),g("div",{ref_key:"floatingRef",ref:i,"data-reka-popper-content-wrapper":"",style:cn({...s(E),transform:s(O)?s(E).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:S.value,"--reka-popper-transform-origin":[s(T).transformOrigin?.x,s(T).transformOrigin?.y].join(" "),...s(T).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[L(s(Qe),je({ref:s(l)},D.$attrs,{"as-child":n.asChild,as:D.as,"data-side":P.value,"data-align":R.value,style:{animation:s(O)?void 0:"none"}}),{default:F(()=>[we(D.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),T1=a5;const sp=["day","month","year"],ip=["hour","minute","second","dayPeriod"],D1=[...sp,...ip];function r5(e){return sp.includes(e)}function O1(e){return D1.includes(e)}const l5=["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"],o5=["year","month","day"],qc={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 s5(e){if(Jm(e))return qc[e];{const t=d5(e);return Jm(t)?qc[t]:qc.en}}function Lc(e,t,n){return i5(e)?s5(n)[e]:c5(e)?t:u5(e)?"––":""}function Jm(e){return l5.includes(e)}function i5(e){return o5.includes(e)}function u5(e){return e==="hour"||e==="minute"||e==="second"}function c5(e){return e==="era"||e==="dayPeriod"}function d5(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const f5=["hour","minute","second"];function Vd(e){return Object.fromEntries(ip.map(t=>t==="dayPeriod"?[t,e.formatter.dayPeriod(On(e.value))]:[t,e.value[t]]))}function Zm(e){const{formatter:t}=e,n=sp.map(a=>[a,e.value[a]]);if("hour"in e.value){const a=Vd({value:e.value,formatter:t});return{...Object.fromEntries(n),...a}}return Object.fromEntries(n)}function p5(e){return Object.fromEntries(ip.map(t=>t==="dayPeriod"?[t,"AM"]:[t,null]).filter(([t])=>!(t==="literal"||t===null||e==="minute"&&t==="second"||e==="hour"&&(t==="second"||t==="minute"))))}function v5(e){const t=D1.map(n=>n==="dayPeriod"?[n,"AM"]:[n,null]).filter(([n])=>n==="literal"||n===null||e==="minute"&&n==="second"||e==="hour"&&(n==="second"||n==="minute")?!1:e==="day"?!f5.includes(n)&&n!=="dayPeriod":!0);return Object.fromEntries(t)}function m5(e){const{segmentValues:t,formatter:n,locale:a}=e;function r(o){if("hour"in t){const i=t[o];return i!==null?o==="day"?n.part(e.dateRef.set({[o]:i,month:t.month??1}),o,{hourCycle:ds(e.hourCycle)}):n.part(e.dateRef.set({[o]:i}),o,{hourCycle:ds(e.hourCycle)}):Lc(o,"",a.value)}else{if(r5(o)){const i=t[o];return i!==null?o==="day"?n.part(e.dateRef.set({[o]:i,month:t.month??1}),o):n.part(e.dateRef.set({[o]:i}),o):Lc(o,"",a.value)}return""}}return Object.keys(t).reduce((o,i)=>{if(!O1(i))return o;if("hour"in t&&i==="dayPeriod"){const u=t[i];u!==null?o[i]=u:o[i]=Lc(i,"AM",a.value)}else o[i]=r(i);return o},{})}function h5(e){const{granularity:t,formatter:n,contentObj:a,hideTimeZone:r,hourCycle:l,isTimeValue:o}=e;return n.toParts(e.dateRef,qA(t,l,o)).map(d=>["literal","timeZoneName",null].includes(d.type)||!O1(d.type)?{part:d.type,value:d.value}:{part:d.type,value:a[d.type]}).filter(d=>!(d.part===null||d.value===null||d.part==="timeZoneName"&&(!cs(e.dateRef)||r)||(!cs(e.dateRef)||r)&&d.part==="literal"&&["[","]"].includes(d.value.trim())))}function M1(e){const t=m5(e),n=h5({contentObj:t,...e});return{obj:t,arr:n}}function wa(e){const t=oo();return e===t.ARROW_RIGHT||e===t.ARROW_LEFT}function Gr(e){return!Number.isNaN(Number.parseInt(e))}function er(e){const t=oo();return!!([t.ENTER,t.ARROW_UP,t.ARROW_DOWN,t.ARROW_LEFT,t.ARROW_RIGHT,t.BACKSPACE,t.SPACE,"a","A","p","P"].includes(e)||Gr(e))}function Xm(e){return Array.from(e.querySelectorAll("[data-reka-date-field-segment]")).filter(t=>t.getAttribute("data-reka-date-field-segment")!=="literal")}function Qm(e){return Array.from(e.querySelectorAll("[data-reka-time-field-segment]")).filter(t=>t.getAttribute("data-reka-time-field-segment")!=="literal")}const y5=/^\d$/;function Rr(e){return{role:"spinbutton",contenteditable:!0,tabindex:e.disabled?void 0:0,spellcheck:!1,inputmode:"numeric",autocorrect:"off",enterkeyhint:"next",style:"caret-color: transparent;"}}function g5(e){const{segmentValues:t,placeholder:n}=e,a=t.day===null,r={};t.day&&(r.day=t.day),t.month&&(r.month=t.month);const l=Object.keys(r).length>0?n.set(r):n,o=l.day,i=1,u=vr(l),d=a?"Empty":`${o}`;return{...Rr(e),"aria-label":"day,","aria-valuemin":i,"aria-valuemax":u,"aria-valuenow":o,"aria-valuetext":d,"data-placeholder":a?"":void 0}}function b5(e){const{segmentValues:t,placeholder:n,formatter:a}=e,r=t.month===null,l=t.month?n.set({month:t.month}):n,o=l.month,i=1,u=12,d=r?"Empty":`${o} - ${a.fullMonth(On(l))}`;return{...Rr(e),"aria-label":"month, ",contenteditable:!0,"aria-valuemin":i,"aria-valuemax":u,"aria-valuenow":o,"aria-valuetext":d,"data-placeholder":r?"":void 0}}function _5(e){const{segmentValues:t,placeholder:n}=e,a=t.year===null,r=t.year?n.set({year:t.year}):n,l=1,o=9999,i=r.year,u=a?"Empty":`${i}`;return{...Rr(e),"aria-label":"year, ","aria-valuemin":l,"aria-valuemax":o,"aria-valuenow":i,"aria-valuetext":u,"data-placeholder":a?"":void 0}}function x5(e){const{segmentValues:t,hourCycle:n,placeholder:a}=e;if(!("hour"in t)||!("hour"in a))return{};const r=t.hour===null,l=t.hour?a.set({hour:t.hour}):a,o=n===12?1:0,i=n===12?12:23,u=l.hour,d=r?"Empty":`${u} ${t.dayPeriod??""}`;return{...Rr(e),"aria-label":"hour, ","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":u,"aria-valuetext":d,"data-placeholder":r?"":void 0}}function k5(e){const{segmentValues:t,placeholder:n}=e;if(!("minute"in t)||!("minute"in n))return{};const a=t.minute===null,l=(t.minute?n.set({minute:t.minute}):n).minute,o=0,i=59,u=a?"Empty":`${l}`;return{...Rr(e),"aria-label":"minute, ","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":l,"aria-valuetext":u,"data-placeholder":a?"":void 0}}function w5(e){const{segmentValues:t,placeholder:n}=e;if(!("second"in t)||!("second"in n))return{};const a=t.second===null,l=(t.second?n.set({second:t.second}):n).second,o=0,i=59,u=a?"Empty":`${l}`;return{...Rr(e),"aria-label":"second, ","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":l,"aria-valuetext":u,"data-placeholder":a?"":void 0}}function $5(e){const{segmentValues:t}=e;if(!("dayPeriod"in t))return{};const n=0,a=12,r=t.hour?t.hour>12?t.hour-12:t.hour:0,l=t.dayPeriod??"AM";return{...Rr(e),inputmode:"text","aria-label":"AM/PM","aria-valuemin":n,"aria-valuemax":a,"aria-valuenow":r,"aria-valuetext":l}}function C5(e){return{"aria-hidden":!0,"data-segment":"literal"}}function S5(e){return{role:"textbox","aria-label":"timezone, ","data-readonly":!0,"data-segment":"timeZoneName",tabindex:e.disabled?void 0:0,style:"caret-color: transparent;"}}function E5(e){const{segmentValues:t,placeholder:n}=e,a=0,r=0,l=0,o="era"in t?t.era:n.era;return{...Rr(e),"aria-label":"era","aria-valuemin":a,"aria-valuemax":r,"aria-valuenow":l,"aria-valuetext":o}}const A5={day:{attrs:g5},month:{attrs:b5},year:{attrs:_5},hour:{attrs:x5},minute:{attrs:k5},second:{attrs:w5},dayPeriod:{attrs:$5},literal:{attrs:C5},timeZoneName:{attrs:S5},era:{attrs:E5}};function I1(e){const t=oo();function n({e:S,part:I,dateRef:z,prevValue:D}){const N=e.step.value[I]??1,X=S.key===t.ARROW_UP?N:-N,W=0,K=59;if(D===null)return X>0?W:K;const ae=[I,X];return z.set({[I]:D}).cycle(...ae)[I]}function a(S){if(e.hasLeftFocus.value=!1,S===null)return S;const I=S.toString();return I.length===1?(e.modelValue.value=void 0,null):Number.parseInt(I.slice(0,-1))}function r({e:S,part:I,dateRef:z,prevValue:D}){const N=e.step.value[I]??1,X=S.key===t.ARROW_UP?N:-N;if(D===null)return z[I];if(I==="hour"&&"hour"in z){const K=[I,X];return z.set({[I]:D}).cycle(...K)[I]}const W=[I,X];return I==="day"?z.set({[I]:D,month:e.segmentValues.value.month??1}).cycle(...W)[I]:z.set({[I]:D}).cycle(...W)[I]}function l(S,I,z){let D=!1;const N=Math.floor(S/10);if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,e.lastKeyZero.value=!1,z=null),z===null)return I===0?(e.lastKeyZero.value=!0,{value:null,moveToNext:D}):((e.lastKeyZero.value||I>N)&&(D=!0),e.lastKeyZero.value=!1,{value:I,moveToNext:D});const X=z.toString().length,W=Number.parseInt(z.toString()+I.toString());return X===2||W>S?((I>N||W>S)&&(D=!0),{value:I,moveToNext:D}):(D=!0,{value:W,moveToNext:D})}function o(S,I){let D=!1;const N=Math.floor(59/10);if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,e.lastKeyZero.value=!1,I=null),I===null)return S===0?(e.lastKeyZero.value=!0,{value:0,moveToNext:D}):((e.lastKeyZero.value||S>N)&&(D=!0),e.lastKeyZero.value=!1,{value:S,moveToNext:D});const X=I.toString().length,W=Number.parseInt(I.toString()+S.toString());return X===2||W>59?(S>N&&(D=!0),{value:S,moveToNext:D}):(D=!0,{value:W,moveToNext:D})}function i(S,I,z){let D=!1;const N=Math.floor(S/10);if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,e.lastKeyZero.value=!1,z=null),z===null)return I===0?(e.lastKeyZero.value=!0,{value:0,moveToNext:D}):((e.lastKeyZero.value||I>N)&&(D=!0),e.lastKeyZero.value=!1,{value:I,moveToNext:D});const X=z.toString().length,W=Number.parseInt(z.toString()+I.toString());return X===2||W>S?(I>N&&(D=!0),{value:I,moveToNext:D}):(D=!0,{value:W,moveToNext:D})}function u(S,I){let z=!1;if(e.hasLeftFocus.value&&(e.hasLeftFocus.value=!1,I=null),I===null)return{value:S===0?1:S,moveToNext:z};const D=I.toString()+S.toString();return D.length>4?{value:S===0?1:S,moveToNext:z}:(D.length===4&&(z=!0),{value:Number.parseInt(D),moveToNext:z})}const d=_(()=>A5[e.part]?.attrs({disabled:e.disabled.value,placeholder:e.placeholder.value,hourCycle:e.hourCycle,segmentValues:e.segmentValues.value,formatter:e.formatter})??{});function c(S){if(!er(S.key)||wa(S.key))return;const I=e.segmentValues.value.day;if(S.key===t.ARROW_DOWN||S.key===t.ARROW_UP){e.segmentValues.value.day=r({e:S,part:"day",dateRef:e.placeholder.value,prevValue:I});return}if(Gr(S.key)){const z=Number.parseInt(S.key),D=e.segmentValues.value.month,N=D?vr(e.placeholder.value.set({month:D})):31,{value:X,moveToNext:W}=l(N,z,I);e.segmentValues.value.day=X,W&&e.focusNext()}S.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.day=a(I))}function f(S){if(!er(S.key)||wa(S.key))return;const I=e.segmentValues.value.month;if(S.key===t.ARROW_DOWN||S.key===t.ARROW_UP){e.segmentValues.value.month=r({e:S,part:"month",dateRef:e.placeholder.value,prevValue:I});return}if(Gr(S.key)){const z=Number.parseInt(S.key),{value:D,moveToNext:N}=l(12,z,I);e.segmentValues.value.month=D,N&&e.focusNext()}S.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.month=a(I))}function m(S){if(!er(S.key)||wa(S.key))return;const I=e.segmentValues.value.year;if(S.key===t.ARROW_DOWN||S.key===t.ARROW_UP){e.segmentValues.value.year=r({e:S,part:"year",dateRef:e.placeholder.value,prevValue:I});return}if(Gr(S.key)){const z=Number.parseInt(S.key),{value:D,moveToNext:N}=u(z,I);e.segmentValues.value.year=D,N&&e.focusNext()}S.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.year=a(I))}function v(S){const I=new Bn(S,{hour:"numeric"}).resolvedOptions().hourCycle;return I==="h11"||I==="h12"}function y(S){const I=e.placeholder.value;if(!er(S.key)||wa(S.key)||!("hour"in I)||!("hour"in e.segmentValues.value))return;const z=e.segmentValues.value.hour;if(S.key===t.ARROW_UP||S.key===t.ARROW_DOWN){const D=r({e:S,part:"hour",dateRef:e.placeholder.value,prevValue:z});e.segmentValues.value.hour=D,"dayPeriod"in e.segmentValues.value&&D!==null&&(e.segmentValues.value.dayPeriod=D>=12?"PM":"AM");return}if(Gr(S.key)){const D=Number.parseInt(S.key),N=e.hourCycle!==void 0?e.hourCycle===12:v(e.formatter.getLocale()),X=N?12:24;let W=z;N&&z!==null&&(W=z%12===0?0:z>12?z-12:z);const{value:K,moveToNext:ae}=i(X,D,W);let se=K;if(N&&K!==null){const he=e.segmentValues.value.dayPeriod||"AM";K===12?se=he==="AM"?0:12:se=he==="PM"?K+12:K}e.segmentValues.value.hour=se,ae&&e.focusNext()}S.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.hour=a(z))}function x(S){const I=e.placeholder.value;if(!er(S.key)||wa(S.key)||!("minute"in I)||!("minute"in e.segmentValues.value))return;const z=e.segmentValues.value.minute;if((S.key===t.ARROW_UP||S.key===t.ARROW_DOWN)&&(e.segmentValues.value.minute=n({e:S,part:"minute",dateRef:e.placeholder.value,prevValue:z})),Gr(S.key)){const D=Number.parseInt(S.key),{value:N,moveToNext:X}=o(D,z);e.segmentValues.value.minute=N,X&&e.focusNext()}S.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.minute=a(z))}function C(S){const I=e.placeholder.value;if(!er(S.key)||wa(S.key)||!("second"in I)||!("second"in e.segmentValues.value))return;const z=e.segmentValues.value.second;if((S.key===t.ARROW_UP||S.key===t.ARROW_DOWN)&&(e.segmentValues.value.second=n({e:S,part:"second",dateRef:e.placeholder.value,prevValue:z})),Gr(S.key)){const D=Number.parseInt(S.key),{value:N,moveToNext:X}=o(D,z);e.segmentValues.value.second=N,X&&e.focusNext()}S.key===t.BACKSPACE&&(e.hasLeftFocus.value=!1,e.segmentValues.value.second=a(z))}function k(S){if(!((!er(S.key)||wa(S.key))&&S.key!=="a"&&S.key!=="p"||!("hour"in e.placeholder.value)||!("dayPeriod"in e.segmentValues.value))){if(S.key===t.ARROW_UP||S.key===t.ARROW_DOWN){if(e.segmentValues.value.dayPeriod==="AM"){e.segmentValues.value.dayPeriod="PM",e.segmentValues.value.hour=e.segmentValues.value.hour+12;return}e.segmentValues.value.dayPeriod="AM",e.segmentValues.value.hour=e.segmentValues.value.hour-12;return}if(["a","A"].includes(S.key)&&e.segmentValues.value.dayPeriod!=="AM"){e.segmentValues.value.dayPeriod="AM",e.segmentValues.value.hour=e.segmentValues.value.hour-12;return}["p","P"].includes(S.key)&&e.segmentValues.value.dayPeriod!=="PM"&&(e.segmentValues.value.dayPeriod="PM",e.segmentValues.value.hour=e.segmentValues.value.hour+12)}}function E(S){e.disabled.value&&S.preventDefault()}function B(S){if(S.isComposing||S.key==="Process")return;const I=e.disabled.value,z=e.readonly.value;if(I||z)return;if(S.key!==t.TAB&&S.preventDefault(),{day:c,month:f,year:m,hour:y,minute:x,second:C,dayPeriod:k,timeZoneName:()=>{}}[e.part](S),![t.ARROW_LEFT,t.ARROW_RIGHT].includes(S.key)&&S.key!==t.TAB&&S.key!==t.SHIFT&&er(S.key)&&Object.values(e.segmentValues.value).every(N=>N!==null)){const N={...e.segmentValues.value},X=e.placeholder.value.set(N);e.modelValue.value=X.copy()}}function O(){if(e.stepSnapping?.value&&(e.part==="hour"&&"hour"in e.segmentValues.value&&e.segmentValues.value.hour!==null&&e.step.value.hour&&e.step.value.hour>1?(e.segmentValues.value.hour=yc(e.segmentValues.value.hour,0,23,e.step.value.hour),"dayPeriod"in e.segmentValues.value&&(e.segmentValues.value.hour<12?e.segmentValues.value.dayPeriod="AM":e.segmentValues.value.hour&&(e.segmentValues.value.dayPeriod="PM"))):e.part==="minute"&&"minute"in e.segmentValues.value&&e.segmentValues.value.minute!==null&&e.step.value.minute&&e.step.value.minute>1?e.segmentValues.value.minute=yc(e.segmentValues.value.minute,0,59,e.step.value.minute):e.part==="second"&&"second"in e.segmentValues.value&&e.segmentValues.value.second!==null&&e.step.value.second&&e.step.value.second>1&&(e.segmentValues.value.second=yc(e.segmentValues.value.second,0,59,e.step.value.second)),Object.values(e.segmentValues.value).every(S=>S!==null))){const S=e.placeholder.value.set({...e.segmentValues.value});e.modelValue.value=S.copy()}}let T=null;function P(S){S.isComposing||S.preventDefault()}function R(S){const I=S.target;T=Array.from(I.childNodes,z=>({node:z,value:z.nodeValue}))}function H(S){const I=S.target,z=T;if(T=null,z){for(const{node:N,value:X}of z)N.nodeValue=X;I.replaceChildren(...z.map(N=>N.node))}const D=S.data;if(D)for(const N of D){if(!y5.test(N))continue;const X=Gt();if(!(X instanceof HTMLElement))break;X.dispatchEvent(new KeyboardEvent("keydown",{key:N,bubbles:!0,cancelable:!0}))}}return{handleSegmentClick:E,handleSegmentKeydown:B,handleSegmentBeforeInput:P,handleSegmentCompositionStart:R,handleSegmentCompositionEnd:H,handleSegmentFocusOut:O,attributes:d}}function T5(e){function t(l){return Array.isArray(e.date.value)?e.date.value.some(o=>gr(o,l)):e.date.value?gr(e.date.value,l):!1}const n=_(()=>{if(Array.isArray(e.date.value)){if(!e.date.value.length)return!1;for(const l of e.date.value)if(e.isDateDisabled?.(l)||e.isDateUnavailable?.(l))return!0}else{if(!e.date.value)return!1;if(e.isDateDisabled?.(e.date.value)||e.isDateUnavailable?.(e.date.value))return!0}return!1}),a=_(()=>Array.isArray(e.date.value)?e.date.value.length>0:!!e.date.value),r=_(()=>Array.isArray(e.date.value)?e.date.value.length?e.date.value.some(l=>e.isDateDisabled?.(l)):!1:e.date.value?!!e.isDateDisabled?.(e.date.value):!1);return{isDateSelected:t,isInvalid:n,hasSelectedDate:a,isSelectedDateDisabled:r}}function D5(e,t){const n=t(e),a=n.compare(e),r={};return a>=7&&(r.day=1),a>=vr(e)&&(r.month=1),n.set({...r})}function O5(e,t){const n=t(e),a=e.compare(n),r={};return a>=7&&(r.day=35),a>=vr(e)&&(r.month=13),n.set({...r})}function M5(e,t){return t(e)}function I5(e,t){return t(e)}function P5(e){const t=Hf(e.locale.value),n=_(()=>{const k={calendar:e.placeholder.value.calendar.identifier};return e.placeholder.value.calendar.identifier==="gregory"&&e.placeholder.value.era==="BC"&&(k.era="short"),k}),a=A(Ur({dateObj:e.placeholder.value,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value})),r=_(()=>a.value.map(k=>k.value));function l(k){return!r.value.some(E=>fm(k,E))}const o=k=>{if(!e.maxValue.value||!a.value.length)return!1;if(e.disabled.value)return!0;const E=a.value.at(-1).value;if(!k&&!e.nextPage.value){const O=E.add({months:1}).set({day:1});return Ec(O,e.maxValue.value)}const B=D5(E,k||e.nextPage.value);return Ec(B,e.maxValue.value)},i=k=>{if(!e.minValue.value||!a.value.length)return!1;if(e.disabled.value)return!0;const E=a.value[0].value;if(!k&&!e.prevPage.value){const O=E.subtract({months:1}).set({day:35});return dr(O,e.minValue.value)}const B=O5(E,k||e.prevPage.value);return dr(B,e.minValue.value)};function u(k){return!!(e.isDateDisabled?.(k)||e.disabled.value||e.maxValue.value&&Ec(k,e.maxValue.value)||e.minValue.value&&dr(k,e.minValue.value))}const d=k=>!!e.isDateUnavailable?.(k),c=_(()=>a.value.length?a.value[0].rows[0].map(k=>t.dayOfWeek(On(k),e.weekdayFormat.value)):[]),f=k=>{const E=a.value[0].value;if(!k&&!e.nextPage.value){const P=E.add({months:e.pagedNavigation.value?e.numberOfMonths.value:1}),R=Ur({dateObj:P,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});a.value=R,e.placeholder.value=R[0].value.set({day:1});return}const B=M5(E,k||e.nextPage.value),O=Ur({dateObj:B,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});a.value=O;const T={};if(!k){const P=O[0].value.compare(E);P>=vr(E)&&(T.day=1),P>=365&&(T.month=1)}e.placeholder.value=O[0].value.set({...T})},m=k=>{const E=a.value[0].value;if(!k&&!e.prevPage.value){const P=E.subtract({months:e.pagedNavigation.value?e.numberOfMonths.value:1}),R=Ur({dateObj:P,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});a.value=R,e.placeholder.value=R[0].value.set({day:1});return}const B=I5(E,k||e.prevPage.value),O=Ur({dateObj:B,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value});a.value=O;const T={};if(!k){const P=E.compare(O[0].value);P>=vr(E)&&(T.day=1),P>=365&&(T.month=1)}e.placeholder.value=O[0].value.set({...T})};Ne(e.placeholder,k=>{r.value.some(E=>fm(E,k))||(a.value=Ur({dateObj:k,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value}))}),Ne([e.locale,e.weekStartsOn,e.fixedWeeks,e.numberOfMonths],()=>{a.value=Ur({dateObj:e.placeholder.value,weekStartsOn:e.weekStartsOn.value,locale:e.locale.value,fixedWeeks:e.fixedWeeks.value,numberOfMonths:e.numberOfMonths.value})});const v=_(()=>{if(!a.value.length)return"";if(e.locale.value!==t.getLocale()&&t.setLocale(e.locale.value),a.value.length===1){const H=a.value[0].value;return`${t.fullMonthAndYear(On(H),n.value)}`}const k=On(a.value[0].value),E=On(a.value.at(-1).value),B=t.fullMonth(k,n.value),O=t.fullMonth(E,n.value),T=t.fullYear(k,n.value),P=t.fullYear(E,n.value);return T===P?`${B} - ${O} ${P}`:`${B} ${T} - ${O} ${P}`}),y=_(()=>`${e.calendarLabel.value??"Event Date"}, ${v.value}`),x=_(()=>!(u(e.placeholder.value)||d(e.placeholder.value)||l(e.placeholder.value))),C=_(()=>{for(const k of a.value){if(e.minValue.value&&dr(k.value,e.minValue.value))continue;const E=vr(k.value),B=e.minValue.value&&If(e.minValue.value,k.value)?e.minValue.value.day:1;for(let O=B;O<=E;O++){const T=k.value.set({day:O});if(!(u(T)||d(T)))return T}}});return{isDateDisabled:u,isDateUnavailable:d,isNextButtonDisabled:o,isPrevButtonDisabled:i,grid:a,weekdays:c,visibleView:r,isOutsideVisibleView:l,formatter:t,nextPage:f,prevPage:m,headingValue:v,fullCalendarLabel:y,isPlaceholderFocusable:x,firstFocusableDate:C}}const R5={style:{border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"}},q5={role:"heading","aria-level":"2"},[io,L5]=At("CalendarRoot");var N5=le({__name:"CalendarRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},pagedNavigation:{type:Boolean,required:!1,default:!1},preventDeselect:{type:Boolean,required:!1,default:!1},weekStartsOn:{type:Number,required:!1},weekdayFormat:{type:String,required:!1,default:"narrow"},calendarLabel:{type:String,required:!1},fixedWeeks:{type:Boolean,required:!1,default:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},numberOfMonths:{type:Number,required:!1,default:1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},initialFocus:{type:Boolean,required:!1,default:!1},isDateDisabled:{type:Function,required:!1,default:void 0},isDateUnavailable:{type:Function,required:!1,default:void 0},dir:{type:String,required:!1},nextPage:{type:Function,required:!1},prevPage:{type:Function,required:!1},modelValue:{type:null,required:!1},multiple:{type:Boolean,required:!1,default:!1},disableDaysOutsideCurrentView:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["update:modelValue","update:placeholder"],setup(e,{emit:t}){const n=e,a=t,{disabled:r,readonly:l,initialFocus:o,pagedNavigation:i,weekdayFormat:u,fixedWeeks:d,multiple:c,minValue:f,maxValue:m,numberOfMonths:v,preventDeselect:y,isDateDisabled:x,isDateUnavailable:C,calendarLabel:k,defaultValue:E,nextPage:B,prevPage:O,dir:T,locale:P,disableDaysOutsideCurrentView:R}=Ht(n),{primitiveElement:H,currentElement:S}=ol(),I=Mu(P),z=ya(T),D=_(()=>n.weekStartsOn??l1(I.value)),N=qt(n,"modelValue",a,{defaultValue:E.value,passive:n.modelValue===void 0}),X=Uf({defaultPlaceholder:n.placeholder,defaultValue:N.value,locale:n.locale}),W=qt(n,"placeholder",a,{defaultValue:n.defaultPlaceholder??X.copy(),passive:n.placeholder===void 0});function K(te){W.value=te.copy()}const{fullCalendarLabel:ae,headingValue:se,isDateDisabled:he,isDateUnavailable:ge,isNextButtonDisabled:oe,isPrevButtonDisabled:Z,weekdays:ue,isOutsideVisibleView:j,nextPage:xe,prevPage:_e,formatter:Y,grid:me,isPlaceholderFocusable:J,firstFocusableDate:ee}=P5({locale:I,placeholder:W,weekStartsOn:D,fixedWeeks:d,numberOfMonths:v,minValue:f,maxValue:m,disabled:r,weekdayFormat:u,pagedNavigation:i,isDateDisabled:x.value,isDateUnavailable:C.value,calendarLabel:k,nextPage:B,prevPage:O}),{isInvalid:ne,isDateSelected:w,hasSelectedDate:M,isSelectedDateDisabled:q}=T5({date:N,isDateDisabled:he,isDateUnavailable:ge});Ne(N,te=>{if(Array.isArray(te)&&te.length){const fe=te.at(-1);fe&&!Hl(W.value,fe)&&K(fe)}else!Array.isArray(te)&&te&&!Hl(W.value,te)&&K(te)});function ie(te){if(c.value){if(!N.value)N.value=[te.copy()];else if(Array.isArray(N.value)){if(N.value.findIndex(Ee=>gr(Ee,te))===-1)N.value=[...N.value,te];else if(!y.value){const Ee=N.value.filter(Se=>!gr(Se,te));if(!Ee.length){W.value=te.copy(),N.value=void 0;return}N.value=Ee.map(Se=>Se.copy())}}}else{if(!N.value){N.value=te.copy();return}!y.value&&Hl(N.value,te)?(W.value=te.copy(),N.value=void 0):N.value=te.copy()}}return xt(()=>{o.value&&a1(S.value)}),L5({isDateUnavailable:ge,dir:z,isDateDisabled:he,locale:I,formatter:Y,modelValue:N,placeholder:W,disabled:r,initialFocus:o,pagedNavigation:i,grid:me,weekDays:ue,weekStartsOn:D,weekdayFormat:u,fixedWeeks:d,multiple:c,numberOfMonths:v,readonly:l,preventDeselect:y,fullCalendarLabel:ae,headingValue:se,isInvalid:ne,isDateSelected:w,isNextButtonDisabled:oe,isPrevButtonDisabled:Z,isOutsideVisibleView:j,nextPage:xe,prevPage:_e,parentElement:S,onPlaceholderChange:K,onDateChange:ie,disableDaysOutsideCurrentView:R,minValue:f,maxValue:m,isPlaceholderFocusable:J,firstFocusableDate:ee,hasSelectedDate:M,isSelectedDateDisabled:q}),(te,fe)=>(p(),U(s(Qe),{ref_key:"primitiveElement",ref:H,as:te.as,"as-child":te.asChild,"aria-label":s(ae),"data-readonly":s(l)?"":void 0,"data-disabled":s(r)?"":void 0,"data-invalid":s(ne)?"":void 0,dir:s(z)},{default:F(()=>[we(te.$slots,"default",{date:s(W),grid:s(me),weekDays:s(ue),weekStartsOn:D.value,locale:s(I),fixedWeeks:s(d),modelValue:s(N)}),b("div",R5,[b("div",q5,$(s(ae)),1)])]),_:3},8,["as","as-child","aria-label","data-readonly","data-disabled","data-invalid","dir"]))}}),B5=N5,F5=le({__name:"CalendarCell",props:{date:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"td"}},setup(e){const t=io();return(n,a)=>(p(),U(s(Qe),{as:n.as,"as-child":n.asChild,role:"gridcell","aria-selected":s(t).isDateSelected(n.date)?!0:void 0,"aria-disabled":s(t).isDateDisabled(n.date)||s(t).isDateUnavailable?.(n.date)||s(t).disableDaysOutsideCurrentView.value,"data-disabled":s(t).isDateDisabled(n.date)||s(t).disableDaysOutsideCurrentView.value?"":void 0},{default:F(()=>[we(n.$slots,"default")]),_:3},8,["as","as-child","aria-selected","aria-disabled","data-disabled"]))}}),V5=F5,z5=le({__name:"CalendarCellTrigger",props:{day:{type:null,required:!0},month:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,n=oo(),a=io(),{primitiveElement:r}=ol(),l=_(()=>t.day.day.toLocaleString(a.locale.value)),o=_(()=>a.formatter.custom(On(t.day),{weekday:"long",month:"long",day:"numeric",year:"numeric"})),i=_(()=>a.isDateUnavailable?.(t.day)??!1),u=_(()=>VE(t.day,Yn())),d=_(()=>!If(t.day,t.month)),c=_(()=>a.isOutsideVisibleView(t.day)),f=_(()=>a.isDateDisabled(t.day)||a.disableDaysOutsideCurrentView.value&&d.value),m=_(()=>d.value||f.value?!1:!a.disabled.value&&a.isPlaceholderFocusable.value&&gr(t.day,a.placeholder.value)?!0:(!a.hasSelectedDate.value||a.isSelectedDateDisabled.value)&&!a.isPlaceholderFocusable.value?a.firstFocusableDate.value&&gr(t.day,a.firstFocusableDate.value):!1),v=_(()=>a.isDateSelected(t.day));function y(k){a.readonly.value||a.isDateDisabled(k)||a.isDateUnavailable?.(k)||a.onDateChange(k)}function x(){f.value||y(t.day)}function C(k){if(f.value)return;k.preventDefault(),k.stopPropagation();const E=a.parentElement.value,B=7,O=a.dir.value==="rtl"?-1:1;switch(k.code){case n.ARROW_RIGHT:T(t.day,O);break;case n.ARROW_LEFT:T(t.day,-O);break;case n.ARROW_UP:T(t.day,-B);break;case n.ARROW_DOWN:T(t.day,B);break;case n.ENTER:case n.SPACE_CODE:y(t.day)}function T(P,R){const H=P.add({days:R});if(a.minValue.value&&H.compare(a.minValue.value)<0||a.maxValue.value&&H.compare(a.maxValue.value)>0)return;const S=E.querySelector(`[data-value='${H.toString()}']:not([data-outside-view])`);if(!S){if(R>0){if(a.isNextButtonDisabled())return;a.nextPage()}else{if(a.isPrevButtonDisabled())return;a.prevPage()}He(()=>{T(P,R)});return}if(S&&S.hasAttribute("data-disabled"))return T(H,R);a.onPlaceholderChange(H),S?.focus()}}return(k,E)=>(p(),U(s(Qe),{ref_key:"primitiveElement",ref:r,as:t.as,"as-child":t.asChild,role:"button","aria-label":o.value,"data-reka-calendar-cell-trigger":"","aria-disabled":f.value||i.value?!0:void 0,"data-selected":v.value?!0:void 0,"data-value":k.day.toString(),"data-disabled":f.value?"":void 0,"data-unavailable":i.value?"":void 0,"data-today":u.value?"":void 0,"data-outside-view":d.value?"":void 0,"data-outside-visible-view":c.value?"":void 0,"data-focused":m.value?"":void 0,tabindex:m.value?0:d.value||f.value?void 0:-1,onClick:x,onKeydown:[da(C,["up","down","left","right","space","enter"]),E[0]||(E[0]=da(mt(()=>{},["prevent"]),["enter"]))]},{default:F(()=>[we(k.$slots,"default",{dayValue:l.value,disabled:f.value,today:u.value,selected:v.value,outsideView:d.value,outsideVisibleView:c.value,unavailable:i.value},()=>[ye($(l.value),1)])]),_:3},8,["as","as-child","aria-label","aria-disabled","data-selected","data-value","data-disabled","data-unavailable","data-today","data-outside-view","data-outside-visible-view","data-focused","tabindex"]))}}),j5=z5,U5=le({__name:"CalendarGrid",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"table"}},setup(e){const t=e,n=io(),a=_(()=>n.disabled.value?!0:void 0),r=_(()=>n.readonly.value?!0:void 0);return(l,o)=>(p(),U(s(Qe),je(t,{tabindex:"-1",role:"application","aria-readonly":r.value,"aria-disabled":a.value,"data-readonly":r.value&&"","data-disabled":a.value&&""}),{default:F(()=>[we(l.$slots,"default")]),_:3},16,["aria-readonly","aria-disabled","data-readonly","data-disabled"]))}}),H5=U5,K5=le({__name:"CalendarGridBody",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"tbody"}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qe),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),W5=K5,G5=le({__name:"CalendarGridHead",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"thead"}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qe),je(t,{"aria-hidden":"true"}),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),Y5=G5,J5=le({__name:"CalendarGridRow",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"tr"}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qe),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),Z5=J5,X5=le({__name:"CalendarHeadCell",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"th"}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qe),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),Q5=X5,eD=le({__name:"CalendarHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qe),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),tD=eD,nD=le({__name:"CalendarHeading",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,n=io();return(a,r)=>(p(),U(s(Qe),je(t,{"data-disabled":s(n).disabled.value?"":void 0}),{default:F(()=>[we(a.$slots,"default",{headingValue:s(n).headingValue.value},()=>[ye($(s(n).headingValue.value),1)])]),_:3},16,["data-disabled"]))}}),aD=nD,rD=le({__name:"CalendarNext",props:{nextPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=_(()=>a.disabled.value||a.isNextButtonDisabled(t.nextPage)),a=io();function r(){n.value||a.nextPage(t.nextPage)}return(l,o)=>(p(),U(s(Qe),{as:t.as,"as-child":t.asChild,"aria-label":"Next page",type:t.as==="button"?"button":void 0,"aria-disabled":n.value||void 0,"data-disabled":n.value||void 0,disabled:n.value,onClick:r},{default:F(()=>[we(l.$slots,"default",{disabled:n.value},()=>[o[0]||(o[0]=ye(" Next page "))])]),_:3},8,["as","as-child","type","aria-disabled","data-disabled","disabled"]))}}),lD=rD,oD=le({__name:"CalendarPrev",props:{prevPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=_(()=>a.disabled.value||a.isPrevButtonDisabled(t.prevPage)),a=io();function r(){n.value||a.prevPage(t.prevPage)}return(l,o)=>(p(),U(s(Qe),{"aria-label":"Previous page",as:t.as,"as-child":t.asChild,type:t.as==="button"?"button":void 0,"aria-disabled":n.value||void 0,"data-disabled":n.value||void 0,disabled:n.value,onClick:r},{default:F(()=>[we(l.$slots,"default",{disabled:n.value},()=>[o[0]||(o[0]=ye(" Prev page "))])]),_:3},8,["as","as-child","type","aria-disabled","data-disabled","disabled"]))}}),sD=oD;const[iD,uD]=At("RovingFocusGroup");var cD=le({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:n}){const a=e,r=n,{loop:l,orientation:o,dir:i}=Ht(a),u=ya(i),d=qt(a,"currentTabStopId",r,{defaultValue:a.defaultCurrentTabStopId,passive:a.currentTabStopId===void 0}),c=A(!1),f=A(!1),m=A(0),{getItems:v,CollectionSlot:y}=Jf({isProvider:!0});function x(k){const E=!f.value;if(k.currentTarget&&k.target===k.currentTarget&&E&&!c.value){const B=new CustomEvent(G4,Y4);if(k.currentTarget.dispatchEvent(B),r("entryFocus",B),!B.defaultPrevented){const O=v().map(S=>S.ref).filter(S=>S.dataset.disabled!==""),T=O.find(S=>S.getAttribute("data-active")===""),P=O.find(S=>S.getAttribute("data-highlighted")===""),R=O.find(S=>S.id===d.value),H=[T,P,R,...O].filter(Boolean);m1(H,a.preventScrollOnEntryFocus)}}f.value=!1}function C(){setTimeout(()=>{f.value=!1},1)}return t({getItems:v}),uD({loop:l,dir:u,orientation:o,currentTabStopId:d,onItemFocus:k=>{d.value=k},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(k,E)=>(p(),U(s(y),null,{default:F(()=>[L(s(Qe),{tabindex:c.value||m.value===0?-1:0,"data-orientation":s(o),as:k.as,"as-child":k.asChild,dir:s(u),style:{outline:"none"},onMousedown:E[0]||(E[0]=B=>f.value=!0),onMouseup:C,onFocus:x,onBlur:E[1]||(E[1]=B=>c.value=!1)},{default:F(()=>[we(k.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Bu=cD,dD=le({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=iD(),a=Fa(),r=_(()=>t.tabStopId||a),l=_(()=>n.currentTabStopId.value===r.value),{getItems:o,CollectionItem:i}=Jf();xt(()=>{t.focusable&&n.onFocusableItemAdd()}),ja(()=>{t.focusable&&n.onFocusableItemRemove()});function u(d){if(d.key==="Tab"&&d.shiftKey){n.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const c=X4(d,n.orientation.value,n.dir.value);if(c!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||!t.allowShiftKey&&d.shiftKey)return;d.preventDefault();let f=[...o().map(m=>m.ref).filter(m=>m.dataset.disabled!=="")];if(c==="last")f.reverse();else if(c==="prev"||c==="next"){c==="prev"&&f.reverse();const m=f.indexOf(d.currentTarget);f=n.loop.value?Q4(f,m+1):f.slice(m+1)}He(()=>m1(f))}}return(d,c)=>(p(),U(s(i),null,{default:F(()=>[L(s(Qe),{tabindex:l.value?0:-1,"data-orientation":s(n).orientation.value,"data-active":d.active?"":void 0,"data-disabled":d.focusable?void 0:"",as:d.as,"as-child":d.asChild,onMousedown:c[0]||(c[0]=f=>{d.focusable?s(n).onItemFocus(r.value):f.preventDefault()}),onFocus:c[1]||(c[1]=f=>s(n).onItemFocus(r.value)),onKeydown:u},{default:F(()=>[we(d.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),Fu=dD;const[fD]=At("CheckboxGroupRoot");function up(e){return e==="indeterminate"}function P1(e){return up(e)?"indeterminate":e?"checked":"unchecked"}const[pD,vD]=At("CheckboxRoot");var mD=le({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:"on"},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:l}=Xe(),o=fD(null),i=qt(n,"modelValue",a,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),u=_(()=>o?.disabled.value||n.disabled),d=_(()=>is(i.value,n.trueValue)),c=_(()=>wn(o?.modelValue.value)?i.value==="indeterminate"?"indeterminate":d.value:um(o.modelValue.value,n.value));function f(){if(wn(o?.modelValue.value))i.value==="indeterminate"?i.value=n.trueValue:i.value=d.value?n.falseValue:n.trueValue;else{const y=[...o.modelValue.value||[]];if(um(y,n.value)){const x=y.findIndex(C=>is(C,n.value));y.splice(x,1)}else y.push(n.value);o.modelValue.value=y}}const m=Kf(l),v=_(()=>n.id&&l.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0);return vD({disabled:u,state:c}),(y,x)=>(p(),U(Kt(s(o)?.rovingFocus.value?s(Fu):s(Qe)),je(y.$attrs,{id:y.id,ref:s(r),role:"checkbox","as-child":y.asChild,as:y.as,type:y.as==="button"?"button":void 0,"aria-checked":s(up)(c.value)?"mixed":c.value,"aria-required":y.required,"aria-label":y.$attrs["aria-label"]||v.value,"data-state":s(P1)(c.value),"data-disabled":u.value?"":void 0,disabled:u.value,focusable:s(o)?.rovingFocus.value?!u.value:void 0,onKeydown:da(mt(()=>{},["prevent"]),["enter"]),onClick:f}),{default:F(()=>[we(y.$slots,"default",{modelValue:s(i),state:c.value}),s(m)&&y.name&&!s(o)?(p(),U(s(Xf),{key:0,type:"checkbox",checked:!!c.value,name:y.name,value:y.value,disabled:u.value,required:y.required},null,8,["checked","name","value","disabled","required"])):G("v-if",!0)]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","focusable","onKeydown"]))}}),hD=mD,yD=le({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const{forwardRef:t}=Xe(),n=pD();return(a,r)=>(p(),U(s(pl),{present:a.forceMount||s(up)(s(n).state.value)||s(n).state.value===!0},{default:F(()=>[L(s(Qe),je({ref:s(t),"data-state":s(P1)(s(n).state.value),"data-disabled":s(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":a.asChild,as:a.as},a.$attrs),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),gD=yD,bD=le({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qf),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),_D=bD;function xD(){const e=A(!1);return xt(()=>{to("keydown",()=>{e.value=!0},{capture:!0,passive:!0}),to(["pointerdown","pointermove"],()=>{e.value=!1},{capture:!0,passive:!0})}),e}const kD=Cb(xD),[Vu,wD]=At(["MenuRoot","MenuSub"],"MenuContext"),[cp,$D]=At("MenuRoot");var CD=le({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,a=t,{modal:r,dir:l}=Ht(n),o=ya(l),i=qt(n,"open",a),u=A(),d=kD();return wD({open:i,onOpenChange:c=>{i.value=c},content:u,onContentChange:c=>{u.value=c}}),$D({onClose:()=>{i.value=!1},isUsingKeyboardRef:d,dir:o,modal:r}),(c,f)=>(p(),U(s(y1),null,{default:F(()=>[we(c.$slots,"default")]),_:3}))}}),SD=CD;const[R1,ED]=At("MenuContent");var AD=le({__name:"MenuContentImpl",props:Yy({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...A1}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(e,{emit:t}){const n=e,a=t,r=Vu(),l=cp(),{trapFocus:o,disableOutsidePointerEvents:i,loop:u}=Ht(n);o1(),Mf(i.value);const d=A(""),c=A(0),f=A(0),m=A(null),v=A("right"),y=A(0),x=A(null),C=A(),{forwardRef:k,currentElement:E}=Xe(),{handleTypeaheadSearch:B}=UA(),O=A();function T(W){const K=dm(W,O.value||Gt(),E.value,{loop:u.value,arrowKeyOptions:"vertical",dir:l?.dir.value,focus:!1,attributeName:"[data-reka-collection-item]:not([data-disabled])"});K&&(O.value=K,K.scrollIntoView({block:"nearest"}))}function P(){O.value&&O.value.click()}const R=A(),H=A();Ne(O,W=>{H.value&&(W===void 0||W!==H.value.trigger.value)&&(H.value.onOpenChange(!1),H.value=void 0)}),Ne(E,W=>{r.onContentChange(W)}),ja(()=>{window.clearTimeout(c.value)});function S(W){return v.value===m.value?.side&&m4(W,m.value?.area)}async function I(W){a("openAutoFocus",W),!W.defaultPrevented&&(W.preventDefault(),E.value?.focus({preventScroll:!0}))}function z(W){if(W.defaultPrevented)return;const K=W.target,ae=K.closest("[data-reka-menu-content]")===W.currentTarget,se=["input","textarea"].includes(K.tagName.toLowerCase()),he=W.ctrlKey||W.altKey||W.metaKey,ge=W.key.length===1,oe=dm(W,Gt(),E.value,{loop:u.value,arrowKeyOptions:"vertical",dir:l?.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(oe)return oe?.focus();if(W.code==="Space")return;const Z=C.value?.getItems()??[];if(ae&&(W.key==="Tab"&&W.preventDefault(),!he&&ge&&!se&&B(W.key,Z)),W.target!==E.value||!f4.includes(W.key))return;W.preventDefault();const ue=[...Z.map(j=>j.ref)];c1.includes(W.key)&&ue.reverse(),p4(ue)}function D(W){W?.currentTarget?.contains?.(W.target)||(window.clearTimeout(c.value),d.value="")}function N(W){if(!Wi(W))return;const K=W.target,ae=y.value!==W.clientX;if(W?.currentTarget?.contains(K)&&ae){const se=W.clientX>y.value?"right":"left";v.value=se,y.value=W.clientX}}function X(W){Wi(W)&&R.value&&R.value.focus()}return ED({onItemEnter:W=>!!S(W),onItemLeave:W=>S(W)?!0:(["INPUT","TEXTAREA"].includes(Gt()?.tagName||"")||E.value?.focus(),x.value=null,!1),onTriggerLeave:W=>!!S(W),searchRef:d,highlightedElement:O,onKeydownNavigation:T,onKeydownEnter:P,filterElement:R,onFilterElementChange:W=>{R.value=W},activeSubmenuContext:H,pointerGraceTimerRef:f,onPointerGraceIntentChange:W=>{m.value=W}}),(W,K)=>(p(),U(s(Yf),{"as-child":"",trapped:s(o),onMountAutoFocus:I,onUnmountAutoFocus:K[7]||(K[7]=ae=>a("closeAutoFocus",ae))},{default:F(()=>[L(s(Gf),{"as-child":"","disable-outside-pointer-events":s(i),onEscapeKeyDown:K[2]||(K[2]=ae=>a("escapeKeyDown",ae)),onPointerDownOutside:K[3]||(K[3]=ae=>a("pointerDownOutside",ae)),onFocusOutside:K[4]||(K[4]=ae=>a("focusOutside",ae)),onInteractOutside:K[5]||(K[5]=ae=>a("interactOutside",ae)),onDismiss:K[6]||(K[6]=ae=>a("dismiss"))},{default:F(()=>[L(s(Bu),{ref_key:"rovingFocusGroupRef",ref:C,"current-tab-stop-id":x.value,"onUpdate:currentTabStopId":K[0]||(K[0]=ae=>x.value=ae),"as-child":"",orientation:"vertical",dir:s(l).dir.value,loop:s(u),onEntryFocus:K[1]||(K[1]=ae=>{a("entryFocus",ae),s(l).isUsingKeyboardRef.value||ae.preventDefault()})},{default:F(()=>[L(s(T1),{ref:s(k),role:"menu",as:W.as,"as-child":W.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":s(d1)(s(r).open.value),dir:s(l).dir.value,side:W.side,"side-offset":W.sideOffset,align:W.align,"align-offset":W.alignOffset,"avoid-collisions":W.avoidCollisions,"collision-boundary":W.collisionBoundary,"collision-padding":W.collisionPadding,"arrow-padding":W.arrowPadding,"prioritize-position":W.prioritizePosition,"position-strategy":W.positionStrategy,"update-position-strategy":W.updatePositionStrategy,sticky:W.sticky,"hide-when-detached":W.hideWhenDetached,reference:W.reference,onKeydown:z,onBlur:D,onPointermove:N,onPointerenter:X},{default:F(()=>[we(W.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),q1=AD,TD=le({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=R1(),{forwardRef:a,currentElement:r}=Xe(),{CollectionItem:l}=Jf(),o=A(!1),i=_(()=>o.value||r.value!=null&&n.highlightedElement.value===r.value);async function u(c){if(!(c.defaultPrevented||!Wi(c))){if(t.disabled)n.onItemLeave(c);else if(!n.onItemEnter(c)){const m=c.currentTarget;n.highlightedElement.value=m,["INPUT","TEXTAREA"].includes(Gt()?.tagName||"")||m.focus({preventScroll:!0})}}}async function d(c){if(await He(),c.defaultPrevented||!Wi(c)||n.highlightedElement.value!==r.value)return;!n.onItemLeave(c)&&n.highlightedElement.value===r.value&&(n.highlightedElement.value=void 0)}return(c,f)=>(p(),U(s(l),{value:{textValue:c.textValue}},{default:F(()=>[L(s(Qe),je({ref:s(a),role:"menuitem",tabindex:"-1"},c.$attrs,{as:c.as,"as-child":c.asChild,"aria-disabled":c.disabled||void 0,"data-disabled":c.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:u,onPointerleave:d,onFocus:f[0]||(f[0]=async m=>{await He(),!(m.defaultPrevented||c.disabled)&&(o.value=!0,s(n).highlightedElement.value=m.currentTarget)}),onBlur:f[1]||(f[1]=async m=>{await He(),!m.defaultPrevented&&(o.value=!1)})}),{default:F(()=>[we(c.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),DD=TD,OD=le({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:l}=Xe(),o=cp(),i=R1(),u=A(!1);async function d(){const c=l.value;if(!n.disabled&&c){const f=new CustomEvent(c4,{bubbles:!0,cancelable:!0});a("select",f),await He(),f.defaultPrevented?u.value=!1:o.onClose()}}return(c,f)=>(p(),U(DD,je(n,{ref:s(r),onClick:d,onPointerdown:f[0]||(f[0]=()=>{u.value=!0}),onPointerup:f[1]||(f[1]=async m=>{await He(),!m.defaultPrevented&&(u.value||m.currentTarget?.click())}),onKeydown:f[2]||(f[2]=async m=>{const v=s(i).searchRef.value!=="";c.disabled||v&&m.key===" "||s(qd).includes(m.key)&&(m.currentTarget?.click(),m.preventDefault())})}),{default:F(()=>[we(c.$slots,"default")]),_:3},16))}}),L1=OD;const[MD,ID]=At(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var PD=le({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=MD({modelValue:A(!1)});return(n,a)=>(p(),U(s(pl),{present:n.forceMount||s(f1)(s(t).modelValue.value)||s(t).modelValue.value===!0},{default:F(()=>[L(s(Qe),{as:n.as,"as-child":n.asChild,"data-state":s(p1)(s(t).modelValue.value)},{default:F(()=>[we(n.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),RD=PD,qD=le({__name:"MenuRootContentModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=ga(n,a),l=Vu(),{forwardRef:o,currentElement:i}=Xe();return Wf(i),(u,d)=>(p(),U(q1,je(s(r),{ref:s(o),"trap-focus":s(l).open.value,"disable-outside-pointer-events":s(l).open.value,"disable-outside-scroll":!0,onDismiss:d[0]||(d[0]=c=>s(l).onOpenChange(!1)),onFocusOutside:d[1]||(d[1]=mt(c=>a("focusOutside",c),["prevent"]))}),{default:F(()=>[we(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),LD=qD,ND=le({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=ga(e,t),l=Vu();return(o,i)=>(p(),U(q1,je(s(r),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:i[0]||(i[0]=u=>s(l).onOpenChange(!1))}),{default:F(()=>[we(o.$slots,"default")]),_:3},16))}}),BD=ND,FD=le({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=ga(e,t),l=Vu(),o=cp();return(i,u)=>(p(),U(s(pl),{present:i.forceMount||s(l).open.value},{default:F(()=>[s(o).modal.value?(p(),U(LD,lt(je({key:0},{...i.$attrs,...s(r)})),{default:F(()=>[we(i.$slots,"default")]),_:3},16)):(p(),U(BD,lt(je({key:1},{...i.$attrs,...s(r)})),{default:F(()=>[we(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),VD=FD;const[zD,jD]=At("MenuGroup");var UD=le({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=Fa(void 0,"reka-menu-group");return jD({id:n}),(a,r)=>(p(),U(s(Qe),je({role:"group"},t,{"aria-labelledby":s(n)}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),HD=UD,KD=le({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,n=zD({id:""});return(a,r)=>(p(),U(s(Qe),je(t,{id:s(n).id||void 0}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["id"]))}}),WD=KD,GD=le({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Iu),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),YD=GD;const[JD,ZD]=At("MenuRadioGroup");var XD=le({__name:"MenuRadioGroup",props:{modelValue:{type:null,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=Tf(n,["modelValue"]),l=Ou(r),o=qt(n,"modelValue",a);return ZD({modelValue:o,onValueChange:i=>{o.value=i}}),(i,u)=>(p(),U(HD,lt(ut(s(l))),{default:F(()=>[we(i.$slots,"default",{modelValue:s(o)})]),_:3},16))}}),QD=XD,eO=le({__name:"MenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,a=t,r=Tf(n,["value"]),l=Ou(r),{value:o}=Ht(n),i=JD(),u=_(()=>i.modelValue.value===o?.value);return ID({modelValue:u}),(d,c)=>(p(),U(L1,je({role:"menuitemradio"},s(l),{"aria-checked":u.value,"data-state":s(p1)(u.value),onSelect:c[0]||(c[0]=async f=>{a("select",f),s(i).onValueChange(s(o))})}),{default:F(()=>[we(d.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),tO=eO,nO=le({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Qe),je(t,{role:"separator","aria-orientation":"horizontal"}),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),aO=nO;const[rO,lO]=At("DateFieldRoot");var oO=le({inheritAttrs:!1,__name:"DateFieldRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},modelValue:{type:null,required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},isDateUnavailable:{type:Function,required:!1,default:void 0},id:{type:String,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:placeholder"],setup(e,{expose:t,emit:n}){const a=e,r=n,{disabled:l,readonly:o,isDateUnavailable:i,granularity:u,defaultValue:d,dir:c,locale:f}=Ht(a),m=Mu(f),v=ya(c),y=Hf(m.value,{hourCycle:ds(a.hourCycle)}),{primitiveElement:x,currentElement:C}=ol(),k=A(new Set);xt(()=>{Xm(C.value).forEach(j=>k.value.add(j))});const E=qt(a,"modelValue",r,{defaultValue:d.value,passive:a.modelValue===void 0}),B=Uf({defaultPlaceholder:a.placeholder,granularity:u.value,defaultValue:E.value,locale:a.locale}),O=qt(a,"placeholder",r,{defaultValue:a.defaultPlaceholder??B.copy(),passive:a.placeholder===void 0}),T=_(()=>n1(a)),P=_(()=>a.granularity?Pd(O.value)?a.granularity:"day":Pd(O.value)?"minute":"day"),R=_(()=>E.value?!!(i.value?.(E.value)||a.minValue&&dr(E.value,a.minValue)||a.maxValue&&dr(a.maxValue,E.value)):!1),H=v5(P.value),S=A(E.value?{...Zm({value:E.value,formatter:y})}:{...H}),I=_(()=>M1({granularity:P.value,dateRef:O.value,formatter:y,hideTimeZone:a.hideTimeZone,hourCycle:a.hourCycle,segmentValues:S.value,locale:m})),z=_(()=>I.value.arr),D=_(()=>z.value.filter(({part:j})=>j!=="literal"));Ne(m,j=>{y.getLocale()!==j&&(y.setLocale(j),He(()=>{k.value.clear(),Xm(C.value).forEach(xe=>k.value.add(xe))}))}),Ne(E,j=>{!wn(j)&&O.value.compare(j)!==0&&(O.value=j.copy())}),Ne([E,m],([j])=>{wn(j)?Object.values(S.value).every(xe=>xe!==null)&&wn(j)&&(S.value={...H}):S.value={...Zm({value:j,formatter:y})}});const N=A(null),X=_(()=>Array.from(k.value).findIndex(j=>j.getAttribute("data-reka-date-field-segment")===N.value?.getAttribute("data-reka-date-field-segment"))),W=_(()=>{const j=v.value==="rtl"?-1:1;return(j<0?X.value<0:X.value>k.value.size-1)?null:Array.from(k.value)[X.value+j]}),K=_(()=>{const j=v.value==="rtl"?-1:1;return(j>0?X.value<0:X.value>k.value.size-1)?null:Array.from(k.value)[X.value-j]}),ae=_(()=>r1(P.value)),se=_(()=>Ac(E.value,P.value)),he=_(()=>a.maxValue?Ac(a.maxValue,P.value):void 0),ge=_(()=>a.minValue?Ac(a.minValue,P.value):void 0),oe=oo();function Z(j){j.isComposing||wa(j.key)&&(j.key===oe.ARROW_LEFT&&K.value?.focus(),j.key===oe.ARROW_RIGHT&&W.value?.focus())}function ue(j){N.value=j}return lO({isDateUnavailable:i.value,locale:m,modelValue:E,placeholder:O,disabled:l,formatter:y,hourCycle:a.hourCycle,step:T,readonly:o,segmentValues:S,isInvalid:R,segmentContents:D,elements:k,setFocusedElement:ue,focusNext(){W.value?.focus()}}),t({setFocusedElement:ue}),(j,xe)=>(p(),U(s(Qe),je(j.$attrs,{ref_key:"primitiveElement",ref:x,role:"group","aria-disabled":s(l)?!0:void 0,"data-disabled":s(l)?"":void 0,"data-readonly":s(o)?"":void 0,"data-invalid":R.value?"":void 0,dir:s(v),onKeydown:da(Z,["left","right"])}),{default:F(()=>[we(j.$slots,"default",{modelValue:s(E),segments:z.value,isInvalid:R.value}),L(s(Zf),{id:j.id,as:"input",type:ae.value,feature:"focusable",tabindex:"-1",value:se.value,name:j.name,disabled:s(l),required:j.required,max:he.value,min:ge.value,onFocus:xe[0]||(xe[0]=_e=>Array.from(k.value)?.[0]?.focus())},null,8,["id","type","value","name","disabled","required","max","min"])]),_:3},16,["aria-disabled","data-disabled","data-readonly","data-invalid","dir"]))}}),sO=oO,iO=le({__name:"DateFieldInput",props:{part:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=rO(),a=A(!0),r=A(!1),{handleSegmentClick:l,handleSegmentKeydown:o,handleSegmentBeforeInput:i,handleSegmentCompositionStart:u,handleSegmentCompositionEnd:d,attributes:c}=I1({hasLeftFocus:a,lastKeyZero:r,placeholder:n.placeholder,hourCycle:n.hourCycle,step:n.step,segmentValues:n.segmentValues,formatter:n.formatter,part:t.part,disabled:n.disabled,readonly:n.readonly,focusNext:n.focusNext,modelValue:n.modelValue}),f=_(()=>n.disabled.value),m=_(()=>n.readonly.value),v=_(()=>n.isInvalid.value);return(y,x)=>(p(),U(s(Qe),je({as:y.as,"as-child":y.asChild},s(c),{contenteditable:f.value||m.value?!1:y.part!=="literal","data-reka-date-field-segment":y.part,"aria-disabled":f.value?!0:void 0,"aria-readonly":m.value?!0:void 0,"data-disabled":f.value?"":void 0,"data-invalid":v.value?"":void 0,"aria-invalid":v.value?!0:void 0},Gy(y.part!=="literal"?{mousedown:s(l),keydown:s(o),beforeinput:s(i),compositionstart:s(u),compositionend:s(d),focusout:()=>{a.value=!0},focusin:C=>{s(n).setFocusedElement(C.target)}}:{})),{default:F(()=>[we(y.$slots,"default")]),_:3},16,["as","as-child","contenteditable","data-reka-date-field-segment","aria-disabled","aria-readonly","data-disabled","data-invalid","aria-invalid"]))}}),uO=iO;const[uo,cO]=At("PopoverRoot");var dO=le({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(e,{emit:t}){const n=e,a=t,{modal:r}=Ht(n),l=qt(n,"open",a,{defaultValue:n.defaultOpen,passive:n.open===void 0});return cO({contentId:"",triggerId:"",modal:r,open:l,onOpenChange:u=>{l.value=u},onOpenToggle:()=>{l.value=!l.value},triggerElement:A(),hasCustomAnchor:A(!1)}),(u,d)=>(p(),U(s(y1),null,{default:F(()=>[we(u.$slots,"default",{open:s(l),close:()=>l.value=!1})]),_:3}))}}),N1=dO,fO=le({__name:"PopoverAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;Xe();const n=uo();return jy(()=>{n.hasCustomAnchor.value=!0}),ja(()=>{n.hasCustomAnchor.value=!1}),(a,r)=>(p(),U(s(Qf),lt(ut(t)),{default:F(()=>[we(a.$slots,"default")]),_:3},16))}}),pO=fO;const[dp,vO]=At("DatePickerRoot");var mO=le({inheritAttrs:!1,__name:"DatePickerRoot",props:{defaultValue:{type:null,required:!1,default:void 0},defaultPlaceholder:{type:null,required:!1},placeholder:{type:null,required:!1,default:void 0},modelValue:{type:null,required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:null,required:!1},minValue:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},isDateUnavailable:{type:Function,required:!1,default:void 0},id:{type:String,required:!1},dir:{type:String,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1},isDateDisabled:{type:Function,required:!1,default:void 0},pagedNavigation:{type:Boolean,required:!1,default:!1},weekStartsOn:{type:Number,required:!1},weekdayFormat:{type:String,required:!1,default:"narrow"},fixedWeeks:{type:Boolean,required:!1,default:!1},numberOfMonths:{type:Number,required:!1,default:1},preventDeselect:{type:Boolean,required:!1,default:!1},closeOnSelect:{type:Boolean,required:!1,default:!1}},emits:["update:open","update:modelValue","update:placeholder"],setup(e,{emit:t}){const n=e,a=t,{locale:r,disabled:l,readonly:o,pagedNavigation:i,weekdayFormat:u,fixedWeeks:d,numberOfMonths:c,preventDeselect:f,isDateDisabled:m,isDateUnavailable:v,defaultOpen:y,modal:x,id:C,name:k,required:E,minValue:B,maxValue:O,granularity:T,hideTimeZone:P,hourCycle:R,defaultValue:H,dir:S,step:I,closeOnSelect:z}=Ht(n),D=ya(S),N=Mu(r),X=_(()=>n.weekStartsOn??l1(N.value)),W=qt(n,"modelValue",a,{defaultValue:H.value,passive:n.modelValue===void 0}),K=_(()=>Uf({defaultPlaceholder:n.placeholder,granularity:n.granularity,defaultValue:W.value,locale:N.value})),ae=qt(n,"placeholder",a,{defaultValue:n.defaultPlaceholder??K.value.copy(),passive:n.placeholder===void 0}),se=qt(n,"open",a,{defaultValue:y.value,passive:n.open===void 0}),he=A();function ge(oe){return"hour"in oe?oe.set({hour:0,minute:0,second:0,millisecond:0}):oe}return Ne(W,oe=>{oe&&oe.compare(ae.value)!==0?ae.value=oe.copy():!oe&&"hour"in ae.value&&(ae.value=ge(ae.value)),z.value&&(se.value=!1)}),vO({isDateUnavailable:v.value,isDateDisabled:m.value,locale:N,disabled:l,pagedNavigation:i,weekStartsOn:X,weekdayFormat:u,fixedWeeks:d,numberOfMonths:c,readonly:o,preventDeselect:f,modelValue:W,placeholder:ae,defaultOpen:y,modal:x,open:se,id:C,name:k,required:E,minValue:B,maxValue:O,granularity:T,hideTimeZone:P,hourCycle:R,dateFieldRef:he,dir:D,step:I,onDateChange(oe){oe?W.value&&!f.value&&oe&&W.value.compare(oe)===0?W.value=void 0:W.value=oe.copy():W.value=void 0},onPlaceholderChange(oe){ae.value=oe.copy()},closeOnSelect:z}),(oe,Z)=>(p(),U(s(N1),{open:s(se),"onUpdate:open":Z[0]||(Z[0]=ue=>Dt(se)?se.value=ue:null),"default-open":s(y),modal:s(x)},{default:F(()=>[we(oe.$slots,"default")]),_:3},8,["open","default-open","modal"]))}}),hO=mO,yO=le({__name:"DatePickerCalendar",setup(e){const t=dp();return(n,a)=>(p(),U(s(B5),je({isDateDisabled:s(t).isDateDisabled,isDateUnavailable:s(t).isDateUnavailable,minValue:s(t).minValue.value,maxValue:s(t).maxValue.value,locale:s(t).locale.value,disabled:s(t).disabled.value,pagedNavigation:s(t).pagedNavigation.value,weekStartsOn:s(t).weekStartsOn.value,weekdayFormat:s(t).weekdayFormat.value,fixedWeeks:s(t).fixedWeeks.value,numberOfMonths:s(t).numberOfMonths.value,readonly:s(t).readonly.value,preventDeselect:s(t).preventDeselect.value,dir:s(t).dir.value},{"model-value":s(t).modelValue.value,placeholder:s(t).placeholder.value,multiple:!1,"onUpdate:modelValue":a[0]||(a[0]=r=>{r&&s(t).modelValue.value&&s(Hl)(r,s(t).modelValue.value)||s(t).onDateChange(r)}),"onUpdate:placeholder":a[1]||(a[1]=r=>{s(Hl)(r,s(t).placeholder.value)||s(t).onPlaceholderChange(r)})}),{default:F(({weekDays:r,grid:l,date:o,weekStartsOn:i,locale:u,fixedWeeks:d})=>[we(n.$slots,"default",{date:o,grid:l,weekDays:r,weekStartsOn:i,locale:u,fixedWeeks:d})]),_:3},16,["model-value","placeholder"]))}}),gO=yO,bO=le({__name:"DatePickerCell",props:{date:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(V5),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),_O=bO,xO=le({__name:"DatePickerCellTrigger",props:{day:{type:null,required:!0},month:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(j5),lt(ut(t)),{default:F(r=>[we(n.$slots,"default",lt(ut(r)))]),_:3},16))}}),kO=xO,wO=le({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=Ou(Tf(n,"trapFocus","disableOutsidePointerEvents")),{forwardRef:l}=Xe(),o=uo();return o1(),(i,u)=>(p(),U(s(Yf),{"as-child":"",loop:"",trapped:i.trapFocus,onMountAutoFocus:u[5]||(u[5]=d=>a("openAutoFocus",d)),onUnmountAutoFocus:u[6]||(u[6]=d=>a("closeAutoFocus",d))},{default:F(()=>[L(s(Gf),{"as-child":"","disable-outside-pointer-events":i.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=d=>a("pointerDownOutside",d)),onInteractOutside:u[1]||(u[1]=d=>a("interactOutside",d)),onEscapeKeyDown:u[2]||(u[2]=d=>a("escapeKeyDown",d)),onFocusOutside:u[3]||(u[3]=d=>a("focusOutside",d)),onDismiss:u[4]||(u[4]=d=>s(o).onOpenChange(!1))},{default:F(()=>[L(s(T1),je(s(r),{id:s(o).contentId,ref:s(l),"data-state":s(o).open.value?"open":"closed","aria-labelledby":s(o).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:F(()=>[we(i.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),B1=wO,$O=le({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=uo(),l=A(!1);Mf(!0);const o=ga(n,a),{forwardRef:i,currentElement:u}=Xe();return Wf(u),(d,c)=>(p(),U(B1,je(s(o),{ref:s(i),"trap-focus":s(r).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:c[0]||(c[0]=mt(f=>{a("closeAutoFocus",f),l.value||s(r).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:c[1]||(c[1]=f=>{a("pointerDownOutside",f);const m=f.detail.originalEvent,v=m.button===0&&m.ctrlKey===!0,y=m.button===2||v;l.value=y}),onFocusOutside:c[2]||(c[2]=mt(()=>{},["prevent"]))}),{default:F(()=>[we(d.$slots,"default")]),_:3},16,["trap-focus"]))}}),CO=$O,SO=le({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=uo(),l=A(!1),o=A(!1),i=ga(n,a);return(u,d)=>(p(),U(B1,je(s(i),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{a("closeAutoFocus",c),c.defaultPrevented||(l.value||s(r).triggerElement.value?.focus(),c.preventDefault()),l.value=!1,o.value=!1}),onInteractOutside:d[1]||(d[1]=async c=>{a("interactOutside",c),c.defaultPrevented||(l.value=!0,c.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const f=c.target;s(r).triggerElement.value?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.value&&c.preventDefault()})}),{default:F(()=>[we(u.$slots,"default")]),_:3},16))}}),EO=SO,AO=le({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=uo(),l=ga(n,a),{forwardRef:o}=Xe();return r.contentId||=Fa(void 0,"reka-popover-content"),(i,u)=>(p(),U(s(pl),{present:i.forceMount||s(r).open.value},{default:F(()=>[s(r).modal.value?(p(),U(CO,je({key:0},s(l),{ref:s(o)}),{default:F(()=>[we(i.$slots,"default")]),_:3},16)):(p(),U(EO,je({key:1},s(l),{ref:s(o)}),{default:F(()=>[we(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),F1=AO,TO=le({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Iu),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),V1=TO,DO=le({__name:"DatePickerContent",props:{portal:{type:Object,required:!1},forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>({...n,portal:void 0})),l=ga(r,a);return(o,i)=>(p(),U(s(V1),lt(ut(o.portal)),{default:F(()=>[L(s(F1),je({...s(l),...o.$attrs},{onOpenAutoFocus:i[0]||(i[0]=u=>{a("openAutoFocus",u),!u.defaultPrevented&&u.target&&(s(a1)(u.target),u.preventDefault())})}),{default:F(()=>[we(o.$slots,"default")]),_:3},16)]),_:3},16))}}),OO=DO,MO=le({__name:"DatePickerField",setup(e){const t=dp();return(n,a)=>(p(),U(s(sO),je({ref:s(t).dateFieldRef,"model-value":s(t).modelValue.value,placeholder:s(t).placeholder.value},{id:s(t).id.value,name:s(t).name.value,disabled:s(t).disabled.value,minValue:s(t).minValue.value,maxValue:s(t).maxValue.value,readonly:s(t).readonly.value,hourCycle:s(t).hourCycle.value,granularity:s(t).granularity.value,hideTimeZone:s(t).hideTimeZone.value,locale:s(t).locale.value,isDateUnavailable:s(t).isDateUnavailable,required:s(t).required.value,dir:s(t).dir.value,step:s(t).step.value},{"onUpdate:modelValue":a[0]||(a[0]=r=>{r&&s(t).modelValue.value&&r.compare(s(t).modelValue.value)===0||s(t).onDateChange(r)}),"onUpdate:placeholder":a[1]||(a[1]=r=>{r.compare(s(t).placeholder.value)!==0&&s(t).onPlaceholderChange(r)})}),{default:F(({segments:r,modelValue:l})=>[we(n.$slots,"default",{segments:r,modelValue:l})]),_:3},16,["model-value","placeholder"]))}}),IO=MO,PO=le({__name:"DatePickerGrid",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(H5),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),RO=PO,qO=le({__name:"DatePickerGridBody",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(W5),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),LO=qO,NO=le({__name:"DatePickerGridHead",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Y5),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),BO=NO,FO=le({__name:"DatePickerGridRow",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Z5),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),eh=FO,VO=le({__name:"DatePickerHeadCell",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(Q5),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),zO=VO,jO=le({__name:"DatePickerHeader",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(tD),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),UO=jO,HO=le({__name:"DatePickerHeading",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(aD),lt(ut(t)),{default:F(({headingValue:r})=>[we(n.$slots,"default",{headingValue:r},()=>[ye($(r),1)])]),_:3},16))}}),KO=HO,WO=le({__name:"DatePickerInput",props:{part:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(uO),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),GO=WO,YO=le({__name:"DatePickerNext",props:{nextPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(lD),lt(ut(t)),{default:F(r=>[we(n.$slots,"default",lt(ut(r)))]),_:3},16))}}),JO=YO,ZO=le({__name:"DatePickerPrev",props:{prevPage:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(sD),lt(ut(t)),{default:F(r=>[we(n.$slots,"default",lt(ut(r)))]),_:3},16))}}),XO=ZO,QO=le({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=uo(),{forwardRef:a,currentElement:r}=Xe();return n.triggerId||=Fa(void 0,"reka-popover-trigger"),xt(()=>{n.triggerElement.value=r.value}),(l,o)=>(p(),U(Kt(s(n).hasCustomAnchor.value?s(Qe):s(Qf)),{"as-child":""},{default:F(()=>[L(s(Qe),{id:s(n).triggerId,ref:s(a),type:l.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":s(n).open.value,"aria-controls":s(n).contentId,"data-state":s(n).open.value?"open":"closed",as:l.as,"as-child":t.asChild,onClick:s(n).onOpenToggle},{default:F(()=>[we(l.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),eM=QO,tM=le({__name:"DatePickerTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=dp();return(a,r)=>(p(),U(s(eM),je({"data-reka-date-field-segment":"trigger"},t,{disabled:s(n).disabled.value,onFocusin:r[0]||(r[0]=l=>{s(n).dateFieldRef.value?.setFocusedElement(l.target)})}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["disabled"]))}}),nM=tM;const[z1,aM]=At("DropdownMenuRoot");var rM=le({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,a=t;Xe();const r=qt(n,"open",a,{defaultValue:n.defaultOpen,passive:n.open===void 0}),l=A(),{modal:o,dir:i}=Ht(n),u=ya(i);return aM({open:r,onOpenChange:d=>{r.value=d},onOpenToggle:()=>{r.value=!r.value},triggerId:"",triggerElement:l,contentId:"",modal:o,dir:u}),(d,c)=>(p(),U(s(SD),{open:s(r),"onUpdate:open":c[0]||(c[0]=f=>Dt(r)?r.value=f:null),dir:s(u),modal:s(o)},{default:F(()=>[we(d.$slots,"default",{open:s(r)})]),_:3},8,["open","dir","modal"]))}}),j1=rM,lM=le({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const r=ga(e,t);Xe();const l=z1(),o=A(!1);function i(u){u.defaultPrevented||(o.value||setTimeout(()=>{l.triggerElement.value?.focus()},0),o.value=!1,u.preventDefault())}return l.contentId||=Fa(void 0,"reka-dropdown-menu-content"),(u,d)=>(p(),U(s(VD),je(s(r),{id:s(l).contentId,"aria-labelledby":s(l)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:i,onInteractOutside:d[0]||(d[0]=c=>{if(c.defaultPrevented)return;const f=c.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0,v=f.button===2||m;(!s(l).modal.value||v)&&(o.value=!0),s(l).triggerElement.value?.contains(c.target)&&c.preventDefault()})}),{default:F(()=>[we(u.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),U1=lM,oM=le({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,r=fl(t);return Xe(),(l,o)=>(p(),U(s(L1),lt(ut({...n,...s(r)})),{default:F(()=>[we(l.$slots,"default")]),_:3},16))}}),zd=oM,sM=le({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Xe(),(n,a)=>(p(),U(s(RD),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),iM=sM,uM=le({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Xe(),(n,a)=>(p(),U(s(WD),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),cM=uM,dM=le({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,a)=>(p(),U(s(YD),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),H1=dM,fM=le({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=fl(t);return Xe(),(l,o)=>(p(),U(s(QD),lt(ut({...n,...s(r)})),{default:F(()=>[we(l.$slots,"default")]),_:3},16))}}),pM=fM,vM=le({__name:"DropdownMenuRadioItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=ga(e,t);return Xe(),(l,o)=>(p(),U(s(tO),lt(ut(s(r))),{default:F(()=>[we(l.$slots,"default")]),_:3},16))}}),mM=vM,hM=le({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Xe(),(n,a)=>(p(),U(s(aO),lt(ut(t)),{default:F(()=>[we(n.$slots,"default")]),_:3},16))}}),th=hM,yM=le({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=z1(),{forwardRef:a,currentElement:r}=Xe();return xt(()=>{n.triggerElement=r}),n.triggerId||=Fa(void 0,"reka-dropdown-menu-trigger"),(l,o)=>(p(),U(s(_D),{"as-child":""},{default:F(()=>[L(s(Qe),{id:s(n).triggerId,ref:s(a),type:l.as==="button"?"button":void 0,"as-child":t.asChild,as:l.as,"aria-haspopup":"menu","aria-expanded":s(n).open.value,"aria-controls":s(n).open.value?s(n).contentId:void 0,"data-disabled":l.disabled?"":void 0,disabled:l.disabled,"data-state":s(n).open.value?"open":"closed",onClick:o[0]||(o[0]=async i=>{!l.disabled&&i.button===0&&i.ctrlKey===!1&&(s(n)?.onOpenToggle(),await He(),s(n).open.value&&i.preventDefault())}),onKeydown:o[1]||(o[1]=da(i=>{l.disabled||(["Enter"," "].includes(i.key)&&s(n).onOpenToggle(),i.key==="ArrowDown"&&s(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())},["enter","space","arrow-down"]))},{default:F(()=>[we(l.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),K1=yM;const vs=100,[gM,bM]=At("ProgressRoot"),Zi=e=>typeof e=="number";function _M(e,t){return wn(e)||Zi(e)&&!Number.isNaN(e)&&e<=t&&e>=0?e:(console.error(`Invalid prop \`value\` of value \`${e}\` supplied to \`ProgressRoot\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${vs} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`),null)}function xM(e){return Zi(e)&&!Number.isNaN(e)&&e>0?e:(console.error(`Invalid prop \`max\` of value \`${e}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vs}\`.`),vs)}var kM=le({__name:"ProgressRoot",props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:vs},getValueLabel:{type:Function,required:!1,default:(e,t)=>Zi(e)?`${Math.round(e/t*vs)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue","update:max"],setup(e,{emit:t}){const n=e,a=t;Xe();const r=qt(n,"modelValue",a,{passive:n.modelValue===void 0}),l=qt(n,"max",a,{passive:n.max===void 0});Ne(()=>r.value,async i=>{const u=_M(i,n.max);u!==i&&(await He(),r.value=u)},{immediate:!0}),Ne(()=>n.max,i=>{const u=xM(n.max);u!==i&&(l.value=u)},{immediate:!0});const o=_(()=>wn(r.value)?"indeterminate":r.value===l.value?"complete":"loading");return bM({modelValue:r,max:l,progressState:o}),(i,u)=>(p(),U(s(Qe),{"as-child":i.asChild,as:i.as,"aria-valuemax":s(l),"aria-valuemin":0,"aria-valuenow":Zi(s(r))?s(r):void 0,"aria-valuetext":i.getValueText?.(s(r),s(l)),"aria-label":i.getValueLabel(s(r),s(l)),role:"progressbar","data-state":o.value,"data-value":s(r)??void 0,"data-max":s(l)},{default:F(()=>[we(i.$slots,"default",{modelValue:s(r)})]),_:3},8,["as-child","as","aria-valuemax","aria-valuenow","aria-valuetext","aria-label","data-state","data-value","data-max"]))}}),Nc=kM,wM=le({__name:"ProgressIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=gM();return Xe(),(a,r)=>(p(),U(s(Qe),je(t,{"data-state":s(n).progressState.value,"data-value":s(n).modelValue?.value??void 0,"data-max":s(n).max.value}),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["data-state","data-value","data-max"]))}}),Bc=wM;const $M="radio.select";function CM(e,t,n){Af($M,n,{originalEvent:e,value:t})}var SM=le({__name:"Radio",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},checked:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:checked","select"],setup(e,{emit:t}){const n=e,a=t,r=qt(n,"checked",a,{passive:n.checked===void 0}),{value:l}=Ht(n),{forwardRef:o,currentElement:i}=Xe(),u=Kf(i),d=_(()=>n.id&&i.value?document.querySelector(`[for="${n.id}"]`)?.innerText??n.value:void 0);function c(f){n.disabled||CM(f,n.value,m=>{a("select",m),!m?.defaultPrevented&&(r.value=!0,u.value&&m.stopPropagation())})}return(f,m)=>(p(),U(s(Qe),je(f.$attrs,{id:f.id,ref:s(o),role:"radio",type:f.as==="button"?"button":void 0,as:f.as,"aria-checked":s(r),"aria-label":d.value,"as-child":f.asChild,disabled:f.disabled?"":void 0,"data-state":s(r)?"checked":"unchecked","data-disabled":f.disabled?"":void 0,value:s(l),required:f.required,name:f.name,onClick:mt(c,["stop"])}),{default:F(()=>[we(f.$slots,"default",{checked:s(r)}),s(u)&&f.name?(p(),U(s(Xf),{key:0,type:"radio",tabindex:"-1",value:s(l),checked:!!s(r),name:f.name,disabled:f.disabled,required:f.required},null,8,["value","checked","name","disabled","required"])):G("v-if",!0)]),_:3},16,["id","type","as","aria-checked","aria-label","as-child","disabled","data-state","data-disabled","value","required","name"]))}}),EM=SM;const[AM,TM]=At("RadioGroupRoot");var DM=le({__name:"RadioGroupRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:l}=Xe(),o=qt(n,"modelValue",a,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),{disabled:i,loop:u,orientation:d,name:c,required:f,dir:m}=Ht(n),v=ya(m),y=Kf(l);return TM({modelValue:o,changeModelValue:x=>{o.value=x},disabled:i,loop:u,orientation:d,name:c?.value,required:f}),(x,C)=>(p(),U(s(Bu),{"as-child":"",orientation:s(d),dir:s(v),loop:s(u)},{default:F(()=>[L(s(Qe),{ref:s(r),role:"radiogroup","data-disabled":s(i)?"":void 0,"as-child":x.asChild,as:x.as,"aria-orientation":s(d),"aria-required":s(f),dir:s(v)},{default:F(()=>[we(x.$slots,"default",{modelValue:s(o)}),s(y)&&s(c)?(p(),U(s(Xf),{key:0,required:s(f),disabled:s(i),value:s(o),name:s(c)},null,8,["required","disabled","value","name"])):G("v-if",!0)]),_:3},8,["data-disabled","as-child","as","aria-orientation","aria-required","dir"])]),_:3},8,["orientation","dir","loop"]))}}),W1=DM;const[dW,OM]=At("RadioGroupItem");var MM=le({inheritAttrs:!1,__name:"RadioGroupItem",props:{id:{type:String,required:!1},value:{type:null,required:!1},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,a=t,{forwardRef:r,currentElement:l}=Xe(),o=AM(),i=_(()=>o.disabled.value||n.disabled),u=_(()=>o.required.value||n.required),d=_(()=>is(o.modelValue?.value,n.value));OM({disabled:i,checked:d});const c=A(!1),f=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];to("keydown",v=>{f.includes(v.key)&&(c.value=!0)}),to("keyup",()=>{c.value=!1});function m(){setTimeout(()=>{c.value&&l.value?.click()},0)}return(v,y)=>(p(),U(s(Fu),{checked:d.value,disabled:i.value,"as-child":"",focusable:!i.value,active:d.value},{default:F(()=>[L(EM,je({...v.$attrs,...n},{ref:s(r),checked:d.value,required:u.value,disabled:i.value,"onUpdate:checked":y[0]||(y[0]=x=>s(o).changeModelValue(v.value)),onSelect:y[1]||(y[1]=x=>a("select",x)),onKeydown:y[2]||(y[2]=da(mt(()=>{},["prevent"]),["enter"])),onFocus:m}),{default:F(()=>[we(v.$slots,"default",{checked:d.value,required:u.value,disabled:i.value})]),_:3},16,["checked","required","disabled"])]),_:3},8,["checked","disabled","focusable","active"]))}}),G1=MM,IM=le({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=["horizontal","vertical"];function a(i){return n.includes(i)}const r=_(()=>a(t.orientation)?t.orientation:"horizontal"),l=_(()=>r.value==="vertical"?t.orientation:void 0),o=_(()=>t.decorative?{role:"none"}:{"aria-orientation":l.value,role:"separator"});return(i,u)=>(p(),U(s(Qe),je({as:i.as,"as-child":i.asChild,"data-orientation":r.value},o.value),{default:F(()=>[we(i.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),PM=IM;const[fp,RM]=At("TabsRoot");var qM=le({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,{orientation:r,unmountOnHide:l,dir:o}=Ht(n),i=ya(o);Xe();const u=qt(n,"modelValue",a,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),d=A(),c=ul(new Set);return RM({modelValue:u,changeModelValue:f=>{u.value=f},orientation:r,dir:i,unmountOnHide:l,activationMode:n.activationMode,baseId:Fa(void 0,"reka-tabs"),tabsList:d,contentIds:c,registerContent:f=>{c.value=new Set([...c.value,f])},unregisterContent:f=>{const m=new Set(c.value);m.delete(f),c.value=m}}),(f,m)=>(p(),U(s(Qe),{dir:s(i),"data-orientation":s(r),"as-child":f.asChild,as:f.as},{default:F(()=>[we(f.$slots,"default",{modelValue:s(u)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),LM=qM;function Y1(e,t){return`${e}-trigger-${t}`}function J1(e,t){return`${e}-content-${t}`}var NM=le({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n}=Xe(),a=fp(),r=_(()=>Y1(a.baseId,t.value)),l=_(()=>J1(a.baseId,t.value)),o=_(()=>t.value===a.modelValue.value),i=A(o.value);return xt(()=>{a.registerContent(t.value),requestAnimationFrame(()=>{i.value=!1})}),Et(()=>{a.unregisterContent(t.value)}),(u,d)=>(p(),U(s(pl),{present:u.forceMount||o.value,"force-mount":""},{default:F(({present:c})=>[L(s(Qe),{id:l.value,ref:s(n),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":o.value?"active":"inactive","data-orientation":s(a).orientation.value,"aria-labelledby":r.value,hidden:!c,tabindex:"0",style:cn({animationDuration:i.value?"0s":void 0})},{default:F(()=>[!s(a).unmountOnHide.value||c?we(u.$slots,"default",{key:0}):G("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),nh=NM,BM=le({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{loop:n}=Ht(t),{forwardRef:a,currentElement:r}=Xe(),l=fp();return l.tabsList=r,(o,i)=>(p(),U(s(Bu),{"as-child":"",orientation:s(l).orientation.value,dir:s(l).dir.value,loop:s(n)},{default:F(()=>[L(s(Qe),{ref:s(a),role:"tablist","as-child":o.asChild,as:o.as,"aria-orientation":s(l).orientation.value},{default:F(()=>[we(o.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),FM=BM,VM=le({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,{forwardRef:n}=Xe(),a=fp(),r=_(()=>Y1(a.baseId,t.value)),l=_(()=>a.contentIds.value.has(t.value)?J1(a.baseId,t.value):void 0),o=_(()=>t.value===a.modelValue.value);return(i,u)=>(p(),U(s(Fu),{"as-child":"",focusable:!i.disabled,active:o.value},{default:F(()=>[L(s(Qe),{id:r.value,ref:s(n),role:"tab",type:i.as==="button"?"button":void 0,as:i.as,"as-child":i.asChild,"aria-selected":o.value?"true":"false","aria-controls":l.value,"data-state":o.value?"active":"inactive",disabled:i.disabled,"data-disabled":i.disabled?"":void 0,"data-orientation":s(a).orientation.value,onMousedown:u[0]||(u[0]=mt(d=>{!i.disabled&&d.ctrlKey===!1?s(a).changeModelValue(i.value):d.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=da(d=>s(a).changeModelValue(i.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const d=s(a).activationMode!=="manual";!o.value&&!i.disabled&&d&&s(a).changeModelValue(i.value)})},{default:F(()=>[we(i.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),ah=VM;const[zM,jM]=At("TimeFieldRoot");function Xs(e,t=Ds(Yn())){return e&&"day"in e?e:fa(t,e)}var UM=le({inheritAttrs:!1,__name:"TimeFieldRoot",props:{defaultValue:{type:Object,required:!1,default:void 0},defaultPlaceholder:{type:Object,required:!1},placeholder:{type:Object,required:!1,default:void 0},modelValue:{type:[Object,null],required:!1},hourCycle:{type:null,required:!1},step:{type:Object,required:!1},stepSnapping:{type:Boolean,required:!1,default:!1},granularity:{type:String,required:!1},hideTimeZone:{type:Boolean,required:!1},maxValue:{type:Object,required:!1},minValue:{type:Object,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},readonly:{type:Boolean,required:!1,default:!1},id:{type:String,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:placeholder"],setup(e,{expose:t,emit:n}){const a=e,r=n,{disabled:l,readonly:o,granularity:i,defaultValue:u,minValue:d,maxValue:c,stepSnapping:f,dir:m,locale:v}=Ht(a),y=Mu(v),x=ya(m),C=Hf(y.value,{hourCycle:ds(a.hourCycle)}),{primitiveElement:k,currentElement:E}=ol(),B=A(new Set),O=_(()=>n1(a)),T=_(()=>d.value?Xs(d.value):void 0),P=_(()=>c.value?Xs(c.value):void 0);xt(()=>{Qm(E.value).forEach(_e=>B.value.add(_e))});const R=qt(a,"modelValue",r,{defaultValue:u.value,passive:a.modelValue===void 0}),H=_({get(){return wn(R.value)?R.value:Xs(R.value)},set(_e){return _e?R.value=R.value&&"day"in R.value?_e:new sa(_e.hour,_e.minute,_e.second,R.value?.millisecond):R.value=_e,_e}}),S=PA({defaultPlaceholder:a.placeholder,defaultValue:R.value}),I=qt(a,"placeholder",r,{defaultValue:a.defaultPlaceholder??S.copy(),passive:a.placeholder===void 0}),z=_({get(){return Xs(I.value)},set(_e){return _e&&(I.value="day"in I.value?_e.copy():new sa(_e.hour,_e.minute,_e.second,I.value?.millisecond)),_e}}),D=_(()=>i.value?i.value:"minute"),N=_(()=>R.value?!!(T.value&&dr(H.value,T.value)||P.value&&dr(P.value,H.value)):!1),X=p5(D.value),W=A(R.value?{...Vd({value:H.value,formatter:C})}:{...X}),K=_(()=>M1({granularity:D.value,dateRef:z.value,formatter:C,hideTimeZone:a.hideTimeZone,hourCycle:a.hourCycle,segmentValues:W.value,locale:y,isTimeValue:!0})),ae=_(()=>{const _e=K.value.arr;return a.hourCycle===12?_e.map(Y=>{if(Y.part==="hour"&&"hour"in W.value){const me=W.value.hour;if(me!==null){const J=me===0?12:me>12?me-12:me;return{...Y,value:J.toString()}}}return Y}):_e}),se=_(()=>ae.value.filter(({part:_e})=>_e!=="literal"));Ne(y,_e=>{C.getLocale()!==_e&&(C.setLocale(_e),He(()=>{B.value.clear(),Qm(E.value).forEach(Y=>B.value.add(Y))}))}),Ne(H,_e=>{!wn(_e)&&(!Hl(z.value,_e)||z.value.compare(_e)!==0)&&(I.value=_e.copy())}),Ne([H,y],([_e])=>{wn(_e)?Object.values(W.value).every(Y=>Y!==null)&&wn(_e)&&(W.value={...X}):W.value={...Vd({value:_e,formatter:C})}});const he=A(null),ge=_(()=>Array.from(B.value).findIndex(_e=>_e.getAttribute("data-reka-time-field-segment")===he.value?.getAttribute("data-reka-time-field-segment"))),oe=_(()=>{const _e=x.value==="rtl"?-1:1;return(_e<0?ge.value<0:ge.value>B.value.size-1)?null:Array.from(B.value)[ge.value+_e]}),Z=_(()=>{const _e=x.value==="rtl"?-1:1;return(_e>0?ge.value<0:ge.value>B.value.size-1)?null:Array.from(B.value)[ge.value-_e]}),ue=oo();function j(_e){_e.isComposing||wa(_e.key)&&(_e.key===ue.ARROW_LEFT&&Z.value?.focus(),_e.key===ue.ARROW_RIGHT&&oe.value?.focus())}function xe(_e){he.value=_e}return jM({locale:y,modelValue:H,placeholder:z,disabled:l,formatter:C,hourCycle:a.hourCycle,step:O,stepSnapping:f,readonly:o,segmentValues:W,isInvalid:N,segmentContents:se,elements:B,setFocusedElement:xe,focusNext(){oe.value?.focus()}}),t({setFocusedElement:xe}),(_e,Y)=>(p(),U(s(Qe),je(_e.$attrs,{ref_key:"primitiveElement",ref:k,role:"group","aria-disabled":s(l)?!0:void 0,"data-disabled":s(l)?"":void 0,"data-readonly":s(o)?"":void 0,"data-invalid":N.value?"":void 0,dir:s(x),onKeydown:da(j,["left","right"])}),{default:F(()=>[we(_e.$slots,"default",{modelValue:s(R),segments:ae.value,isInvalid:N.value}),L(s(Zf),{id:_e.id,as:"input",feature:"focusable",tabindex:"-1",value:s(R)?s(R).toString():"",name:_e.name,disabled:s(l),required:_e.required,onFocus:Y[0]||(Y[0]=me=>Array.from(B.value)?.[0]?.focus())},null,8,["id","value","name","disabled","required"])]),_:3},16,["aria-disabled","data-disabled","data-readonly","data-invalid","dir"]))}}),rh=UM,HM=le({__name:"TimeFieldInput",props:{part:{type:null,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=zM(),a=A(!0),r=A(!1),{handleSegmentClick:l,handleSegmentKeydown:o,handleSegmentBeforeInput:i,handleSegmentCompositionStart:u,handleSegmentCompositionEnd:d,handleSegmentFocusOut:c,attributes:f}=I1({hasLeftFocus:a,lastKeyZero:r,placeholder:n.placeholder,hourCycle:n.hourCycle,step:n.step,stepSnapping:n.stepSnapping,segmentValues:n.segmentValues,formatter:n.formatter,part:t.part,disabled:n.disabled,readonly:n.readonly,focusNext:n.focusNext,modelValue:n.modelValue}),m=_(()=>n.disabled.value),v=_(()=>n.readonly.value),y=_(()=>n.isInvalid.value);return(x,C)=>(p(),U(s(Qe),je({as:x.as,"as-child":x.asChild},s(f),{contenteditable:m.value||v.value?!1:x.part!=="literal","data-reka-time-field-segment":x.part,"aria-disabled":m.value?!0:void 0,"aria-readonly":v.value?!0:void 0,"data-disabled":m.value?"":void 0,"data-invalid":y.value?"":void 0,"aria-invalid":y.value?!0:void 0},Gy(x.part!=="literal"?{mousedown:s(l),keydown:s(o),beforeinput:s(i),compositionstart:s(u),compositionend:s(d),focusout:()=>{a.value=!0,s(c)()},focusin:k=>{s(n).setFocusedElement(k.target)}}:{})),{default:F(()=>[we(x.$slots,"default")]),_:3},16,["as","as-child","contenteditable","data-reka-time-field-segment","aria-disabled","aria-readonly","data-disabled","data-invalid","aria-invalid"]))}}),lh=HM,KM=le({__name:"ToolbarButton",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,{forwardRef:n}=Xe();return(a,r)=>(p(),U(s(Fu),{"as-child":"",focusable:!a.disabled},{default:F(()=>[L(s(Qe),je({ref:s(n),type:a.as==="button"?"button":void 0},t),{default:F(()=>[we(a.$slots,"default")]),_:3},16,["type"])]),_:3},8,["focusable"]))}}),$o=KM;const[WM,GM]=At("ToolbarRoot");var YM=le({__name:"ToolbarRoot",props:{orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},loop:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{orientation:n,dir:a}=Ht(t),r=ya(a),{forwardRef:l}=Xe();return GM({orientation:n,dir:r}),(o,i)=>(p(),U(s(Bu),{"as-child":"",orientation:s(n),dir:s(r),loop:o.loop},{default:F(()=>[L(s(Qe),{ref:s(l),role:"toolbar","aria-orientation":s(n),"as-child":o.asChild,as:o.as},{default:F(()=>[we(o.$slots,"default")]),_:3},8,["aria-orientation","as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),JM=YM,ZM=le({__name:"ToolbarSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=WM();return Xe(),(a,r)=>(p(),U(PM,{orientation:s(n).orientation.value,"as-child":t.asChild,as:a.as},{default:F(()=>[we(a.$slots,"default")]),_:3},8,["orientation","as-child","as"]))}}),Fc=ZM;const XM=/^filter\[(.+)\]$/,QM=/^[1-9]\d*$/;function Sl(e){const t=Array.isArray(e)?e[e.length-1]:e;return typeof t=="string"?t:""}function oh(e){return QM.test(e)?Number(e):void 0}function Z1(e){const t={},n=Sl(e.search).trim();n!==""&&(t.search=n);const a=Sl(e.sort).trim();if(a!==""){t.sort=a;const i=Sl(e.dir);t.dir=i==="desc"?"desc":"asc"}const r=oh(Sl(e.page));r!==void 0&&(t.page=r);const l=oh(Sl(e.per_page));l!==void 0&&(t.per_page=l);const o={};for(const i of Object.keys(e).sort()){const u=XM.exec(i)?.[1],d=Sl(e[i]);u&&d!==""&&(o[u]=d)}return Object.keys(o).length>0&&(t.filter=o),t}function Xi(e){const t={};e.search&&(t.search=e.search),e.sort&&(t.sort=e.sort,t.dir=e.dir==="desc"?"desc":"asc"),e.page!==void 0&&e.page>1&&(t.page=String(e.page)),e.per_page!==void 0&&(t.per_page=String(e.per_page));for(const n of Object.keys(e.filter??{}).sort()){const a=e.filter?.[n];a!==void 0&&a!==""&&(t[`filter[${n}]`]=a)}return t}function Ll(e){return JSON.stringify(Xi(e))}const X1="summer-admin.list:",e6=Ll({});let jd=null;function zu(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function Q1(e){return`${X1}${e}:`}function e0(e){return jd===null?null:Q1(jd)+e}function Ud(e){try{zu()?.removeItem(e)}catch{}}function sh(e){const t=zu();if(t)try{const n=[];for(let a=0;a!0);return}const n=Q1(t);sh(a=>!a.startsWith(n))}function t6(e){const t=e0(e);if(t===null)return{};let n=null;try{n=zu()?.getItem(t)??null}catch{return{}}if(n===null)return{};let a;try{a=JSON.parse(n)}catch{return Ud(t),{}}return typeof a!="object"||a===null||Array.isArray(a)||Object.getPrototypeOf(a)!==Object.prototype||!Object.values(a).every(r=>typeof r=="string")?(Ud(t),{}):Z1(a)}function Qs(e,t){const n=e0(e);if(n!==null){if(Ll(t)===e6){Ud(n);return}try{zu()?.setItem(n,JSON.stringify(Xi(t)))}catch{}}}const el=A(null),t0=A(null);let Xo=null;function n0(e){a0(),t0.value=e,!(e===null||e<=0)&&(Xo=setTimeout(()=>{Xo=null,hf()},e*800))}function a0(){Xo!==null&&(clearTimeout(Xo),Xo=null)}w2(n0);const tn=Ct(el);async function n6(e,t){const{data:n,response:a}=await Re.POST("/auth/login",{body:{login:e,password:t}});return!a.ok||!n?!1:(n0(typeof n.data.expires_in=="number"?n.data.expires_in:null),!0)}async function r0(){const{data:e,response:t}=await Re.GET("/auth/me");return el.value=t.ok&&e?e.data:null,pp(el.value?.id??null),await V3(el.value),el.value}function l0(e){if(!e)return"";const t=[e.first_name,e.last_name].map(n=>n.trim()).filter(Boolean);return t.length>0?t.slice(0,2).map(n=>n.charAt(0).toUpperCase()).join(""):e.login.slice(0,2).toUpperCase()}function Vc(e){el.value=e,pp(e.id)}function o0(){a0(),el.value=null,t0.value=null,pp(null)}function Hd(e){o0();const t=e.currentRoute.value;t.name!=="login"&&e.push({name:"login",query:{redirect:t.fullPath}}).catch(()=>{})}async function s0(e){try{await Re.POST("/auth/logout")}catch{}finally{o0(),T2([]),M2([])}e&&await e.replace({name:"login"}).catch(()=>{})}const a6=["src"],r6={key:1,class:"flex size-[34px] shrink-0 items-center justify-center rounded-full bg-accent text-[13px] font-bold text-on-accent","aria-hidden":"true","data-user-initials":""},l6={class:"flex flex-col leading-tight max-[1099px]:hidden","data-user-identity":""},o6={class:"font-semibold"},s6={key:0,class:"text-[12px] text-muted","data-user-role":""},i6={class:"flex items-center gap-3 px-2 py-2"},u6=["src"],c6={key:1,class:"flex size-10 shrink-0 items-center justify-center rounded-full bg-accent text-[14px] font-bold text-on-accent","aria-hidden":"true"},d6={class:"flex min-w-0 flex-col leading-tight"},f6={class:"truncate font-bold"},p6={class:"truncate text-[13px] text-muted"},v6={class:"flex size-[18px] items-center justify-center"},m6=le({__name:"UserMenu",setup(e){const t=ha(),n=_(()=>{const m=tn.value;if(!m)return"";const v=`${m.first_name} ${m.last_name}`.trim();return v===""?m.login:v}),a=_(()=>l0(tn.value)),r=_(()=>tn.value?.avatar?.thumb_url||tn.value?.avatar?.url||""),l=_(()=>tn.value?.role?.name??""),o=_(()=>q3.value||Wn.value);function i(m){try{const v=new Intl.DisplayNames([m],{type:"language"}).of(m);if(v&&v!==m)return v.charAt(0).toLocaleUpperCase(m)+v.slice(1)}catch{}return m.toUpperCase()}const u=_(()=>S2.value.map(m=>({code:m,name:i(m)})));function d(m){typeof m=="string"&&m!==""&&z3(m)}async function c(){await t.push({name:"account"}).catch(()=>{})}async function f(){await s0(t)}return(m,v)=>(p(),U(s(j1),{modal:!1},{default:F(()=>[L(s(K1),{"data-user-menu":"",disabled:!s(tn),"aria-label":`${s(h)("backend::lang.nav.user_menu")}: ${n.value}`,class:"flex h-input items-center gap-2.5 rounded-inner px-2 text-left transition-colors duration-150 ease-out hover:bg-hover"},{default:F(()=>[r.value?(p(),g("img",{key:0,src:r.value,alt:"","data-user-avatar":"",class:"size-[34px] shrink-0 rounded-full object-cover"},null,8,a6)):(p(),g("span",r6,$(a.value),1)),b("span",l6,[b("span",o6,$(n.value),1),l.value?(p(),g("span",s6,$(l.value),1)):G("",!0)]),L(s(yr),{size:16,class:"text-muted","aria-hidden":"true"})]),_:1},8,["disabled","aria-label"]),L(s(H1),null,{default:F(()=>[L(s(U1),{"data-user-menu-content":"",align:"end","side-offset":8,class:"z-50 flex w-[280px] flex-col rounded-[14px] border border-border bg-surface p-2 text-text shadow-menu"},{default:F(()=>[b("div",i6,[r.value?(p(),g("img",{key:0,src:r.value,alt:"","data-user-avatar":"",class:"size-10 shrink-0 rounded-full object-cover"},null,8,u6)):(p(),g("span",c6,$(a.value),1)),b("span",d6,[b("span",f6,$(n.value),1),b("span",p6,$(s(tn)?.email),1)])]),L(s(zd),{"data-action":"account",class:"flex h-10 cursor-pointer items-center gap-2.5 rounded-control px-3 font-medium outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover",onSelect:c},{default:F(()=>[L(s(y3),{size:18,"aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.myaccount.menu_label")),1)]),_:1}),u.value.length>1?(p(),g(ve,{key:0},[L(s(th),{class:"my-1 h-px bg-border"}),L(s(cM),{class:"px-3 pt-1 pb-1 text-[12px] font-semibold text-muted","data-language-label":""},{default:F(()=>[ye($(s(h)("backend::lang.nav.language")),1)]),_:1}),L(s(pM),{"model-value":o.value,"onUpdate:modelValue":d},{default:F(()=>[(p(!0),g(ve,null,Me(u.value,y=>(p(),U(s(mM),{key:y.code,value:y.code,"data-locale-option":y.code,lang:y.code,class:"flex h-10 cursor-pointer items-center gap-2.5 rounded-control px-3 font-medium outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover"},{default:F(()=>[b("span",v6,[L(s(iM),null,{default:F(()=>[L(s(Ln),{size:18,"aria-hidden":"true"})]),_:1})]),b("span",null,$(y.name),1)]),_:2},1032,["value","data-locale-option","lang"]))),128))]),_:1},8,["model-value"])],64)):G("",!0),L(s(th),{class:"my-1 h-px bg-border"}),L(s(zd),{"data-action":"logout",class:"flex h-10 cursor-pointer items-center gap-2.5 rounded-control px-3 font-medium outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover",onSelect:f},{default:F(()=>[L(s(sb),{size:18,"aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.auth.logout")),1)]),_:1})]),_:1})]),_:1})]),_:1}))}}),h6=["role","data-tone"],y6={class:"font-medium"},g6=["aria-label","onClick"],b6=le({__name:"Toast",setup(e){return(t,n)=>(p(),U(Hk,{tag:"div",name:"toast",class:"pointer-events-none fixed inset-x-0 bottom-[88px] z-50 flex flex-col items-center gap-2 px-4"},{default:F(()=>[(p(!0),g(ve,null,Me(s(P3),a=>(p(),g("div",{key:a.id,role:a.tone==="danger"?"alert":"status","data-tone":a.tone,class:"pointer-events-auto flex max-w-[560px] items-center gap-3 rounded-[14px] bg-[#1d2740] py-3 pr-2.5 pl-3.5 text-white shadow-toast"},[b("span",{class:pe([a.tone==="danger"?"bg-[#f58a8a] text-[#1d2740]":"bg-accent text-on-accent","flex size-[26px] shrink-0 items-center justify-center rounded-full"]),"aria-hidden":"true"},[a.tone==="danger"?(p(),U(s(ht),{key:0,size:16})):(p(),U(s(Ln),{key:1,size:16}))],2),b("span",y6,$(a.text),1),b("button",{type:"button","aria-label":s(h)("backend::lang.form.close"),class:"flex size-8 items-center justify-center rounded-pager text-[#c3cbda] transition-colors duration-150 ease-out hover:bg-side-hover hover:text-white",onClick:r=>s(gb)(a.id)},[L(s(Xt),{size:16,"aria-hidden":"true"})],8,g6)],8,h6))),128))]),_:1}))}}),_6=[{combo:"mod+s",labelKey:"backend::lang.form.save"},{combo:"mod+enter",labelKey:"backend::lang.form.save_and_close"},{combo:"mod+shift+s",labelKey:"backend::lang.form.create_and_new"},{combo:"escape",labelKey:"backend::lang.shortcuts.leave"},{combo:"/",labelKey:"backend::lang.shortcuts.search"},{combo:"?",labelKey:"backend::lang.shortcuts.help"}],x6=new Set(["mod+s","mod+enter","mod+shift+s"]);function vp(e){const t=typeof navigator>"u"?"":navigator.platform||"";return/mac|iphone|ipad|ipod/i.test(t)}function k6(e){if(/^[a-z]$/i.test(e.key))return e.key.toLowerCase();const t=/^Key([A-Z])$/.exec(e.code??"");return t?t[1].toLowerCase():""}function i0(e){if(e.isComposing)return null;if(e.ctrlKey||e.metaKey)return e.altKey?null:e.key==="Enter"?e.shiftKey?null:"mod+enter":k6(e)==="s"?e.shiftKey?"mod+shift+s":"mod+s":null;if(e.altKey)return null;switch(e.key){case"Escape":return"escape";case"/":return"/";case"?":return"?";default:return null}}function w6(e){if(!e||typeof e.closest!="function")return!1;const t=e;return t.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])')!==null?!0:t.tagName.includes("-")&&t.closest('form, [role="form"]')!==null}function $6(e){return(typeof e.composedPath=="function"?e.composedPath():[])[0]??e.target}function u0(e,t=vp()){switch(e){case"mod+s":return t?["⌘","S"]:["Ctrl","S"];case"mod+enter":return t?["⌘","↩"]:["Ctrl","Enter"];case"mod+shift+s":return t?["⇧","⌘","S"]:["Ctrl","Shift","S"];case"escape":return["Esc"];default:return[e]}}function C6(e,t=vp()){return u0(e,t).join(t?"":"+")}function Vn(e,t,n=vp()){return h("backend::lang.shortcuts.hint",{label:e,keys:C6(t,n)})}const ih={"mod+s":"Control+S Meta+S","mod+enter":"Control+Enter Meta+Enter","mod+shift+s":"Control+Shift+S Meta+Shift+S",escape:"Escape","/":"/","?":"?"};function ju(e){return e.split(/\s+/).filter(t=>t in ih).map(t=>ih[t]).join(" ")}function c0(e=document){return Array.from(e.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"]')).filter(n=>n.getAttribute("data-state")!=="closed").at(-1)??e}function mp(e,t){return t.querySelector(`[data-hotkey~="${e}"]`)}function S6(e=document){const t=c0(e);return _6.filter(n=>n.combo==="?"||mp(n.combo,t)!==null)}const hp=A(null),uh=Ct(hp);function E6(){hp.value=S6()}function d0(){hp.value=null}function f0(e){return e.disabled===!0||e.getAttribute("aria-disabled")==="true"}function ch(e){const t=i0(e);if(!t||!x6.has(t))return;t==="mod+s"&&e.preventDefault();const n=e.target?.ownerDocument??document,a=mp(t,c0(n));if(!a||(e.preventDefault(),e.stopPropagation(),e.repeat||f0(a)))return;const r=dh(n),l=r instanceof HTMLElement&&r!==a&&r!==n.body?r:null;l&&(a.focus({preventScroll:!0}),dh(n)===l&&l.blur()),a.click();const o=n.activeElement;l?.isConnected&&(o===a||o===n.body||o===null)&&l.focus({preventScroll:!0})}function dh(e=document){let t=e.activeElement;for(;t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function fh(e){const t=i0(e);if(t!=="escape"&&t!=="/"&&t!=="?"||e.defaultPrevented||w6($6(e)))return;const n=e.target?.ownerDocument??document;if(n.querySelector("[data-dismissable-layer]"))return;if(t==="?"){e.preventDefault(),E6();return}const a=mp(t,n);!a||f0(a)||(e.preventDefault(),a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement?(a.focus(),a.select()):a.click())}let ei=0;function A6(){ei===0&&(window.addEventListener("keydown",ch,!0),window.addEventListener("keydown",fh)),ei++;let e=!1;return()=>{e||(e=!0,ei--,ei===0&&(window.removeEventListener("keydown",ch,!0),window.removeEventListener("keydown",fh)))}}const T6={class:"flex items-start gap-3"},D6={class:"flex min-w-0 flex-1 flex-col gap-1"},O6={class:"flex flex-col gap-2.5"},M6=["data-shortcut"],I6={class:"flex shrink-0 items-center gap-1"},P6={class:"text-right text-muted"},R6=le({__name:"ShortcutHelpDialog",setup(e){function t(n){n||d0()}return(n,a)=>(p(),U(s(Dr),{open:s(uh)!==null,"onUpdate:open":t},{default:F(()=>[L(s(vl),null,{default:F(()=>[L(s(Mr),{"data-dialog-overlay":"",class:"fixed inset-0 z-40 bg-overlay"}),L(s(Or),{"data-shortcut-help":"","data-dialog-content":"","aria-modal":"true",class:"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100vh-32px)] w-[calc(100%-32px)] max-w-[440px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-y-auto rounded-modal bg-surface p-6 text-text shadow-pop"},{default:F(()=>[b("div",T6,[b("div",D6,[L(s(Ir),{class:"text-[20px] font-bold tracking-[-0.01em]"},{default:F(()=>[ye($(s(h)("backend::lang.shortcuts.title")),1)]),_:1}),L(s(xr),{class:"text-muted"},{default:F(()=>[ye($(s(h)("backend::lang.shortcuts.description")),1)]),_:1})]),L(s(_r),{"data-action":"close","aria-label":s(h)("backend::lang.form.close"),class:"flex size-[34px] shrink-0 items-center justify-center rounded-tab bg-subtle text-muted hover:bg-hover hover:text-text"},{default:F(()=>[L(s(Xt),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"])]),b("dl",O6,[(p(!0),g(ve,null,Me(s(uh)??[],r=>(p(),g("div",{key:r.combo,"data-shortcut":r.combo,class:"flex items-center justify-between gap-4"},[b("dt",I6,[(p(!0),g(ve,null,Me(s(u0)(r.combo),l=>(p(),g("kbd",{key:l,class:"inline-flex min-w-6 items-center justify-center rounded-pager border border-border bg-subtle px-1.5 font-mono text-[13px]"},$(l),1))),128))]),b("dd",P6,$(s(h)(r.labelKey)),1)],8,M6))),128))])]),_:1})]),_:1})]),_:1},8,["open"]))}}),q6={class:"flex min-w-0 flex-1 flex-col"},L6={class:"flex h-header shrink-0 items-center justify-between gap-4 border-b border-border bg-surface pr-6 pl-8"},N6={class:"flex shrink-0 items-center gap-1"},B6=["title","aria-label"],F6={class:"min-w-0 flex-1 px-8 py-7"},V6=le({__name:"AppShell",setup(e){const t=yn(),{collapsed:n,watchViewport:a}=wb(),r=a();Et(r);const l=A6();Et(()=>{l(),d0()});const o=`${window.location.origin}/`,i=_(()=>ws(String(t.params.vendor??""),String(t.params.plugin??""))),u=_(()=>i.value?null:t.name==="settings-form"?vc(os(String(t.params.code??""))):t.name==="plugins"?vc(Kg(t.path)):vc(wu(ro(t.path)))),d=_(()=>(i.value||u.value)&&!n.value?"calc(var(--spacing-rail) + var(--spacing-panel))":"var(--spacing-rail)");return(c,f)=>(p(),g("div",{class:"flex min-h-screen bg-bg text-text",style:cn({"--shell-offset":d.value})},[L(nE),i.value&&!s(n)?(p(),U(sE,{key:0,entry:i.value},null,8,["entry"])):u.value&&!s(n)?(p(),U(fE,{key:1,section:u.value},null,8,["section"])):G("",!0),b("div",q6,[b("header",L6,[L(hE),b("div",N6,[b("a",{"data-view-site":"",href:o,target:"_blank",rel:"noopener noreferrer",title:s(h)("backend::lang.nav.view_site"),"aria-label":s(h)("backend::lang.nav.view_site"),class:"flex size-input items-center justify-center rounded-inner text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text"},[L(s(tb),{class:"size-[18px]","aria-hidden":"true"})],8,B6),L(m6)])]),b("main",F6,[we(c.$slots,"default")])]),L(b6),L(R6)],4))}}),z6=300*1e3,j6=30*1e3;function U6(e,t){return e!==""&&t!==""&&e!==t}async function H6(){try{const e=await globalThis.fetch(`${cl.base}/build.json`,{cache:"no-store",credentials:"same-origin"});if(!e.ok)return"";const t=await e.json();if(typeof t!="object"||t===null)return"";const n=t.build;return typeof n=="string"?n:""}catch{return""}}const yp=A(!1);let p0="",v0="";const K6=Ct(yp);function W6(e,t=cl.build){U6(t,e)&&e!==v0&&(p0=e,yp.value=!0)}function G6(){v0=p0,yp.value=!1}function Y6(e={}){const t=e.booted??cl.build;if(t==="")return()=>{};const n=e.check??H6,a=e.interval??z6,r=e.minGap??j6,l=e.win??window,o=e.doc??document,i=e.now??Date.now;let u=!1,d=Number.NEGATIVE_INFINITY;const c=async()=>{if(!(o.visibilityState==="hidden"||u||i()-d{c().catch(()=>{})};o.addEventListener("visibilitychange",f),l.addEventListener("focus",f);const m=l.setInterval(f,a);return()=>{o.removeEventListener("visibilitychange",f),l.removeEventListener("focus",f),l.clearInterval(m)}}const J6={key:0,"data-update-banner":"",role:"status","aria-live":"polite",class:"fixed right-4 bottom-[88px] z-50 flex max-w-[420px] items-center gap-3 rounded-[14px] bg-[#1d2740] py-3 pr-2.5 pl-3.5 text-white shadow-toast"},Z6={class:"font-medium"},X6=["aria-label"],Q6=le({__name:"UpdateBanner",setup(e){return(t,n)=>s(K6)?(p(),g("div",J6,[b("span",Z6,$(s(h)("backend::lang.version.available")),1),b("button",{type:"button","data-update-reload":"",class:"shrink-0 rounded-pager bg-accent px-3 py-1.5 font-medium text-on-accent transition-opacity duration-150 ease-out hover:opacity-90",onClick:n[0]||(n[0]=a=>s(_b).reload())},$(s(h)("backend::lang.version.reload")),1),b("button",{type:"button","data-update-close":"","aria-label":s(h)("backend::lang.form.close"),class:"flex size-8 shrink-0 items-center justify-center rounded-pager text-[#c3cbda] transition-colors duration-150 ease-out hover:bg-side-hover hover:text-white",onClick:n[1]||(n[1]=a=>s(G6)())},[L(s(Xt),{size:16,"aria-hidden":"true"})],8,X6)])):G("",!0)}}),m0=A(0),e8=Ct(m0);function t8(){m0.value++}const n8=le({__name:"App",setup(e){const t=yn(),n=_(()=>t.meta.shell===!0);return Sn(()=>{document.title=P2(t)}),(a,r)=>(p(),g(ve,null,[n.value?(p(),U(V6,{key:0},{default:F(()=>[L(s(xd),null,{default:F(({Component:l,route:o})=>[(p(),U(Kt(l),{key:`${o.path}#${s(e8)}`}))]),_:1})]),_:1})):(p(),U(s(xd),{key:1})),L(Q6)],64))}}),a8="data-summer-controller",h0="*",zc=new Map,Kd=new Map;let y0="";function g0(){return`${cl.base}/assets/`}function b0(e){if(!e.startsWith(g0())||e.includes("\\"))return!1;for(const n of e){const a=n.codePointAt(0)??0;if(a<=32||a===127)return!1}return!(e.split(/[?#]/,1)[0]??"").split("/").some(n=>{const a=n.toLowerCase().replaceAll("%2e",".");return a==="."||a===".."})}function _0(e){if(!b0(e))return Promise.reject(new Error(`plugin script outside ${g0()}: ${e}`));const t=zc.get(e);if(t)return t;const n=new Promise((a,r)=>{const l=document.createElement("script");l.type="module",l.addEventListener("load",()=>a(),{once:!0}),l.addEventListener("error",()=>{zc.delete(e),l.remove(),r(new Error(`plugin script failed to load: ${e}`))},{once:!0}),l.src=e,document.head.appendChild(l)});return zc.set(e,n),n}function x0(e,t){for(const n of t){const a=`${e} +${n}`;if(!b0(n)||Kd.has(a))continue;const r=document.createElement("link");r.rel="stylesheet",r.setAttribute(a8,e),r.disabled=!k0(e),r.href=n,Kd.set(a,{owner:e,link:r}),document.head.appendChild(r)}}function r8(e){y0=e;for(const{owner:t,link:n}of Kd.values())n.disabled=!k0(t)}function k0(e){return e===h0||e===y0}function l8(e){x0(h0,e)}async function gp(e,t){x0(e,t?.styles??[]);const n=t?.scripts??[],a=await Promise.allSettled(n.map(r=>_0(r)));return n.filter((r,l)=>a[l]?.status==="rejected")}const w0=new Map;async function $0(){let e=[];try{const{data:t,response:n}=await Re.GET("/field-types");e=n.ok&&t?t.data:[]}catch{return[]}for(const t of e){l8(t.styles??[]);const n=t.scripts??[];w0.set(t.element,Promise.allSettled(n.map(a=>_0(a))).then(a=>n.filter((r,l)=>a[l]?.status==="rejected")))}return e}function o8(e){return w0.get(e)??Promise.resolve([])}const s8={class:"flex min-h-screen items-center justify-center px-4",style:{background:"radial-gradient(ellipse at 50% 35%, #2b3a5c 0%, #1d2740 60%)"}},i8={class:"flex w-full max-w-[400px] flex-col gap-6"},u8={class:"flex items-center justify-center gap-3"},c8={class:"flex size-[34px] items-center justify-center rounded-full bg-accent-soft"},d8={class:"text-[22px] font-bold tracking-[-0.02em]"},f8={key:0,"data-login-hint":"",class:"text-[13px] text-[#566175]"},p8={class:"flex flex-col gap-1.5"},v8={class:"font-semibold"},m8={class:"flex flex-col gap-1.5"},h8={class:"font-semibold"},y8=["aria-invalid"],g8={key:1,role:"alert",class:"flex items-center gap-2.5 rounded-control bg-[#fdf0f0] px-3.5 py-3 text-[#c62828]"},b8=["disabled"],_8=le({__name:"LoginView",setup(e){const t=yn(),n=ha(),a=A(""),r=A(""),l=A(!1),o=A(!1),i=_(()=>{const d=Xd(t.query.redirect);return d!==null&&new URL(d,"http://admin.invalid").pathname==="/connect"});async function u(){if(!o.value){o.value=!0,l.value=!1;try{if(!await n6(a.value.trim(),r.value)||!await r0()){l.value=!0;return}r.value="",await Promise.all([Ug(),Hg().catch(()=>[]),$0()]),await n.replace(Xd(t.query.redirect)??"/")}finally{o.value=!1}}}return(d,c)=>(p(),g("main",s8,[b("div",i8,[b("div",u8,[b("span",c8,[L(s(Es),{size:20,class:"text-accent","aria-hidden":"true"})]),c[2]||(c[2]=b("span",{class:"text-[18px] font-bold text-white"},[ye("Summer"),b("span",{class:"text-accent"},"CMS")],-1))]),b("form",{class:"flex flex-col gap-[18px] rounded-card bg-white p-8 text-[#141b2d] shadow-login",novalidate:"",onSubmit:mt(u,["prevent"])},[b("h1",d8,$(s(h)("backend::lang.auth.title")),1),i.value?(p(),g("p",f8,$(s(h)("backend::lang.mcp_connect.login_hint")),1)):G("",!0),b("label",p8,[b("span",v8,$(s(h)("backend::lang.auth.login")),1),Rn(b("input",{"onUpdate:modelValue":c[0]||(c[0]=f=>a.value=f),name:"login",type:"text",autocomplete:"username",required:"",class:"h-input rounded-control border border-[#d2d8e2] bg-white px-3.5"},null,512),[[al,a.value]])]),b("label",m8,[b("span",h8,$(s(h)("backend::lang.auth.password")),1),Rn(b("input",{"onUpdate:modelValue":c[1]||(c[1]=f=>r.value=f),name:"password",type:"password",autocomplete:"current-password",required:"","aria-invalid":l.value?"true":void 0,class:pe([l.value?"border-[#c62828]":"border-[#d2d8e2]","h-input rounded-control border bg-white px-3.5"])},null,10,y8),[[al,r.value]])]),l.value?(p(),g("div",g8,[L(s(ht),{size:18,"aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.auth.invalid")),1)])):G("",!0),b("button",{type:"submit",disabled:o.value,class:"h-input rounded-control bg-[#22304d] font-semibold text-white disabled:opacity-60"},$(s(h)("backend::lang.auth.submit")),9,b8)],32)])]))}}),ph=/^\d+$/;function C0(e,t,n){const a=xu(t),r=Kn(t);if(!a||!r)return"/";const o=((e??"").trim().split(/[?#]/,1)[0]??"").split("/").filter(c=>c!==""),i=[a.vendor,a.plugin,a.controller];if(!i.every((c,f)=>o[f]?.toLowerCase()===c.toLowerCase()))return r;const d=o.slice(i.length);if(d.length===0)return r;if(d.length===1&&d[0]==="create")return`${r}/create`;if(d.length===2&&d[0]==="update"){const c=d[1]===":id"?String(n??""):d[1]??"";return ph.test(c)?`${r}/${c}`:r}if(d.length===2&&d[0]==="preview"){const c=d[1]===":id"?String(n??""):d[1]??"";return ph.test(c)?`${r}/${c}/preview`:r}return r}const vh=/^[0-9]+$/;function x8(e,t){const n=e.replace(/[\s ]/g,"");if(n==="")return{value:null,error:null};let a=n,r=!1;a.startsWith("-")&&(r=!0,a=a.slice(1));const l=a.match(/[.,]/g)??[];if(l.length>1)return{value:null,error:"invalid"};const[o,i=""]=a.split(/[.,]/);if(!vh.test(o??"")||l.length===1&&!vh.test(i))return{value:null,error:"invalid"};if(i.replace(/0+$/,"").length>t)return{value:null,error:"too_precise"};const u=i===""?o:`${o}.${i}`;return{value:`${r?"-":""}${u}`,error:null}}function k8(e){const[t,n]=e.split(".");if(n===void 0||n.length<=2)return e;let a=n.length;for(;a>2&&n.charAt(a-1)==="0";)a-=1;return`${t}.${n.slice(0,a)}`}function w8(e){return new Intl.NumberFormat(e).formatToParts(1.1).find(n=>n.type==="decimal")?.value??"."}function S0(e,t,n,a=4){const r={minimumFractionDigits:2,maximumFractionDigits:Math.max(2,a)},l=t===""?{style:"decimal",...r}:{style:"currency",currency:t,currencyDisplay:"code",...r};let o;try{o=new Intl.NumberFormat(n,l)}catch{return`${new Intl.NumberFormat(n,{style:"decimal",...r}).format(e)} ${t}`.trim()}return o.format(e)}const $8={key:0,"data-switch":"true",class:"inline-flex h-6 items-center gap-1 rounded-pill bg-ok-bg px-2.5 text-[12px] font-semibold text-ok-text"},C8={key:1,"data-switch":"false",class:"inline-flex h-6 items-center rounded-pill border border-border-strong px-2.5 text-[12px] font-semibold text-muted"},S8={key:1,class:"text-muted","data-empty":""},E8={key:2,class:"text-[13px] text-muted tabular-nums"},A8={key:3,"data-money":"",class:"tabular-nums whitespace-nowrap"},El=le({__name:"CellValue",props:{column:{},value:{},row:{}},setup(e){const t=e;function n(v){return v==null||v===""}function a(v){return n(v)?"":Array.isArray(v)?v.map(a).filter(y=>y!=="").join(", "):typeof v=="boolean"?h(v?"backend::lang.list.column_switch_true":"backend::lang.list.column_switch_false"):typeof v=="object"?"":String(v)}function r(v){return String(v).padStart(2,"0")}function l(v){if(typeof v!="string"&&typeof v!="number")return"";const y=new Date(v);return Number.isNaN(y.getTime())?String(v):`${y.getFullYear()}-${r(y.getMonth()+1)}-${r(y.getDate())} ${r(y.getHours())}:${r(y.getMinutes())}`}function o(v){if(typeof v!="string")return"";const y=/^\d{4}-\d{2}-\d{2}/.exec(v.trim());return y?y[0]:v.trim()}function i(v){if(typeof v!="string")return"";const y=/(\d{2}):(\d{2})/.exec(v);return y?`${y[1]}:${y[2]}`:v.trim()}function u(v){return typeof v=="string"?v!==""&&v!=="0"&&v.toLowerCase()!=="false":!!v}function d(){if(t.column.currencyFrom){const v=t.row?.[t.column.currencyFrom];return typeof v=="string"?v.trim():""}return t.column.currency??""}function c(v){return typeof v!="string"||v.trim()===""?"":S0(v.trim(),d(),Wn.value,4)}const f=_(()=>t.column.type==="switch"?"switch":t.column.type==="money"?"money":t.column.type==="datetime"?"datetime":t.column.type==="date"?"date":t.column.type==="time"?"time":"text"),m=_(()=>{switch(f.value){case"datetime":return l(t.value);case"date":return o(t.value);case"time":return i(t.value);case"money":return c(t.value);default:return a(t.value)}});return(v,y)=>f.value==="switch"&&!n(e.value)?(p(),g(ve,{key:0},[u(e.value)?(p(),g("span",$8,[L(s(Yg),{size:14,"aria-hidden":"true"}),ye($(s(h)("backend::lang.list.column_switch_true")),1)])):(p(),g("span",C8,$(s(h)("backend::lang.list.column_switch_false")),1))],64)):m.value===""?(p(),g("span",S8,"—")):f.value==="datetime"||f.value==="date"||f.value==="time"?(p(),g("span",E8,$(m.value),1)):f.value==="money"?(p(),g("span",A8,$(m.value),1)):(p(),g(ve,{key:4},[ye($(m.value),1)],64))}}),T8={key:0,class:"flex shrink-0 gap-2"},D8=["data-row-state"],O8=le({__name:"RowStateBadges",props:{states:{},labels:{}},setup(e){const t=e,n={deleted:"border border-border-strong text-muted",negative:"bg-danger-soft text-danger",disabled:"bg-subtle text-muted",customized:"border border-border-strong text-text",outdated:"bg-sel text-text"},a=["deleted","negative","disabled","customized","outdated"],r=_(()=>a.filter(l=>t.states.includes(l)));return(l,o)=>r.value.length>0?(p(),g("span",T8,[(p(!0),g(ve,null,Me(r.value,i=>(p(),g("span",{key:i,"data-row-state":i,class:pe([n[i],"inline-flex h-6 shrink-0 items-center rounded-pill px-2.5 text-[12px] font-semibold whitespace-nowrap"])},$(e.labels[i]??i),11,D8))),128))])):G("",!0)}}),M8={class:"overflow-x-auto"},I8={class:"sticky top-0 z-10"},P8={class:"h-row-head border-y border-border bg-subtle"},R8={key:0,scope:"col","data-select":"",class:"w-[52px] pl-5"},q8=["aria-checked","aria-label","disabled"],L8=["aria-sort"],N8=["data-sort","onClick"],B8={key:1,class:"w-[56px] pr-5"},F8=["aria-busy"],V8={key:0,class:"pl-5"},z8={key:1,class:"pr-5"},j8={key:1},U8=["colspan"],H8={class:"text-muted"},K8=["aria-selected","data-row-states","onClick"],W8={key:0,"data-select":"",class:"pl-5"},G8=["aria-checked","aria-label","onClick"],Y8={key:0,class:"flex items-center gap-3"},J8={"data-avatar":"",class:"flex size-[30px] shrink-0 items-center justify-center rounded-full bg-subtle text-[12px] font-bold text-text","aria-hidden":"true"},Z8=["onClick"],X8={key:1,class:"flex items-center gap-2"},Q8={key:1,"data-trailing":"",class:"w-[56px] pr-5"},E0=le({__name:"DataTable",props:{columns:{},rows:{},loading:{type:Boolean,default:!1},rowLink:{type:Function,default:void 0},selectable:{type:Boolean,default:!1},selected:{default:()=>[]},sortable:{type:Boolean,default:!1},sort:{default:null},variant:{default:"list"},openable:{type:Boolean,default:!1},trailing:{type:Boolean,default:!1},rowStates:{default:()=>({})},stateLabels:{default:()=>({})}},emits:["update:selected","sort","open"],setup(e,{emit:t}){const n=e,a=t,r=ha();function l(X){const W=X.id;return typeof W=="number"||typeof W=="string"?W:null}function o(X,W){const K=l(X);return K===null?`row-${W}`:String(K)}function i(X){return n.rowLink?n.rowLink(X):null}function u(X,W){if(X.target?.closest("a, button, input, label, select"))return;if(n.openable){const se=X.currentTarget?.querySelector("[data-row-open]")??null;a("open",W,se);return}const ae=i(W);ae&&r.push(ae)}const d=_(()=>n.rows.map(l).filter(X=>X!==null)),c=_(()=>new Set(n.selected.map(String))),f=_(()=>{const X=d.value,W=X.filter(K=>c.value.has(String(K))).length;return W===0?"false":W===X.length?"true":"mixed"});function m(X){const W=l(X);return W!==null&&c.value.has(String(W))}function v(){a("update:selected",f.value==="true"?[]:[...d.value])}function y(X){const W=l(X);W!==null&&(c.value.has(String(W))?a("update:selected",n.selected.filter(K=>String(K)!==String(W))):a("update:selected",[...n.selected,W]))}function x(X){if(n.sort?.column===X.key)return n.sort.dir==="desc"?"descending":"ascending"}function C(X){return n.sortable&&X.sortable}const k=_(()=>n.variant==="relation"),E=_(()=>k.value?"h-[56px]":"h-row"),B=_(()=>k.value?3:8);function O(X){return(typeof X=="string"||typeof X=="number"?String(X):"").split(/[\s@._-]+/).filter(Boolean).slice(0,2).map(K=>K.charAt(0).toUpperCase()).join("")}const T=["deleted","negative","disabled","customized","outdated"];function P(X){const W=l(X),K=W===null?void 0:n.rowStates[String(W)];return Array.isArray(K)?T.filter(ae=>K.includes(ae)):[]}function R(X,W,K=[]){const ae=K.includes("deleted")||K.includes("disabled"),se=H(X);return W===0?[ae?"font-semibold text-muted":"font-semibold",se].filter(Boolean).join(" "):[ae||k.value||X.relation?"text-muted":"",se].filter(Boolean).join(" ")}function H(X){return X.type==="money"?"text-right":""}function S(X){return["min-w-0 truncate",X.includes("deleted")?"line-through":"no-underline",X.includes("negative")?"text-danger":X.includes("deleted")||X.includes("disabled")?"text-muted":"text-text"]}const I=_(()=>n.columns.filter(X=>!X.invisible)),z=_(()=>Math.max(I.value.length+(n.selectable?1:0)+(n.trailing?1:0),1));function D(X,W){a("open",W,X.currentTarget)}const N=["w-3/5","w-2/5","w-1/2","w-3/4","w-1/3","w-2/3","w-1/2","w-2/5"];return(X,W)=>(p(),g("div",M8,[b("table",{class:pe([k.value?"min-w-[480px]":"min-w-[640px]","w-full border-collapse text-left"])},[b("thead",I8,[b("tr",P8,[e.selectable?(p(),g("th",R8,[b("button",{type:"button",role:"checkbox","aria-checked":f.value,"aria-label":s(h)("backend::lang.list.select_all"),disabled:e.loading||d.value.length===0,class:pe([f.value==="false"?"border-border-strong bg-surface":"border-primary bg-primary text-on-primary","flex size-[18px] items-center justify-center rounded-checkbox border disabled:opacity-60"]),onClick:v},[f.value==="mixed"?(p(),U(s(ib),{key:0,size:14,"aria-hidden":"true"})):f.value==="true"?(p(),U(s(Ln),{key:1,size:14,"aria-hidden":"true"})):G("",!0)],10,q8)])):G("",!0),(p(!0),g(ve,null,Me(I.value,K=>(p(),g("th",{key:K.key,scope:"col","aria-sort":C(K)?x(K)??"none":void 0,class:pe([[x(K)?"text-text":"text-muted",H(K)],"px-3.5 text-[12px] font-semibold first:pl-5 last:pr-5"])},[C(K)?(p(),g("button",{key:0,type:"button","data-sort":K.key,class:"inline-flex items-center gap-1 font-semibold",onClick:ae=>a("sort",K.key)},[ye($(K.label)+" ",1),x(K)==="ascending"?(p(),U(s(Jg),{key:0,size:14,"aria-hidden":"true"})):x(K)==="descending"?(p(),U(s(Wg),{key:1,size:14,"aria-hidden":"true"})):G("",!0)],8,N8)):(p(),g(ve,{key:1},[ye($(K.label),1)],64))],10,L8))),128)),e.trailing?(p(),g("td",B8)):G("",!0)])]),b("tbody",{"aria-busy":e.loading?"true":void 0},[e.loading?(p(!0),g(ve,{key:0},Me(B.value,K=>(p(),g("tr",{key:`skeleton-${K}`,"data-skeleton":"",class:pe([E.value,"border-b border-border"])},[e.selectable?(p(),g("td",V8,[...W[0]||(W[0]=[b("span",{class:"block size-[18px] rounded-checkbox bg-skel"},null,-1)])])):G("",!0),(p(!0),g(ve,null,Me(I.value,ae=>(p(),g("td",{key:ae.key,class:"px-3.5 first:pl-5 last:pr-5"},[b("span",{class:pe([N[(K-1)%N.length],"block h-3 rounded-[6px] bg-skel"])},null,2)]))),128)),e.trailing?(p(),g("td",z8)):G("",!0)],2))),128)):e.rows.length===0?(p(),g("tr",j8,[b("td",{colspan:z.value,class:"px-5 py-20 text-center"},[we(X.$slots,"empty",{},()=>[b("span",H8,$(s(h)("backend::lang.list.no_records")),1)])],8,U8)])):(p(!0),g(ve,{key:2},Me(e.rows,(K,ae)=>(p(),g("tr",{key:o(K,ae),class:pe([[E.value,m(K)?"bg-sel":i(K)||e.openable?"hover:bg-hover":"",i(K)||e.openable?"cursor-pointer":""],"border-b border-border transition-colors duration-150 ease-out"]),"aria-selected":e.selectable?m(K)?"true":"false":void 0,"data-row-states":P(K).length>0?P(K).join(" "):void 0,onClick:se=>u(se,K)},[e.selectable?(p(),g("td",W8,[b("button",{type:"button",role:"checkbox","aria-checked":m(K)?"true":"false","aria-label":s(h)("backend::lang.list.select_row"),class:pe([m(K)?"border-primary bg-primary text-on-primary":"border-border-strong bg-surface","flex size-[18px] items-center justify-center rounded-checkbox border"]),onClick:se=>y(K)},[m(K)?(p(),U(s(Ln),{key:0,size:14,"aria-hidden":"true"})):G("",!0)],10,G8)])):G("",!0),(p(!0),g(ve,null,Me(I.value,(se,he)=>(p(),g("td",{key:se.key,class:pe([R(se,he,P(K)),"px-3.5 first:pl-5 last:pr-5"])},[k.value&&he===0?(p(),g("span",Y8,[b("span",J8,$(O(K[se.key])),1),e.openable?(p(),g("button",{key:0,type:"button","data-row-open":"",class:"min-w-0 truncate text-left font-semibold text-text",onClick:ge=>D(ge,K)},[L(El,{column:se,value:K[se.key],row:K},null,8,["column","value","row"])],8,Z8)):(p(),U(El,{key:1,column:se,value:K[se.key],row:K},null,8,["column","value","row"]))])):he===0&&P(K).length>0?(p(),g("span",X8,[i(K)?(p(),U(s(qn),{key:0,to:i(K),class:pe(S(P(K)))},{default:F(()=>[L(El,{column:se,value:K[se.key],row:K},null,8,["column","value","row"])]),_:2},1032,["to","class"])):(p(),g("span",{key:1,class:pe(S(P(K)))},[L(El,{column:se,value:K[se.key],row:K},null,8,["column","value","row"])],2)),L(O8,{states:P(K),labels:e.stateLabels},null,8,["states","labels"])])):he===0&&i(K)?(p(),U(s(qn),{key:2,to:i(K),class:"text-text no-underline"},{default:F(()=>[L(El,{column:se,value:K[se.key],row:K},null,8,["column","value","row"])]),_:2},1032,["to"])):(p(),U(El,{key:3,column:se,value:K[se.key],row:K},null,8,["column","value","row"]))],2))),128)),e.trailing?(p(),g("td",Q8,[we(X.$slots,"trailing",{row:K})])):G("",!0)],10,K8))),128))],8,F8)],2)]))}}),eI=["aria-label"],tI={key:0,class:"flex flex-col gap-1 text-[13px]"},nI={class:"font-semibold text-muted"},aI=["data-filter","value","onChange"],rI=["value"],lI={key:1,class:"flex flex-col gap-1 text-[13px]"},oI={class:"mb-1 font-semibold text-muted"},sI={class:"flex items-center gap-2"},iI=["data-filter","aria-label","value","onChange"],uI=["data-filter","aria-label","value","onChange"],cI={key:2,class:"flex flex-col gap-1 text-[13px]"},dI={class:"font-semibold text-muted"},fI=["data-filter","value","onChange"],pI=["value"],Co="",ti="h-button rounded-control border border-border-strong bg-surface px-3 text-text",vI=le({__name:"FilterBar",props:{filters:{},values:{},source:{}},emits:["update"],setup(e,{emit:t}){const n=e,a=t;function r(f){if(f.options&&f.options.length>0)return f.options.map(v=>({value:JSON.stringify(v.value),label:v.label}));const m=[];return f.trueValue!==void 0&&m.push({value:JSON.stringify(f.trueValue),label:h("backend::lang.list.column_switch_true")}),f.falseValue!==void 0&&m.push({value:JSON.stringify(f.falseValue),label:h("backend::lang.list.column_switch_false")}),m}const l=A({});async function o(f){const{data:m}=await Re.GET("/{vendor}/{plugin}/{controller}/filters/{scope}/options",{params:{path:{...n.source,scope:f.name}}});l.value={...l.value,[f.name]:m?.data??[]}}xt(()=>{for(const f of n.filters)f.type==="scope"&&o(f)});const i=zn({});function u(){for(const f of n.filters){if(f.type!=="daterange")continue;const[m="",v=""]=(n.values[f.name]??"").split(".."),y=i[f.name];(!y||n.values[f.name]!==void 0||y.from!==""&&y.to!=="")&&(i[f.name]={from:m,to:v})}}Ne(()=>n.values,u,{immediate:!0,deep:!0});function d(f,m,v){const y={...i[f.name]??{from:"",to:""},[m]:v};i[f.name]=y,y.from!==""&&y.to!==""?a("update",f.name,`${y.from}..${y.to}`):(y.from===""&&y.to===""||n.values[f.name]!==void 0)&&a("update",f.name,null)}function c(f,m){a("update",f.name,m===Co?null:m)}return(f,m)=>(p(),g("div",{role:"group","aria-label":s(h)("backend::lang.list.filters"),"data-filter-bar":"",class:"flex flex-wrap items-end gap-4 border-t border-border px-5 py-3.5"},[(p(!0),g(ve,null,Me(e.filters,v=>(p(),g(ve,{key:v.name},[v.type==="switch"?(p(),g("label",tI,[b("span",nI,$(v.label||v.name),1),b("select",{"data-filter":v.name,value:e.values[v.name]??Co,class:pe(ti),onChange:y=>c(v,y.target.value)},[b("option",{value:Co},$(s(h)("backend::lang.list.filter_all")),1),(p(!0),g(ve,null,Me(r(v),y=>(p(),g("option",{key:y.value,value:y.value},$(y.label),9,rI))),128))],40,aI)])):v.type==="daterange"?(p(),g("fieldset",lI,[b("legend",oI,$(v.label||v.name),1),b("div",sI,[b("input",{type:"date","data-filter":`${v.name}-from`,"aria-label":s(h)("backend::lang.list.filter_from"),value:i[v.name]?.from??"",class:pe(ti),onChange:y=>d(v,"from",y.target.value)},null,40,iI),m[0]||(m[0]=b("span",{"aria-hidden":"true"},"–",-1)),b("input",{type:"date","data-filter":`${v.name}-to`,"aria-label":s(h)("backend::lang.list.filter_to"),value:i[v.name]?.to??"",class:pe(ti),onChange:y=>d(v,"to",y.target.value)},null,40,uI)])])):v.type==="scope"?(p(),g("label",cI,[b("span",dI,$(v.label||v.name),1),(p(),g("select",{key:`${v.name}-${l.value[v.name]?.length??-1}`,"data-filter":v.name,value:e.values[v.name]??Co,class:pe(ti),onChange:y=>c(v,y.target.value)},[b("option",{value:Co},$(s(h)("backend::lang.list.filter_all")),1),(p(!0),g(ve,null,Me(l.value[v.name]??[],y=>(p(),g("option",{key:y.value,value:y.value},$(y.label),9,pI))),128))],40,fI))])):G("",!0)],64))),128))],8,eI))}}),mI=["type","disabled","data-hotkey","aria-keyshortcuts"],Ue=le({__name:"Button",props:{variant:{default:"outline"},size:{default:"md"},type:{default:"button"},disabled:{type:Boolean,default:!1},icon:{default:void 0},to:{default:void 0},hotkey:{default:void 0}},setup(e){const t=e,n={primary:"bg-primary text-on-primary hover:opacity-90",outline:"border border-border-strong bg-surface text-text hover:bg-hover",ghost:"text-muted hover:bg-hover hover:text-text",danger:"border border-danger bg-surface text-danger hover:bg-danger-soft"},a=_(()=>t.hotkey?ju(t.hotkey):void 0),r=_(()=>["inline-flex shrink-0 items-center justify-center gap-2 rounded-control px-4 font-semibold whitespace-nowrap no-underline transition-colors duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-60",t.size==="sm"?"h-[38px]":"h-button",n[t.variant]]);return(l,o)=>e.to!==void 0?(p(),U(s(qn),{key:0,to:e.to,class:pe(r.value),"data-hotkey":e.hotkey,"aria-keyshortcuts":a.value},{default:F(()=>[e.icon?(p(),U(Kt(e.icon),{key:0,size:16,"aria-hidden":"true"})):G("",!0),we(l.$slots,"default")]),_:3},8,["to","class","data-hotkey","aria-keyshortcuts"])):(p(),g("button",{key:1,type:e.type,disabled:e.disabled,class:pe(r.value),"data-hotkey":e.hotkey,"aria-keyshortcuts":a.value},[e.icon?(p(),U(Kt(e.icon),{key:0,size:16,"aria-hidden":"true"})):G("",!0),we(l.$slots,"default")],10,mI))}}),hI=le({__name:"BulkActionsMenu",props:{actions:{},disabled:{type:Boolean}},emits:["select"],setup(e,{expose:t,emit:n}){const a=n,r=A(null);function l(){const o=r.value?.$el;o instanceof HTMLElement&&o.focus()}return t({focus:l}),(o,i)=>(p(),U(s(j1),{modal:!1},{default:F(()=>[L(s(K1),{"as-child":"",disabled:e.disabled},{default:F(()=>[L(Ue,{ref_key:"trigger",ref:r,variant:"outline",size:"md","data-action":"bulk-actions",disabled:e.disabled},{default:F(()=>[ye($(s(h)("backend::lang.list.bulk_actions"))+" ",1),L(s(yr),{size:16,class:"text-muted","aria-hidden":"true"})]),_:1},8,["disabled"])]),_:1},8,["disabled"]),L(s(H1),null,{default:F(()=>[L(s(U1),{"data-bulk-menu":"",align:"end","side-offset":8,class:"z-50 flex w-[240px] max-w-[320px] flex-col rounded-[14px] border border-border bg-surface p-2 text-text shadow-menu"},{default:F(()=>[(p(!0),g(ve,null,Me(e.actions,u=>(p(),U(s(zd),{key:u.name,"data-bulk-action":u.name,class:"flex min-h-10 cursor-pointer items-center rounded-control px-3 py-2 outline-none transition-colors duration-150 ease-out data-[highlighted]:bg-hover",onSelect:d=>a("select",u.name)},{default:F(()=>[ye($(u.label),1)]),_:2},1032,["data-bulk-action","onSelect"]))),128))]),_:1})]),_:1})]),_:1}))}}),yI={class:"flex flex-wrap items-center justify-between gap-3 px-5 py-4"},gI={key:0,class:"relative block w-[320px] max-w-full"},bI={class:"sr-only"},_I=["value","placeholder"],xI={key:1},kI={class:"flex flex-wrap items-center justify-end gap-2.5"},wI={key:0,"data-selected-pill":"",class:"inline-flex h-8 items-center gap-1.5 rounded-pill bg-sel px-3 text-[13px] font-semibold"},$I=le({__name:"ListToolbar",props:{showSearch:{type:Boolean},search:{},searchPrompt:{},buttons:{},selectedCount:{},selectedLabel:{},deleteLabel:{},actions:{default:()=>[]},busyAction:{default:null},bulkActions:{default:()=>[]},bulkBusy:{type:Boolean,default:!1}},emits:["update:search","delete","action","bulk"],setup(e,{expose:t,emit:n}){const a=e,r=n,l=_(()=>new Map(a.actions.map(u=>[u.name,u.label]))),o=A(null);function i(){o.value?.focus()}return t({focusBulk:i}),(u,d)=>(p(),g("div",yI,[e.showSearch?(p(),g("label",gI,[b("span",bI,$(s(h)("backend::lang.list.search")),1),L(s(lo),{size:18,class:"pointer-events-none absolute top-1/2 left-3.5 -translate-y-1/2 text-muted","aria-hidden":"true"}),b("input",{type:"search","data-list-search":"","data-hotkey":"/","aria-keyshortcuts":"/",value:e.search,placeholder:e.searchPrompt,class:"h-button w-full rounded-control border border-transparent bg-subtle pr-3.5 pl-10",onInput:d[0]||(d[0]=c=>r("update:search",c.target.value))},null,40,_I)])):(p(),g("span",xI)),b("div",kI,[e.selectedCount>0?(p(),g("span",wI,[L(s(Ln),{size:14,"aria-hidden":"true"}),ye($(e.selectedLabel),1)])):G("",!0),e.bulkActions.length>0?(p(),U(hI,{key:1,ref_key:"bulkMenu",ref:o,actions:e.bulkActions,disabled:e.selectedCount===0||e.bulkBusy,onSelect:d[1]||(d[1]=c=>r("bulk",c))},null,8,["actions","disabled"])):G("",!0),(p(!0),g(ve,null,Me(e.buttons,c=>(p(),g(ve,{key:c},[c==="delete"?(p(),U(Ue,{key:0,"data-action":"delete",variant:e.selectedCount>0?"danger":"outline",icon:s(Tr),disabled:e.selectedCount===0,onClick:d[2]||(d[2]=f=>r("delete"))},{default:F(()=>[ye($(e.deleteLabel),1)]),_:1},8,["variant","icon","disabled"])):l.value.has(c)?(p(),U(Ue,{key:1,variant:"outline",size:"md","data-action":c,disabled:e.busyAction===c,"aria-busy":e.busyAction===c?"true":void 0,onClick:f=>r("action",c)},{default:F(()=>[ye($(l.value.get(c)),1)]),_:2},1032,["data-action","disabled","aria-busy","onClick"])):G("",!0)],64))),128))])]))}}),CI={class:"flex flex-wrap items-center gap-x-6 gap-y-3 border-t border-border px-5 py-3.5 text-[13px] text-muted"},SI={"data-range":""},EI={key:0,class:"flex items-center gap-2"},AI=["value"],TI=["value"],DI=["aria-label"],OI=["disabled"],MI={key:0,"aria-hidden":"true",class:"px-1"},II=["data-page","aria-current","onClick"],PI=["disabled"],jc="inline-flex h-pager min-w-pager items-center justify-center gap-1 rounded-pager border border-border px-2.5 text-[13px] text-text disabled:cursor-not-allowed disabled:opacity-60 hover:bg-hover",A0=le({__name:"Pagination",props:{meta:{},loading:{type:Boolean},perPageOptions:{},perPage:{}},emits:["page","perPage"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>n.meta?.total??0),l=_(()=>n.meta?.page??1),o=_(()=>Math.max(n.meta?.last_page??1,1)),i=_(()=>{const c=n.meta;if(!c||c.total===0)return rl("backend::lang.list.results",0);const f=(c.page-1)*c.per_page+1,m=Math.min(c.page*c.per_page,c.total);return h("backend::lang.list.pagination_range",{from:f,to:m,total:c.total})}),u=_(()=>{const c=o.value,f=l.value,m=new Set([1,c,f-1,f,f+1].filter(x=>x>=1&&x<=c));f<=3&&[2,3].forEach(x=>x<=c&&m.add(x)),f>=c-2&&[c-1,c-2].forEach(x=>x>=1&&m.add(x));const v=[...m].sort((x,C)=>x-C),y=[];return v.forEach((x,C)=>{const k=v[C-1];k!==void 0&&x-k>1&&y.push(null),y.push(x)}),y});function d(c){const f=Number(c.target.value);Number.isFinite(f)&&f>0&&a("perPage",f)}return(c,f)=>(p(),g("footer",CI,[b("span",SI,$(e.loading?s(h)("backend::lang.list.loading"):i.value),1),e.perPageOptions.length>1?(p(),g("label",EI,[b("span",null,$(s(h)("backend::lang.list.records_per_page")),1),b("select",{"data-per-page":"",value:String(e.perPage),class:"h-pager rounded-pager border border-border-strong bg-surface px-2 text-text",onChange:d},[(p(!0),g(ve,null,Me(e.perPageOptions,m=>(p(),g("option",{key:m,value:String(m)},$(m),9,TI))),128))],40,AI)])):G("",!0),!e.loading&&r.value>0?(p(),g("nav",{key:1,"aria-label":s(h)("backend::lang.list.pagination"),class:"ml-auto flex items-center gap-1.5"},[b("button",{type:"button","data-page":"prev",class:pe(jc),disabled:l.value<=1,onClick:f[0]||(f[0]=m=>a("page",l.value-1))},[L(s($u),{size:14,"aria-hidden":"true"}),ye($(s(h)("backend::lang.list.prev_page")),1)],8,OI),(p(!0),g(ve,null,Me(u.value,(m,v)=>(p(),g(ve,{key:m??`gap-${v}`},[m===null?(p(),g("span",MI,"…")):(p(),g("button",{key:1,type:"button","data-page":m,"aria-current":m===l.value?"page":void 0,class:pe([jc,m===l.value?"border-transparent bg-sel font-bold":""]),onClick:y=>m!==l.value&&a("page",m)},$(m),11,II))],64))),128)),b("button",{type:"button","data-page":"next",class:pe(jc),disabled:l.value>=o.value,onClick:f[1]||(f[1]=m=>a("page",l.value+1))},[ye($(s(h)("backend::lang.list.next_page")),1),L(s(Cs),{size:14,"aria-hidden":"true"})],8,PI)],8,DI)):G("",!0)]))}}),RI={role:"alert","data-extension-failure":"",class:"flex min-h-input items-center rounded-control border-[1.5px] border-dashed border-border-strong bg-subtle px-3.5 py-2.5 text-[13px] text-muted"},qI={class:"flex min-w-0 items-start gap-2.5"},LI={class:"min-w-0 [overflow-wrap:anywhere]"},Uu=le({__name:"ExtensionFailure",props:{text:{}},setup(e){return(t,n)=>(p(),g("div",RI,[b("span",qI,[L(s(ht),{size:16,class:"mt-0.5 shrink-0 text-danger","aria-hidden":"true"}),b("span",LI,$(e.text),1)])]))}}),NI=new Set(["div","span","p","strong","em","b","i","u","s","small","mark","code","pre","br","hr","ul","ol","li","dl","dt","dd","h2","h3","h4","h5","h6","table","thead","tbody","tfoot","tr","th","td","caption","section","header","footer","figure","figcaption","blockquote","q","abbr","time","data","meter","progress","sup","sub","a","img"]),BI=new Set(["script","style","template","iframe","object","embed","noscript","textarea","title","xmp","svg","math","form","input","button","select","link","meta","base"]),FI=32,VI=2e3,zI=new Set(["class","title","lang","dir","role"]),jI={a:new Set(["href"]),img:new Set(["src","alt","width","height"]),td:new Set(["colspan","rowspan","scope"]),th:new Set(["colspan","rowspan","scope"]),time:new Set(["datetime"]),data:new Set(["value"]),meter:new Set(["value","min","max","low","high","optimum"]),progress:new Set(["value","max"])},UI=/^(aria|data)-[a-z0-9_-]+$/;function HI(e,t){if(e==="")return!1;for(const n of e){const a=n.codePointAt(0)??0;if(a<=32||a===127)return!1}return e.startsWith("#")?t:e.startsWith("/")?e.length===1||e[1]!=="/"&&e[1]!=="\\":!1}function KI(e,t,n){return zI.has(t)||jI[e]?.has(t)===!0||UI.test(t)?e==="a"&&t==="href"||e==="img"&&t==="src"?HI(n,e==="a"):!0:!1}function WI(e,t){const n={};for(const[a,r]of Object.entries(t??{})){const l=a.toLowerCase();typeof r=="string"&&KI(e,l,r)&&(n[l]=r)}return n}function Wd(e,t,n){const a=[];for(const r of e??[]){if(n.left<=0)break;if(r.tag===void 0||r.tag===""){typeof r.text=="string"&&r.text!==""&&(n.left-=1,a.push(r.text));continue}const l=r.tag.toLowerCase();if(BI.has(l))continue;if(!NI.has(l)){a.push(...Wd(r.children,t,n));continue}if(t+1>FI)continue;n.left-=1;const o=Wd(r.children,t+1,n);a.push(In(l,WI(l,r.attrs),o.length>0?o:void 0))}return a}function GI(e){return Wd(e,0,{left:VI})}const YI={key:1,"data-partial-loading":"","aria-busy":"true"},JI=["data-partial","aria-busy"],bp=le({__name:"PartialHost",props:{source:{},name:{},recordId:{default:null},variant:{},reloadKey:{default:0},hint:{type:Boolean,default:!1}},setup(e){const t=e,n=A(null),a=A(!1),r=A(!1);let l=0;const o=u=>GI(u.nodes);o.props=["nodes"];async function i(){const u=++l;r.value=!0;let d=null;try{d=(await Re.GET("/{vendor}/{plugin}/{controller}/partials/{name}",{params:{path:{...t.source,name:t.name},query:t.recordId!=null?{id:t.recordId}:void 0}})).data?.data.nodes??null}catch{d=null}u===l&&(r.value=!1,a.value=d===null,n.value=d)}return Ne(()=>t.reloadKey,()=>{i()}),i(),(u,d)=>a.value?(p(),U(Uu,{key:0,"data-partial-failed":"",text:s(h)("backend::lang.extension.partial_failed")},null,8,["text"])):n.value===null?(p(),g("div",YI,[b("div",{"data-partial-skeleton":"",class:pe([e.hint?"h-[68px] w-full rounded-inner":e.variant==="header"?"h-[80px] w-full rounded-card":"h-[44px] w-full rounded-control","bg-skel"]),"aria-hidden":"true"},null,2)])):n.value.length>0?(p(),g("div",{key:2,class:"summer-partial","data-partial":e.variant,"aria-busy":r.value?"true":void 0},[L(o,{nodes:n.value},null,8,["nodes"])],8,JI)):G("",!0)}}),ZI={key:0,class:"flex flex-col gap-1.5","data-confirm-prompt":""},XI=["for"],QI=["id","maxlength","placeholder","aria-describedby","disabled","value","onKeydown"],eP=["id"],tP={class:"flex gap-2.5"},nP=["disabled","aria-busy"],qr=le({__name:"ConfirmDialog",props:{open:{type:Boolean},message:{},title:{default:void 0},confirmLabel:{default:void 0},cancelLabel:{default:void 0},danger:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},prompt:{default:null},value:{default:""}},emits:["update:open","update:value","confirm","cancel"],setup(e,{emit:t}){const n=e,a=t,r=`confirm-${Ly()}`,l=A(null),o=_(()=>!!n.prompt&&n.value.trim()==="");function i(c){!c&&n.busy||(a("update:open",c),c||a("cancel"))}function u(){n.busy||o.value||(a("confirm"),a("update:open",!1))}function d(c){a("update:value",c.target.value)}return Ne(()=>n.open&&!!n.prompt,async c=>{c&&(await He(),l.value?.focus())}),(c,f)=>(p(),U(s(z4),{open:e.open,"onUpdate:open":i},{default:F(()=>[L(s(F4),null,{default:F(()=>[L(s(N4),{class:"pointer-events-auto fixed inset-0 z-[80] bg-overlay"}),L(s(M4),{"data-confirm-dialog":"",class:"pointer-events-auto fixed top-1/2 left-1/2 z-[90] flex w-[calc(100%-32px)] max-w-[440px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 rounded-modal bg-surface p-6 text-text shadow-pop"},{default:F(()=>[L(s(U4),{class:"text-[20px] font-bold tracking-[-0.01em]"},{default:F(()=>[ye($(e.title??s(h)("backend::lang.form.confirm")),1)]),_:1}),L(s(q4),{class:"text-muted [overflow-wrap:anywhere]"},{default:F(()=>[ye($(e.message),1)]),_:1}),e.prompt?(p(),g("div",ZI,[b("label",{for:`${r}-value`,class:"text-[13px] font-semibold"},$(e.prompt.label),9,XI),b("input",{id:`${r}-value`,ref_key:"promptInput",ref:l,type:"text",autocomplete:"off",maxlength:e.prompt.maxLength,placeholder:e.prompt.placeholder,"aria-describedby":e.prompt.comment?`${r}-comment`:void 0,disabled:e.busy,value:e.value,class:"h-control w-full rounded-control border border-border-strong bg-surface px-3 text-text outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-60",onInput:d,onKeydown:da(mt(u,["prevent"]),["enter"])},null,40,QI),e.prompt.comment?(p(),g("p",{key:0,id:`${r}-comment`,class:"text-[13px] text-muted"},$(e.prompt.comment),9,eP)):G("",!0)])):G("",!0),b("div",tP,[L(s(P4),{"data-action":"cancel",disabled:e.busy,class:"inline-flex h-button flex-1 items-center justify-center rounded-control border border-border-strong bg-surface font-semibold hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60"},{default:F(()=>[ye($(e.cancelLabel??s(h)("backend::lang.form.cancel")),1)]),_:1},8,["disabled"]),b("button",{type:"button","data-action":"confirm",disabled:e.busy||o.value,"aria-busy":e.busy?"true":void 0,class:pe([e.danger?"bg-danger text-white":"bg-primary text-on-primary","inline-flex h-button flex-1 items-center justify-center gap-2 rounded-control font-semibold hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"]),onClick:mt(u,["prevent"])},[e.busy?(p(),U(s(Oa),{key:0,size:16,class:"animate-spin","aria-hidden":"true"})):G("",!0),ye(" "+$(e.confirmLabel??s(h)("backend::lang.form.confirm")),1)],10,nP)])]),_:1})]),_:1})]),_:1},8,["open"]))}});function Lr(){const e=A(null),t=A(!1),n=A("");let a=null,r=null;function l(c){const f=a;a=null,r=null,e.value=null,f?.(c)}function o(c,f){return l(!1),n.value="",e.value=c,r=f??null,new Promise(m=>{a=m})}async function i(){if(t.value||e.value?.prompt&&n.value.trim()==="")return;const c=r;if(c){t.value=!0;try{await c()}finally{t.value=!1}}l(!0)}function u(){t.value||l(!1)}function d(c){n.value=c}return{request:e,busy:t,value:n,ask:o,confirm:i,cancel:u,setValue:d}}const aP={class:"flex flex-col gap-5"},rP={class:"flex flex-wrap items-end justify-between gap-4"},lP={class:"flex flex-col"},oP={class:"text-[26px] font-bold tracking-[-0.02em]"},sP={key:0,"data-record-count":"",class:"text-muted"},iP={key:0,class:"flex items-center gap-2.5"},uP={class:"overflow-hidden rounded-card border border-border bg-surface shadow-card"},cP={key:2,"data-list-failed":"",class:"flex flex-wrap items-center justify-between gap-3 border-t border-border px-5 py-4"},dP={role:"alert",class:"text-danger"},fP={key:0,"data-empty-search":"",class:"flex flex-col items-center gap-3"},pP={class:"flex size-14 items-center justify-center rounded-full bg-subtle text-muted"},vP={class:"text-[17px] font-bold"},mP={class:"max-w-[420px] text-muted"},hP={key:1,"data-empty-list":"",class:"text-muted"},yP=300,gP=le({__name:"ListView",setup(e){const t=yn(),n=ha(),a={vendor:String(t.params.vendor??""),plugin:String(t.params.plugin??""),controller:String(t.params.controller??"")},r=ks(a),l=Kn(r)??"/",o=A(null),i=A([]),u=A(null),d=A(!0),c=A(!1),f=A(!1),m=_(()=>c.value||f.value),v=A([]),y=A(!1),x=A(0),C=Lr(),k=_(()=>Z1(t.query)),E=A(k.value.search??""),B=_(()=>o.value?.messages),O=_(()=>o.value?.title?o.value.title:ws(a.vendor,a.plugin)?.sideMenu.find($e=>$e.controller===r)?.label??r),T=_(()=>u.value?Ze(B.value?.recordCount,u.value.total):""),P=_(()=>o.value?.toolbarButtons??[]),R=_(()=>P.value.filter(de=>de==="create")),H=_(()=>{const de=o.value?.reorder;if(!de)return null;const $e=de.partition?.column,ke=$e?o.value?.filters.find(Fe=>Fe.column===$e||Fe.name===$e):void 0,Le=ke?k.value.filter?.[ke.name]:void 0;return{path:`${l}/reorder`,query:Le!==void 0&&Le!==""?{partition:String(Le)}:{}}}),S=_(()=>o.value?.toolbarActions??[]),I=_(()=>P.value.filter(de=>de==="delete"||S.value.some($e=>$e.name===de))),z=A(null),D=_(()=>u.value?.row_states??{}),N=_(()=>({deleted:Ze(B.value?.rowStateDeleted),negative:Ze(B.value?.rowStateNegative),disabled:Ze(B.value?.rowStateDisabled),customized:Ze(B.value?.rowStateCustomized),outdated:Ze(B.value?.rowStateOutdated)})),X=_(()=>(o.value?.bulkActions??[]).filter(de=>de.name!=="delete")),W=A(!1),K=A(null),ae=_(()=>{const de=o.value?.perPageOptions??[];return de.length>0?de:[o.value?.recordsPerPage||20]}),se=_(()=>k.value.per_page??u.value?.per_page??o.value?.recordsPerPage??20),he=_(()=>k.value.sort?{column:k.value.sort,dir:k.value.dir==="desc"?"desc":"asc"}:null);function ge(de){const $e=o.value?.recordUrl,ke=de.id;return!$e||typeof ke!="number"&&typeof ke!="string"?null:C0($e,r,ke)}function oe(de){Qs(r,de),n.replace({path:t.path,query:Xi(de)})}const Z=Ll({}),ue=_(()=>Ll(k.value)!==Z);let j=0,xe=null;function _e(){oe({})}async function Y(de=!1){const $e=++j;d.value=!0,f.value=!1;let ke=null;try{ke=await J()}catch{ke=null}if($e!==j)return;if(!ke?.data&&de){Qs(r,{}),n.replace({path:t.path,query:{}});return}if(!ke?.data&&ke?.response?.status===404&&await me($e))return;if(i.value=ke?.data?.data??[],u.value=ke?.data?.meta??null,f.value=!ke?.data,d.value=!1,ke?.response?.status===422){Qs(r,{});return}const Le=u.value?.last_page??0;Le>=1&&(u.value?.page??0)>Le&&oe({...k.value,page:Le})}async function me(de){try{const{data:$e}=await Re.GET("/{vendor}/{plugin}/{controller}/singleton",{params:{path:a}});return de!==j?!0:$e?(await n.replace(`${l}/${$e.data.id}`),!0):!1}catch{return!1}}function J(){return Re.GET("/{vendor}/{plugin}/{controller}",{params:{path:a,query:k.value}})}async function ee(){const de=await Re.GET("/{vendor}/{plugin}/{controller}/schema/list",{params:{path:a}});o.value=de.data?.data??null,c.value=!o.value,o.value&&gp(r,o.value.assets)}ee(),Ne(()=>Ll(k.value),de=>{if(de===Z){const ke=t6(r),Le=Ll(ke);if(Le!==Z){xe=Le,n.replace({path:t.path,query:Xi(ke)});return}}const $e=xe!==null&&xe===de;xe=null,Qs(r,k.value),v.value=[],E.value=k.value.search??"",Y($e)},{immediate:!0});let ne=null;function w(de){E.value=de,ne!==null&&clearTimeout(ne),ne=setTimeout(()=>{ne=null;const $e=de.trim();oe({...k.value,search:$e===""?void 0:$e,page:void 0})},yP)}Et(()=>{ne!==null&&clearTimeout(ne)});function M(){E.value="",oe({...k.value,search:void 0,page:void 0})}function q(de){const $e=he.value;$e?.column!==de?oe({...k.value,sort:de,dir:"asc",page:void 0}):$e.dir==="asc"?oe({...k.value,sort:de,dir:"desc",page:void 0}):oe({...k.value,sort:void 0,dir:void 0,page:void 0})}function ie(de){oe({...k.value,page:de})}function te(de){oe({...k.value,per_page:de,page:void 0})}function fe(de,$e){const ke={...k.value.filter??{}};$e===null?delete ke[de]:ke[de]=$e,oe({...k.value,filter:ke,page:void 0})}async function Ee(){const de=v.value.map(Number).filter(ke=>Number.isInteger(ke)&&ke>0);if(!(de.length===0||y.value||!await C.ask({message:Ze(B.value?.deleteConfirm,de.length),confirmLabel:h("backend::lang.form.delete"),danger:!0}))){y.value=!0;try{const ke=await Re.POST("/{vendor}/{plugin}/{controller}/bulk-delete",{params:{path:a},body:{ids:de}});if(ke.data){Ie(Ze(B.value?.deleted,ke.data.data.deleted)),v.value=[],await Y(),x.value+=1;return}Ie(ke.error?.error.message||h("backend::lang.list.delete_failed"),"danger")}catch{Ie(h("backend::lang.list.delete_failed"),"danger")}finally{y.value=!1}}}async function Se(de){const $e=X.value.find(rt=>rt.name===de),ke=v.value.map(Number).filter(rt=>Number.isInteger(rt)&&rt>0);if(!$e||ke.length===0||W.value)return;const Le=$e.label??de;let Fe=0,Ke=null,tt="";const et=await C.ask({message:$e.confirm||rl("backend::lang.list.bulk_confirm",ke.length,{action:Le}),confirmLabel:Le,danger:!1},async()=>{W.value=!0;try{const rt=await Re.POST("/{vendor}/{plugin}/{controller}/bulk/{action}",{params:{path:{...a,action:de}},body:{ids:ke}});Fe=rt.response.status,Ke=rt.data?.data??null,tt=rt.error?.error.message??""}catch{Fe=0}finally{W.value=!1}});if(await new Promise(rt=>setTimeout(rt,0)),K.value?.focusBulk(),!et)return;const ot=Ke;if(ot){Ie(ot.message||rl("backend::lang.list.bulk_done",ot.affected)),v.value=[],await Y(),x.value+=1;return}if(Fe===409){Ie(h("backend::lang.list.bulk_stale"),"danger"),v.value=[],await Y();return}if(Fe===403){Ie(tt||h("backend::lang.list.action_forbidden"),"danger");return}Ie(tt||h("backend::lang.extension.action_failed"),"danger")}async function Te(de){if(z.value===null){z.value=de;try{const $e=await Re.POST("/{vendor}/{plugin}/{controller}/toolbar/{action}",{params:{path:{...a,action:de}},body:{}});if($e.data){$e.data.data.message&&Ie($e.data.data.message),await Y(),x.value+=1;return}Ie($e.error?.error.message||h("backend::lang.extension.action_failed"),"danger")}catch{Ie(h("backend::lang.extension.action_failed"),"danger")}finally{z.value=null}}}return(de,$e)=>(p(),g("section",aP,[b("header",rP,[b("div",lP,[b("h1",oP,$(O.value),1),T.value?(p(),g("p",sP,$(T.value),1)):G("",!0)]),R.value.length>0||H.value?(p(),g("div",iP,[H.value?(p(),U(Ue,{key:0,"data-action":"reorder",variant:"outline",icon:s(Gg),to:H.value},{default:F(()=>[ye($(s(h)("backend::lang.messages.list.reorder")),1)]),_:1},8,["icon","to"])):G("",!0),(p(!0),g(ve,null,Me(R.value,ke=>(p(),U(Ue,{key:ke,"data-action":"create",variant:"primary",icon:s(Ss),to:`${s(l)}/create`},{default:F(()=>[ye($(s(Ze)(B.value?.create)),1)]),_:1},8,["icon","to"]))),128))])):G("",!0)]),o.value?.headerPartial?(p(),U(bp,{key:0,variant:"header",source:a,name:o.value.headerPartial,"reload-key":x.value},null,8,["name","reload-key"])):G("",!0),b("div",uP,[o.value?(p(),U($I,{key:0,ref_key:"toolbar",ref:K,"show-search":o.value.showSearch,search:E.value,"search-prompt":s(Ze)(B.value?.searchPrompt),buttons:I.value,"selected-count":v.value.length,"selected-label":s(Ze)(B.value?.selected,v.value.length),"delete-label":s(Ze)(B.value?.deleteSelected,v.value.length),actions:S.value,"busy-action":z.value,"bulk-actions":X.value,"bulk-busy":W.value,"onUpdate:search":w,onDelete:Ee,onAction:Te,onBulk:Se},null,8,["show-search","search","search-prompt","buttons","selected-count","selected-label","delete-label","actions","busy-action","bulk-actions","bulk-busy"])):G("",!0),o.value&&o.value.filters.length>0?(p(),U(vI,{key:1,filters:o.value.filters,values:k.value.filter??{},source:a,onUpdate:fe},null,8,["filters","values"])):G("",!0),m.value&&!d.value?(p(),g("div",cP,[b("p",dP,$(s(h)("backend::lang.list.load_failed")),1),f.value&&ue.value?(p(),U(Ue,{key:0,"data-action":"reset-list",onClick:_e},{default:F(()=>[ye($(s(h)("backend::lang.list.reset_list")),1)]),_:1})):G("",!0)])):(p(),U(E0,{key:3,columns:o.value?.columns??[],rows:i.value,loading:d.value||!o.value,"row-link":ge,selectable:o.value?.showCheckboxes??!1,selected:v.value,sortable:o.value?.showSorting??!1,sort:he.value,"row-states":D.value,"state-labels":N.value,"onUpdate:selected":$e[0]||($e[0]=ke=>v.value=ke),onSort:q},{empty:F(()=>[k.value.search?(p(),g("div",fP,[b("span",pP,[L(s(db),{size:24,"aria-hidden":"true"})]),b("p",vP,$(s(Ze)(B.value?.emptySearch,void 0,{term:k.value.search})),1),b("p",mP,$(s(Ze)(B.value?.emptySearchHint,void 0,{term:k.value.search})),1),L(Ue,{"data-action":"clear-search",onClick:M},{default:F(()=>[ye($(s(h)("backend::lang.list.clear_search")),1)]),_:1})])):(p(),g("p",hP,$(s(Ze)(B.value?.empty)||o.value?.noRecordsMessage||s(h)("backend::lang.list.no_records")),1))]),_:1},8,["columns","rows","loading","selectable","selected","sortable","sort","row-states","state-labels"])),L(A0,{meta:u.value,loading:d.value||!o.value,"per-page-options":ae.value,"per-page":se.value,onPage:ie,onPerPage:te},null,8,["meta","loading","per-page-options","per-page"])]),L(qr,{open:s(C).request.value!==null,message:s(C).request.value?.message??"","confirm-label":s(C).request.value?.confirmLabel,danger:s(C).request.value?.danger,busy:s(C).busy.value,onConfirm:s(C).confirm,onCancel:s(C).cancel},null,8,["open","message","confirm-label","danger","busy","onConfirm","onCancel"])]))}}),$r="X-Session-Key",T0="X-Child-Session-Key",bP=32;function ms(){const e=new Uint8Array(bP);globalThis.crypto.getRandomValues(e);let t="";for(const n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const _P="X-Upload-Id";async function fr(e){try{const t=await e();return{data:t.data?t.data.data:null,status:t.response.status,error:t.error?.error??null}}catch{return{data:null,status:0,error:null}}}async function Qi(e){try{const t=await e();return t.response.ok&&t.data instanceof Blob?t.data:null}catch{return null}}function Da(e){return encodeURIComponent(String(e))}function D0(e){return`${cl.api}/${Da(e.vendor)}/${Da(e.plugin)}/${Da(e.controller)}`}function xP(e){try{return e===""?null:JSON.parse(e)}catch{return null}}function _p(e){if(!e)return"";for(const t of Object.values(e.details??{})){const n=Array.isArray(t)?t.find(a=>typeof a=="string"&&a!==""):t;if(typeof n=="string"&&n!=="")return n}return e.message??""}function kP(e,t){const n=t;if((e===200||e===201)&&n?.data)return{ok:!0,item:n.data};const a=_p(n?.error);return e===413?{ok:!1,reason:"too_large",status:e,message:a}:e===422?{ok:!1,reason:"invalid",status:e,message:a}:e===0?{ok:!1,reason:"network",status:e,message:a}:{ok:!1,reason:"failed",status:e,message:a}}function O0(e,t,n,a,r){let l=null,o=!1;const i=()=>new Promise(d=>{const c=new XMLHttpRequest;l=c,c.open("POST",e),c.setRequestHeader("X-Requested-With",Fg),c.setRequestHeader("Accept","application/json");for(const[m,v]of Object.entries(n))c.setRequestHeader(m,v);r&&c.setRequestHeader(_P,r),c.upload.onprogress=m=>{m.lengthComputable&&a?.(m.loaded,m.total)},c.onload=()=>d({status:c.status,body:xP(c.responseText)}),c.onerror=()=>d("network"),c.ontimeout=()=>d("network"),c.onabort=()=>d("aborted");const f=new FormData;f.append("file_data",t,t.name),c.send(f)});return{promise:(async()=>{let d=await i();return typeof d=="object"&&d.status===401&&!o&&(await hf()&&(d=o?"aborted":await i()),typeof d=="object"&&d.status===401&&k2()),d==="aborted"||o?{ok:!1,reason:"aborted",status:0,message:""}:d==="network"?{ok:!1,reason:"network",status:0,message:""}:kP(d.status,d.body)})(),abort(){o=!0,l?.abort()}}}function M0(e,t,n,a){const r={...e,id:t,field:n},l={[$r]:a},o=`${D0(e)}/${Da(t)}/files/${Da(n)}`;return{list:()=>fr(()=>Re.GET("/{vendor}/{plugin}/{controller}/{id}/files/{field}",{params:{path:r,header:l}})),upload:(i,u,d)=>O0(o,i,{...l},u,d),update:(i,u)=>fr(()=>Re.PUT("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}",{params:{path:{...r,file:i},header:l},body:u})),remove:i=>fr(()=>Re.DELETE("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}",{params:{path:{...r,file:i},header:l}})),reorder:i=>fr(()=>Re.POST("/{vendor}/{plugin}/{controller}/{id}/files/{field}/reorder",{params:{path:r,header:l},body:{ids:i}})),download:i=>Qi(()=>Re.GET("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}/download",{params:{path:{...r,file:i},header:l},parseAs:"blob"})),thumb:i=>Qi(()=>Re.GET("/{vendor}/{plugin}/{controller}/{id}/files/{field}/{file}/thumb",{params:{path:{...r,file:i},header:l},parseAs:"blob"}))}}function wP(e,t,n,a,r,l,o){const i={...e,id:t,name:n,child:a,field:r},u={[$r]:l,[T0]:o},d=`${D0(e)}/${Da(t)}/relations/${Da(n)}/records/${Da(a)}/files/${Da(r)}`;return{list:()=>fr(()=>Re.GET("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}",{params:{path:i,header:u}})),upload:(c,f,m)=>O0(d,c,{...u},f,m),update:(c,f)=>fr(()=>Re.PUT("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}",{params:{path:{...i,file:c},header:u},body:f})),remove:c=>fr(()=>Re.DELETE("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}",{params:{path:{...i,file:c},header:u}})),reorder:c=>fr(()=>Re.POST("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/reorder",{params:{path:i,header:u},body:{ids:c}})),download:c=>Qi(()=>Re.GET("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}/download",{params:{path:{...i,file:c},header:u},parseAs:"blob"})),thumb:c=>Qi(()=>Re.GET("/{vendor}/{plugin}/{controller}/{id}/relations/{name}/records/{child}/files/{field}/{file}/thumb",{params:{path:{...i,file:c},header:u},parseAs:"blob"}))}}const $P=new Set(["readonly","placeholder","maxlength","minlength","min","max","step","autocomplete","spellcheck","pattern"]);function Nr(e){const t={};for(const[n,a]of Object.entries(e.attributes??{})){const r=n.toLowerCase();!$P.has(r)||a===null||a===!1||(t[r]=a)}return t}function Lt(e){return["w-full rounded-control border bg-surface px-3.5 text-text transition-colors duration-150 ease-out",e?"border-danger":"border-border-strong"].join(" ")}function Hu(e){return typeof e=="string"?e!==""&&e!=="0"&&e.toLowerCase()!=="false":!!e}function I0(e,t){return typeof e=="number"?t?1:0:t}function P0(e,t,n){const a={};if(t===null||typeof t!="object"||Array.isArray(t))return a;const r=t;for(const l of e.permissionOptions??[]){if(n?.has(l.code))continue;const o=Number(r[l.code]);(o===1||e.mode==="radio"&&o===-1)&&(a[l.code]=o)}return a}const CP=new Set(["mltext","mltextarea","mlmarkdown"]);function SP(e){return e!==void 0&&CP.has(e)}function Cr(e){return e?SP(e.type)||!!e.element&&e.translatable===!0:!1}const hs="summer:ml-locale";function EP(e){typeof window>"u"||e===""||window.dispatchEvent(new CustomEvent(hs,{detail:e}))}function ua(e){const t={};if(e===null||typeof e!="object"||Array.isArray(e))return t;for(const[n,a]of Object.entries(e))typeof a=="string"&&(t[n]=a);return t}const AP={class:"flex min-w-0 flex-col"},TP=["for"],DP={key:0,class:"text-danger","aria-hidden":"true"},OP=["id"],MP=["id","name","checked","aria-invalid","aria-describedby"],IP=le({__name:"CheckboxField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>Hu(n.modelValue));function l(o){a("update:modelValue",I0(n.modelValue,o.target.checked))}return(o,i)=>(p(),g("div",{class:pe([e.invalid?"border-danger":"border-border","flex items-center justify-between gap-4 rounded-inner border px-4 py-3.5"]),"data-toggle-card":""},[b("div",AP,[b("label",{for:e.controlId,class:"font-semibold"},[ye($(e.field.label||e.field.name),1),e.field.required?(p(),g("span",DP," *")):G("",!0)],8,TP),e.field.comment?(p(),g("p",{key:0,id:`${e.controlId}-comment`,class:"text-[13px] text-muted"},$(e.field.comment),9,OP)):G("",!0)]),b("input",{id:e.controlId,type:"checkbox",name:e.field.name,checked:r.value,"aria-invalid":e.invalid?"true":void 0,"aria-describedby":e.describedBy||void 0,class:"size-5 shrink-0 rounded-[6px] accent-primary",onChange:l},null,40,MP)],2))}});function PP(e){return e==="date"||e==="time"?e:"datetime"}function pn(e,t=2){return String(e).padStart(t,"0")}const RP=/(Z|[+-]\d{2}:?\d{2})$/i;function qP(e,t,n=!1){if(typeof t!="string"||t.trim()==="")return null;const a=t.trim();try{if(e==="date")return jb(a.slice(0,10));if(e==="time"){const l=/(\d{2}:\d{2}(:\d{2})?)/.exec(a.includes("T")?a.slice(a.indexOf("T")):a);return l?lA(l[1]):null}const r=RP.test(a)?a.replace(" ","T"):`${a.replace(" ","T")}Z`;return n?fa(gm(r,"UTC")):gm(r,Yn())}catch{return null}}function Uc(e){return`${pn(e.year,4)}-${pn(e.month)}-${pn(e.day)}`}function Hc(e){return`${pn(e.hour)}:${pn(e.minute)}:${pn(e.second)}`}function mh(e,t,n=!1){if(!t)return null;if(e==="time")return"hour"in t?Hc(t):null;if(!("year"in t))return null;if(e==="date")return Uc(t);if(n){const l=t instanceof Ba?fa(t):t,o="hour"in l?Hc(l):"00:00:00";return`${Uc(l)}T${o}Z`}const a=t instanceof Ba?t:Rf(t instanceof _t?fa(t):t,Yn()),r=Tu(a,"UTC");return`${Uc(r)}T${Hc(r)}Z`}const LP={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm",time:"HH:mm"},NP=/\[([^\]]*)\]|YYYY|YY|MMMM|MMM|MM|M|dddd|ddd|DD|D|HH|H|hh|h|mm|ss|A|a/g;function BP(e){return"year"in e?new _t(e.year,e.month,e.day):null}function Kc(e,t,n,a){return new Bn(e,{...n,timeZone:"UTC"}).formatToParts(t.toDate("UTC")).find(l=>l.type===a)?.value??""}function FP(e,t,n,a){if(!e)return"";const r=n||LP[t],l=BP(e),o="hour"in e?e:null,i=/D/.test(r.replace(/\[[^\]]*\]/g,""));return r.replace(NP,(u,d)=>{if(d!==void 0)return d;switch(u){case"YYYY":return l?pn(l.year,4):"";case"YY":return l?pn(l.year%100):"";case"MMMM":case"MMM":{if(!l)return"";const c=u==="MMMM"?"long":"short";return i?Kc(a,l,{day:"numeric",month:c},"month"):Kc(a,l,{month:c},"month")}case"MM":return l?pn(l.month):"";case"M":return l?String(l.month):"";case"dddd":case"ddd":return l?Kc(a,l,{weekday:u==="dddd"?"long":"short"},"weekday"):"";case"DD":return l?pn(l.day):"";case"D":return l?String(l.day):"";case"HH":return o?pn(o.hour):"";case"H":return o?String(o.hour):"";case"hh":return o?pn(o.hour%12||12):"";case"h":return o?String(o.hour%12||12):"";case"mm":return o?pn(o.minute):"";case"ss":return o?pn(o.second):"";case"A":return o?o.hour<12?"AM":"PM":"";case"a":return o?o.hour<12?"am":"pm":"";default:return u}})}const VP=new _t(2026,10,4);function zP(e,t){if(typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=6)return t;try{return(7-Au(VP,e))%7}catch{return 1}}function hh(e){if(e)try{return jb(e.slice(0,10))}catch{return}}function jP(e,t=Ds(Yn())){const n=hh(e.minDate),a=hh(e.maxDate);if(n||a)return{min:n,max:a};const r=e.yearRange??[];return r.length===1&&typeof r[0]=="number"?{min:new _t(t.year-r[0],1,1),max:new _t(t.year+r[0],12,31)}:r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"?{min:new _t(r[0],1,1),max:new _t(r[1],12,31)}:{}}function Gd(e,t,n,a){if(!e||t==="time")return;if(t==="date")return e;const r=new br(e.year,e.month,e.day,a?23:0,a?59:0,a?59:0);return n?r:Tu(Rf(r,"UTC"),Yn())}function UP(e,t){const n=Ds(Yn());return Gd(n,e==="time"?"datetime":e,t,!1)??n}const HP=["id","aria-describedby"],KP={key:0},WP={key:1,class:"text-muted","data-empty":""},GP=["aria-label"],YP={class:"flex size-8 shrink-0 items-center justify-center text-muted","aria-hidden":"true"},JP=["data-mode"],ZP=["aria-label"],XP={key:0,"data-datepicker-time":"",class:"mt-3 flex items-center gap-2 border-t border-border pt-3"},So="flex size-8 shrink-0 items-center justify-center rounded-pager text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text",QP=le({__name:"DatepickerField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>PP(n.field.mode)),l=_(()=>r.value==="datetime"&&!!n.field.ignoreTimezone),o=_(()=>Wn.value||"pl"),i=_(()=>{const Z=n.field.attributes?.readonly;return!!n.field.readOnly||Z!=null&&Z!==!1}),u=_(()=>qP(r.value,n.modelValue,l.value)),d=_(()=>r.value==="time"?null:u.value),c=_(()=>r.value==="time"?u.value:null),f=_(()=>jP(n.field)),m=_(()=>Gd(f.value.min,r.value,l.value,!1)),v=_(()=>Gd(f.value.max,r.value,l.value,!0)),y=UP(r.value,l.value),x=_(()=>zP(o.value,n.field.firstDay)),C=_(()=>n.field.twelveHour?12:24),k=_(()=>r.value==="date"?"day":"minute"),E=_(()=>FP(u.value,r.value,n.field.displayFormat,o.value)),B=_(()=>!n.field.required&&u.value!==null&&!i.value),O=_(()=>{const Z=d.value;return Z?!!m.value&&Z.compare(m.value)<0||!!v.value&&Z.compare(v.value)>0:!1}),T=new Set(["day","month","year","hour","minute","second"]),P=A(null),R=A(!1);function H(){const Z=P.value;if(!Z){R.value=!1;return}const ue=Array.from(Z.querySelectorAll("[data-reka-date-field-segment], [data-reka-time-field-segment]")).filter(xe=>T.has(xe.dataset.rekaDateFieldSegment??xe.dataset.rekaTimeFieldSegment??"")),j=ue.filter(xe=>!xe.hasAttribute("data-placeholder")).length;R.value=j>0&&j!!n.invalid||O.value||R.value),z=_(()=>mh(r.value,u.value,l.value));function D(Z){const ue=mh(r.value,Z??null,l.value);S(),!(ue===z.value&&(ue!==null||n.modelValue===null))&&a("update:modelValue",ue)}function N(Z){if(!Z||r.value!=="datetime"){D(Z);return}const ue=d.value,j=K.value,xe=!ue||ue.year!==Z.year||ue.month!==Z.month||ue.day!==Z.day,_e=!("hour"in Z)||Z.hour!==j.hour||Z.minute!==j.minute;xe&&_e&&(Z=ae(Z,j)),W.value=Z,D(Z)}function X(){a("update:modelValue",null),S()}const W=A(null);Ne(d,Z=>{W.value=Z},{immediate:!0});const K=_(()=>{const Z=W.value??d.value;return Z&&"hour"in Z?new sa(Z.hour,Z.minute):new sa(0,0)});function ae(Z,ue){return"hour"in Z?Z.set({hour:ue.hour,minute:ue.minute,second:0,millisecond:0}):new br(Z.year,Z.month,Z.day,ue.hour,ue.minute)}function se(Z){if(!Z)return;const ue=Z instanceof sa?Z:new sa(Z.hour,Z.minute),j=W.value??d.value??y,xe=ae(j,ue);W.value=xe,D(xe)}function he(Z){return Z.charAt(0).toLocaleUpperCase(o.value)+Z.slice(1)}const ge=_(()=>[Lt(I.value),"h-input flex min-w-0 items-center gap-1 pl-3.5 pr-1.5","focus-within:border-primary focus-within:shadow-[0_0_0_3px_var(--c-ring)]","has-[[data-invalid]]:border-danger"]);function oe(Z){return Z==="literal"?"text-muted":Z==="timeZoneName"?"ml-2 min-w-0 truncate text-[13px] text-muted":"rounded-[4px] px-0.5 tabular-nums outline-none focus:bg-sel focus:text-text focus-visible:outline-none data-[placeholder]:text-placeholder focus:data-[placeholder]:text-text"}return(Z,ue)=>i.value?(p(),g("p",{key:0,id:e.controlId,"data-datepicker-readonly":"","aria-describedby":e.describedBy||void 0,class:"flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 tabular-nums"},[E.value!==""?(p(),g("span",KP,$(E.value),1)):(p(),g("span",WP,"—"))],8,HP)):r.value==="time"?(p(),g("div",{key:1,ref_key:"container",ref:P,"data-datepicker":"","data-mode":"time",class:pe(ge.value),onKeyup:S,onFocusout:S},[L(s(rh),{id:e.controlId,"model-value":c.value,locale:o.value,"hour-cycle":C.value,granularity:"minute",name:e.field.name,required:e.field.required||void 0,"aria-invalid":I.value?"true":void 0,"aria-describedby":e.describedBy||void 0,class:"flex min-w-0 flex-1 items-center","onUpdate:modelValue":D},{default:F(({segments:j})=>[(p(!0),g(ve,null,Me(j,xe=>(p(),U(s(lh),{key:xe.part,part:xe.part,class:pe(oe(xe.part))},{default:F(()=>[ye($(xe.value),1)]),_:2},1032,["part","class"]))),128))]),_:1},8,["id","model-value","locale","hour-cycle","name","required","aria-invalid","aria-describedby"]),B.value?(p(),g("button",{key:0,type:"button","data-action":"clear","aria-label":s(h)("backend::lang.datepicker.clear"),class:pe(So),onClick:X},[L(s(Xt),{size:16,"aria-hidden":"true"})],8,GP)):G("",!0),b("span",YP,[L(s(Li),{size:16})])],34)):(p(),U(s(hO),{key:2,id:e.controlId,"model-value":d.value,"default-placeholder":d.value??s(y),locale:o.value,granularity:k.value,"hour-cycle":C.value,"hide-time-zone":r.value!=="datetime"||l.value,"min-value":m.value,"max-value":v.value,"week-starts-on":x.value,name:e.field.name,required:e.field.required||void 0,"close-on-select":r.value==="date","prevent-deselect":"","onUpdate:modelValue":N},{default:F(()=>[b("div",{ref_key:"container",ref:P,"data-datepicker":"","data-mode":r.value,class:pe(ge.value),onKeyup:S,onFocusout:S},[L(s(IO),{"aria-invalid":I.value?"true":void 0,"aria-describedby":e.describedBy||void 0,class:"flex min-w-0 flex-1 items-center overflow-hidden"},{default:F(({segments:j})=>[(p(!0),g(ve,null,Me(j,xe=>(p(),U(s(GO),{key:xe.part,part:xe.part,class:pe(oe(xe.part))},{default:F(()=>[ye($(xe.value),1)]),_:2},1032,["part","class"]))),128))]),_:1},8,["aria-invalid","aria-describedby"]),B.value?(p(),g("button",{key:0,type:"button","data-action":"clear","aria-label":s(h)("backend::lang.datepicker.clear"),class:pe(So),onClick:X},[L(s(Xt),{size:16,"aria-hidden":"true"})],8,ZP)):G("",!0),L(s(nM),{"data-action":"open-calendar","aria-label":s(h)("backend::lang.datepicker.open_calendar"),class:pe(So)},{default:F(()=>[L(s(Xg),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"])],42,JP),L(s(OO),{"data-datepicker-calendar":"","side-offset":4,align:"end",class:"z-50 w-[284px] rounded-inner border border-border bg-surface p-4 text-text shadow-menu"},{default:F(()=>[L(s(gO),null,{default:F(({weekDays:j,grid:xe})=>[L(s(UO),{class:"flex h-9 items-center justify-between"},{default:F(()=>[L(s(XO),{"aria-label":s(h)("backend::lang.datepicker.prev_month"),class:pe(So)},{default:F(()=>[L(s($u),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"]),L(s(KO),{class:"font-semibold"},{default:F(({headingValue:_e})=>[ye($(he(_e)),1)]),_:1}),L(s(JO),{"aria-label":s(h)("backend::lang.datepicker.next_month"),class:pe(So)},{default:F(()=>[L(s(Cs),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label"])]),_:1}),(p(!0),g(ve,null,Me(xe,_e=>(p(),U(s(RO),{key:_e.value.toString(),class:"mt-2 w-full border-collapse select-none"},{default:F(()=>[L(s(BO),null,{default:F(()=>[L(s(eh),{class:"flex"},{default:F(()=>[(p(!0),g(ve,null,Me(j,Y=>(p(),U(s(zO),{key:Y,class:"flex h-9 w-9 items-center justify-center text-[13px] font-normal text-muted"},{default:F(()=>[ye($(Y),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),L(s(LO),null,{default:F(()=>[(p(!0),g(ve,null,Me(_e.rows,(Y,me)=>(p(),U(s(eh),{key:`week-${me}`,class:"flex"},{default:F(()=>[(p(!0),g(ve,null,Me(Y,J=>(p(),U(s(_O),{key:J.toString(),date:J,class:"p-0"},{default:F(()=>[L(s(kO),{day:J,month:_e.value,class:"flex size-9 items-center justify-center rounded-pager tabular-nums text-text transition-colors duration-150 ease-out hover:bg-hover data-[outside-view]:text-placeholder data-[today]:font-semibold data-[today]:shadow-[inset_0_0_0_1px_var(--c-border-strong)] data-[selected]:bg-primary data-[selected]:font-semibold data-[selected]:text-on-primary data-[disabled]:cursor-not-allowed data-[disabled]:text-placeholder data-[disabled]:opacity-40 data-[disabled]:hover:bg-transparent data-[unavailable]:cursor-not-allowed data-[unavailable]:opacity-40"},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))]),_:1}),r.value==="datetime"?(p(),g("div",XP,[L(s(Li),{size:16,class:"shrink-0 text-muted","aria-hidden":"true"}),L(s(rh),{"model-value":K.value,locale:o.value,"hour-cycle":C.value,granularity:"minute","hide-time-zone":"",class:"flex min-w-0 items-center","onUpdate:modelValue":se},{default:F(({segments:j})=>[(p(!0),g(ve,null,Me(j,xe=>(p(),U(s(lh),{key:xe.part,part:xe.part,class:pe(oe(xe.part))},{default:F(()=>[ye($(xe.value),1)]),_:2},1032,["part","class"]))),128))]),_:1},8,["model-value","locale","hour-cycle"])])):G("",!0)]),_:1})]),_:1},8,["id","model-value","default-placeholder","locale","granularity","hour-cycle","hide-time-zone","min-value","max-value","week-starts-on","name","required","close-on-select"]))}}),Os=Symbol("summer.form.values"),xp=Symbol("summer.form.patch"),Ku=Symbol("summer.form.locale"),R0=Symbol("summer.form.partialReload"),eu=Symbol("summer.form.enabledLocales"),q0=Symbol("summer.form.assets");function kp(){const e=A(0);return{activeUploads:e,beginUpload(){e.value++;let t=!1;return()=>{t||(t=!0,e.value>0&&e.value--)}}}}const co=Symbol("summer.form.session"),L0=Symbol("summer.settings.secrets"),wp=Symbol("summer.form.permissionLocks"),$p=Symbol("summer.form.triggerNotes"),yh="summer-action",eR="summer-result",gh="summer-change",bh="summer-upload",tR="summer-upload-result",N0=5e3,Cp=Symbol("summer.form.feedback"),Ms=Symbol("summer.form.fieldScope"),Sp=Symbol("summer.form.rememberLabel"),B0=Symbol("summer.form.dependentCache"),nR=["data-dependent"],aR={class:"relative"},rR=["id","name","value","disabled","required","aria-required","aria-invalid","aria-busy","aria-describedby"],lR={key:0,value:"state",class:"text-muted"},oR=["value"],sR=["id"],iR={key:1,class:"flex flex-wrap items-center gap-2"},uR=["id"],ni="empty",ai="placeholder",cR=le({__name:"DropdownField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=" ".repeat(4),l=it(Ms,null),o=it(Cp,null),i=it(B0,null)??new Map,u=_(()=>n.field.dependsOn??""),d=_(()=>u.value!==""),c=A("waiting"),f=A([]),m=_(()=>{const K=l?.values.value[u.value];return K==null||K===""||typeof K=="object"?null:String(K)}),v=_(()=>l?.fields.value.find(K=>K.name===u.value)),y=_(()=>v.value?.label||u.value),x=_(()=>(v.value?.options??[]).find(ae=>k(ae.value,m.value))?.label??m.value??""),C=_(()=>d.value?f.value:n.field.options??[]);function k(K,ae){return K==null||ae===null||ae===void 0?K===ae||K==null&&ae==null:String(K)===String(ae)}function E(){return n.modelValue!==null&&n.modelValue!==void 0&&n.modelValue!==""}function B(){E()&&(a("update:modelValue",null),o?.announce(h("backend::lang.form.dependent_cleared",{field:n.field.label||n.field.name})))}function O(K,ae){if(!K.applies){f.value=[],c.value="unused",ae&&B();return}f.value=K.options.map(se=>({value:se.value,label:r.repeat(Math.max(0,se.depth))+se.label})),c.value=f.value.length>0?"ready":"empty",ae&&E()&&!f.value.some(se=>k(se.value,n.modelValue))&&B()}let T=0,P=!1;async function R(K){const ae=++T,se=m.value;if(se===null){f.value=[],c.value="waiting",K&&B();return}const he=l?.path(n.field.name)??n.field.name,ge=`${he}\0${se}`,oe=i.get(ge);if(oe){O(oe,K);return}if(!n.source){P=K,c.value="failed";return}c.value="loading";try{const{data:Z}=await Re.GET("/{vendor}/{plugin}/{controller}/fields/{field}/dependent-options",{params:{path:{...n.source,field:he},query:{[`values[${u.value}]`]:se}}});if(ae!==T)return;if(!Z){P=K,c.value="failed";return}i.set(ge,Z.data),O(Z.data,K)}catch{ae===T&&(P=K,c.value="failed")}}function H(){R(P)}Ne(m,(K,ae)=>{d.value&&K!==ae&&R(!0)}),xt(()=>{d.value&&R(!1)}),Et(()=>{T++});const S=_(()=>{const K=C.value.findIndex(ae=>k(ae.value,n.modelValue));return K>=0?String(K):n.field.emptyOption!==void 0&&!E()?ni:ai}),I=_(()=>{switch(c.value){case"waiting":return h("backend::lang.form.dependent_waiting",{field:y.value});case"loading":return h("backend::lang.form.loading_options");case"unused":return h("backend::lang.form.dependent_not_used");case"empty":return h("backend::lang.form.dependent_empty",{type:x.value});case"failed":return h("backend::lang.form.dependent_failed");default:return""}}),z=_(()=>d.value&&c.value!=="ready"),D=_(()=>z.value||S.value===ni||S.value===ai),N=_(()=>`${n.controlId}-dependent`),X=_(()=>[n.describedBy??"",d.value&&(c.value==="empty"||c.value==="failed")?N.value:""].filter(Boolean).join(" "));function W(K){const ae=K.target.value;if(ae===ni){a("update:modelValue",null);return}const se=C.value[Number(ae)];se&&a("update:modelValue",se.value)}return(K,ae)=>(p(),g("div",{class:"flex flex-col gap-1.5","data-dependent":d.value?c.value:void 0},[b("div",aR,[b("select",{id:e.controlId,name:e.field.name,value:z.value?"state":S.value,disabled:z.value||void 0,required:e.field.required||void 0,"aria-required":e.field.required?"true":void 0,"aria-invalid":e.invalid?"true":void 0,"aria-busy":d.value&&c.value==="loading"?"true":void 0,"aria-describedby":X.value||void 0,class:pe([[s(Lt)(e.invalid),D.value?"text-muted":""],"h-input appearance-none pr-10 disabled:cursor-not-allowed"]),onChange:W},[z.value?(p(),g("option",lR,$(I.value),1)):(p(),g(ve,{key:1},[e.field.emptyOption!==void 0?(p(),g("option",{key:0,value:ni,class:"text-muted"},$(e.field.emptyOption),1)):G("",!0),S.value===ai?(p(),g("option",{key:1,value:ai,disabled:""},$(s(h)("backend::lang.form.select_placeholder")),1)):G("",!0),(p(!0),g(ve,null,Me(C.value,(se,he)=>(p(),g("option",{key:he,value:String(he),class:"text-text"},$(se.label),9,oR))),128))],64))],42,rR),L(s(yr),{size:16,class:"pointer-events-none absolute top-1/2 right-3.5 -translate-y-1/2 text-muted","aria-hidden":"true"})]),d.value&&c.value==="empty"?(p(),g("p",{key:0,id:N.value,"data-dependent-hint":"",class:"text-[13px] text-muted"},$(I.value),9,sR)):d.value&&c.value==="failed"?(p(),g("div",iR,[b("p",{id:N.value,role:"alert",class:"flex items-center gap-1.5 text-[13px] text-danger"},[L(s(ht),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.form.dependent_failed")),1)],8,uR),L(Ue,{variant:"ghost",size:"sm",icon:s(pi),"data-action":"dependent-retry",onClick:H},{default:F(()=>[ye($(s(h)("backend::lang.form.dependent_retry")),1)]),_:1},8,["icon"])])):G("",!0)],8,nR))}}),dR={class:"flex items-start gap-3"},fR={class:"flex min-w-0 flex-1 flex-col gap-1"},pR={key:0,class:"flex items-center gap-4"},vR=["src"],mR={key:1,class:"flex size-16 shrink-0 items-center justify-center rounded-inner bg-subtle","aria-hidden":"true"},hR=["title"],yR={class:"flex flex-col gap-1.5"},gR=["for"],bR=["id","disabled","aria-invalid","aria-describedby"],_R=["id"],xR={class:"flex flex-col gap-1.5"},kR=["for"],wR=["id","disabled","aria-invalid","aria-describedby"],$R=["id"],CR={class:"flex gap-2.5"},SR=["disabled"],ER=["aria-keyshortcuts","title","disabled"],AR=le({__name:"FileCaptionModal",props:{open:{type:Boolean},file:{},routes:{},preview:{},idPrefix:{}},emits:["update:open","saved","closed"],setup(e,{emit:t}){const n=e,a=t,r=A(""),l=A(""),o=A({}),i=A(!1),u=Lr();function d(C){const k={};for(const[E,B]of Object.entries(C??{})){const O=(Array.isArray(B)?B:[B]).filter(T=>typeof T=="string"&&T!=="");O.length>0&&(k[E]=O)}return k}const c=_(()=>`${n.idPrefix}-caption-title`),f=_(()=>`${n.idPrefix}-caption-description`),m=_(()=>!!n.file&&(r.value!==n.file.title||l.value!==n.file.description));Ne(()=>n.open,C=>{C&&n.file&&(r.value=n.file.title??"",l.value=n.file.description??"",o.value={},i.value=!1)},{immediate:!0});async function v(C){if(C){a("update:open",!0);return}i.value||m.value&&!await u.ask({message:h("backend::lang.form.unsaved_confirm"),confirmLabel:h("backend::lang.form.discard"),danger:!0})||a("update:open",!1)}async function y(){if(!(i.value||!n.file||!n.routes)){i.value=!0;try{const C=await n.routes.update(n.file.id,{title:r.value,description:l.value});if(C.data){o.value={},a("saved",C.data),a("update:open",!1),Ie(h("backend::lang.fileupload.details_saved"));return}if(C.status===422){o.value=d(C.error?.details),Object.keys(o.value).length===0&&(o.value={title:[_p(C.error)||h("backend::lang.form.error_generic")]});return}Ie(C.error?.message||h("backend::lang.form.error_generic"),"danger")}finally{i.value=!1}}}function x(C){C.preventDefault(),a("closed")}return(C,k)=>(p(),g(ve,null,[L(s(Dr),{open:e.open,"onUpdate:open":v},{default:F(()=>[L(s(vl),null,{default:F(()=>[L(s(Mr),{"data-dialog-overlay":"",class:"fixed inset-0 z-40 bg-overlay"}),L(s(Or),{"data-caption-modal":"","data-dialog-content":"","aria-modal":"true",class:"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100vh-32px)] w-[calc(100%-32px)] max-w-[560px] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-y-auto rounded-modal bg-surface p-6 text-text shadow-pop",onCloseAutoFocus:x},{default:F(()=>[b("div",dR,[b("div",fR,[L(s(Ir),{class:"text-[20px] font-bold tracking-[-0.01em]"},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.attachment")),1)]),_:1}),L(s(xr),{class:"text-muted"},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.help")),1)]),_:1})]),L(s(_r),{"data-action":"close","aria-label":s(h)("backend::lang.form.close"),disabled:i.value,class:"flex size-[34px] shrink-0 items-center justify-center rounded-tab bg-subtle text-muted hover:bg-hover hover:text-text"},{default:F(()=>[L(s(Xt),{size:16,"aria-hidden":"true"})]),_:1},8,["aria-label","disabled"])]),e.file?(p(),g("div",pR,[e.preview?(p(),g("img",{key:0,src:e.preview,alt:"",class:"size-16 shrink-0 rounded-inner object-cover"},null,8,vR)):(p(),g("span",mR,[L(s(ql),{size:16,class:"text-muted"})])),b("span",{class:"min-w-0 truncate text-[13px] text-muted",title:e.file.file_name},$(e.file.file_name),9,hR)])):G("",!0),b("form",{class:"flex flex-col gap-4",novalidate:"",onSubmit:mt(y,["prevent"])},[b("div",yR,[b("label",{for:c.value,class:"font-semibold"},$(s(h)("backend::lang.fileupload.title_label")),9,gR),Rn(b("input",{id:c.value,"onUpdate:modelValue":k[0]||(k[0]=E=>r.value=E),type:"text","data-caption-title":"",disabled:i.value,"aria-invalid":o.value.title?"true":void 0,"aria-describedby":o.value.title?`${c.value}-error`:void 0,class:pe([s(Lt)(!!o.value.title),"h-input"])},null,10,bR),[[al,r.value]]),o.value.title?(p(),g("p",{key:0,id:`${c.value}-error`,class:"flex items-center gap-1.5 text-[13px] text-danger"},[L(s(ht),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(o.value.title.join(" ")),1)],8,_R)):G("",!0)]),b("div",xR,[b("label",{for:f.value,class:"font-semibold"},$(s(h)("backend::lang.fileupload.description_label")),9,kR),Rn(b("textarea",{id:f.value,"onUpdate:modelValue":k[1]||(k[1]=E=>l.value=E),rows:"3","data-caption-description":"",disabled:i.value,"aria-invalid":o.value.description?"true":void 0,"aria-describedby":o.value.description?`${f.value}-error`:void 0,class:pe([s(Lt)(!!o.value.description),"min-h-input resize-y py-2.5"])},null,10,wR),[[al,l.value]]),o.value.description?(p(),g("p",{key:0,id:`${f.value}-error`,class:"flex items-center gap-1.5 text-[13px] text-danger"},[L(s(ht),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(o.value.description.join(" ")),1)],8,$R)):G("",!0)]),b("div",CR,[b("button",{type:"button","data-action":"cancel",disabled:i.value,class:"inline-flex h-button flex-1 items-center justify-center rounded-control border border-border-strong bg-surface font-semibold hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60",onClick:k[2]||(k[2]=E=>v(!1))},$(s(h)("backend::lang.form.cancel")),9,SR),b("button",{type:"submit","data-action":"save-caption","data-hotkey":"mod+s mod+enter","aria-keyshortcuts":s(ju)("mod+s mod+enter"),title:s(Vn)(s(h)("backend::lang.fileupload.details_submit"),"mod+s"),disabled:i.value,class:"inline-flex h-button flex-1 items-center justify-center rounded-control bg-primary font-semibold text-on-primary hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60"},$(i.value?s(h)("backend::lang.form.saving"):s(h)("backend::lang.fileupload.details_submit")),9,ER)])],32)]),_:1})]),_:1})]),_:1},8,["open"]),L(qr,{open:s(u).request.value!==null,message:s(u).request.value?.message??"","confirm-label":s(u).request.value?.confirmLabel,danger:s(u).request.value?.danger,onConfirm:s(u).confirm,onCancel:s(u).cancel},null,8,["open","message","confirm-label","danger","onConfirm","onCancel"])],64))}}),TR=["id","data-field-name","aria-labelledby","aria-describedby","aria-busy"],DR={key:0,"data-fileupload-loading":"",class:"h-[112px] rounded-control bg-skel","aria-hidden":"true"},OR={key:1,role:"alert","data-fileupload-failed":"",class:"rounded-inner bg-danger-soft px-[18px] py-3.5 text-danger"},MR={key:0,"data-fileupload-empty":"",class:"flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 text-muted"},IR={key:1,"data-fileupload-grid":"",class:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-4"},PR=["data-file-item","data-state","onDragover","onDrop"],RR={class:"relative flex aspect-square items-center justify-center bg-subtle"},qR=["href","aria-label"],LR=["src","alt","onError"],NR=["aria-label","onClick"],BR=["src","alt"],FR={key:2,"data-preview-unavailable":"",class:"flex flex-col items-center gap-2 text-[13px] text-muted"},VR=["data-handle","aria-label","onKeydown","onDragstart"],zR={key:5,class:"absolute top-2 right-2 flex gap-1"},jR=["data-caption","aria-label","onClick"],UR=["aria-label","onClick"],HR=["aria-label","onClick"],KR={class:"flex flex-col gap-1 p-2"},WR=["title"],GR={class:"flex items-center gap-2 text-[13px] text-muted tabular-nums"},YR={key:0},JR={key:1},ZR={key:2},XR={key:3,"data-unsaved-chip":"",class:"inline-flex h-6 items-center rounded-pill bg-sel px-2 text-[13px] font-semibold text-text"},QR={key:1,"data-file-error":"",class:"text-[13px] text-danger"},eq={class:"sr-only"},tq={key:2,"data-fileupload-single":"",class:"flex flex-col gap-2"},nq=["data-file-item","data-state"],aq=["src","alt","onError"],rq={key:3,"data-preview-unavailable":"",class:"flex flex-col items-center gap-2 text-[13px] text-muted"},lq={class:"flex min-w-0 flex-1 flex-col gap-1"},oq=["title"],sq={class:"flex items-center gap-2 text-[13px] text-muted tabular-nums"},iq={key:0},uq={key:1},cq={key:2},dq={key:3,"data-unsaved-chip":"",class:"inline-flex h-6 items-center rounded-pill bg-sel px-2 text-[13px] font-semibold text-text"},fq={key:1,"data-file-error":"",class:"text-[13px] text-danger"},pq={class:"sr-only"},vq={key:2,class:"mt-1 flex flex-wrap gap-2"},mq={key:3,"data-fileupload-rows":"",class:"flex flex-col gap-2"},hq=["data-file-item","data-state","onDragover","onDrop"],yq={class:"flex items-center gap-3"},gq=["data-handle","aria-label","onKeydown","onDragstart"],bq={class:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-pager bg-subtle"},_q=["src","onError"],xq={class:"flex min-w-0 flex-1 flex-col leading-tight"},kq=["title"],wq=["title"],$q=["title"],Cq={class:"flex shrink-0 items-center gap-2 text-[13px] text-muted tabular-nums"},Sq={key:0},Eq={key:1},Aq={key:2},Tq={key:3,"data-unsaved-chip":"",class:"inline-flex h-6 items-center rounded-pill bg-sel px-2 text-[13px] font-semibold text-text"},Dq={class:"flex shrink-0 items-center gap-1"},Oq=["href","aria-label"],Mq=["aria-label","onClick"],Iq=["data-caption","aria-label","onClick"],Pq=["aria-label","onClick"],Rq=["aria-label","onClick"],qq={key:1,"data-file-error":"",class:"text-[13px] text-danger"},Lq={class:"sr-only"},Nq=["aria-describedby"],Bq={class:"flex size-10 items-center justify-center rounded-full bg-surface","aria-hidden":"true"},Fq={class:"text-text"},Vq={key:0,"data-fileupload-limits":"",class:"text-[13px] text-muted tabular-nums"},zq={key:5,"data-fileupload-limits":"",class:"text-[13px] text-muted tabular-nums"},jq={key:6,role:"alert","data-fileupload-too-many":"",class:"flex items-center gap-1.5 text-[13px] text-danger"},Uq=["accept","multiple"],Hq={class:"sr-only","aria-live":"polite","data-fileupload-live":""},Kq=1<<20,Wq=400,Wc="inline-flex size-8 items-center justify-center rounded-pager border border-border bg-surface text-muted hover:text-text",Gq="inline-flex size-8 items-center justify-center rounded-pager border border-border bg-surface text-muted hover:bg-danger-soft hover:text-danger",Al="inline-flex size-8 shrink-0 items-center justify-center rounded-pager text-muted hover:bg-hover hover:text-text",Yq=le({__name:"FileuploadField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},setup(e){const t=e,n=it(co,null),a=["jpg","jpeg","png","gif","webp"],r=["image/jpeg","image/png","image/gif","image/webp"];let l=1;const o=A([]),i=A("loading"),u=A(!1),d=A(0),c=A(""),f=A(null),m=A(null),v=A(null),y=A(null),x=A(null),C=A(!1),k=A({}),E=A(new Set),B=A(new Set),O=new Set,T=[],P=n?n.routes(t.field.name):null;let R=null,H=null,S=!1,I=null,z=0,D=!1;const N=_(()=>{const Q=t.field.attributes?.readonly;return!!t.field.readOnly||Q!=null&&Q!==!1}),X=_(()=>t.field.multiple===!0),W=_(()=>t.field.mode==="image"),K=_(()=>X.value?t.field.maxFiles:1),ae=_(()=>(n?.recordId??0)!==0),se=_(()=>o.value.filter(Q=>Q.state!=="failed")),he=_(()=>{if(X.value)return o.value;const Q=se.value,De=Q[Q.length-1];return o.value.filter(re=>re.state==="failed"||re===De)}),ge=_(()=>he.value.filter(Q=>Q.state!=="failed").length),oe=_(()=>N.value||i.value!=="ready"?!1:X.value?K.value===void 0||K.value===null||se.value.lengthX.value&&!N.value&&typeof K.value=="number"&&se.value.length>=K.value),ue=_(()=>t.field.fileTypes?.length?t.field.fileTypes.map(Q=>Q.toLowerCase()):W.value&&!t.field.mimeTypes?.length?a:null),j=_(()=>(t.field.fileTypes?.length?t.field.fileTypes:t.field.mimeTypes??[]).join(", ")),xe=_(()=>{const Q=[];for(const De of t.field.fileTypes??[])Q.push(`.${De.toLowerCase()}`);for(const De of t.field.mimeTypes??[])Q.push(De.includes("/")?De:`.${De.toLowerCase()}`);return Q.length===0&&W.value&&Q.push(...r),Q.length>0?Q.join(","):void 0}),_e=_(()=>t.field.prompt||h(X.value?"backend::lang.fileupload.default_prompt_many":"backend::lang.fileupload.default_prompt"));function Y(Q,De){return new Intl.NumberFormat(Wn.value,{minimumFractionDigits:De,maximumFractionDigits:De}).format(Q)}function me(Q){const De=["B","kB","MB","GB"];let re=Q,qe=0;for(;re>=1e3&&qe{const Q=t.field.maxFilesize;return typeof Q=="number"?`${new Intl.NumberFormat(Wn.value).format(Q)} MB`:""}),ee=_(()=>{const Q=[];return j.value!==""&&Q.push(h("backend::lang.fileupload.limits_types",{types:j.value})),J.value!==""&&Q.push(h("backend::lang.fileupload.limits_size",{size:J.value})),X.value&&typeof K.value=="number"&&Q.push(h("backend::lang.fileupload.limits_count",{current:se.value.length,max:K.value})),Q.join(" · ")});function ne(Q){const De=Q.lastIndexOf(".");return De<0?"":Q.slice(De+1).toLowerCase()}function w(Q){const De=t.field.mimeTypes??[];if(De.length===0||Q.type==="")return!0;const re=Q.type.toLowerCase(),qe=ne(Q.name);return De.some(at=>{const Pt=at.toLowerCase();return Pt.includes("/")?Pt.endsWith("/*")?re.startsWith(Pt.slice(0,-1)):re===Pt:Pt===qe})}function M(Q){const De=ue.value;if(De&&!De.includes(ne(Q.name)))return h("backend::lang.fileupload.wrong_type",{name:Q.name,types:De.join(", ")});if(!w(Q))return h("backend::lang.fileupload.wrong_type",{name:Q.name,types:j.value});const re=t.field.maxFilesize;return typeof re=="number"&&Q.size>Math.ceil(re*Kq)?h("backend::lang.fileupload.too_large",{name:Q.name,size:J.value}):""}function q(Q){return zn({uid:l++,name:Q.file_name,size:Q.file_size,state:"done",progress:100,error:"",retryable:!1,file:Q,source:null,handle:null,uploadId:""})}function ie(){return globalThis.crypto?.randomUUID?.()??`u${Date.now().toString(36)}${Math.random().toString(36).slice(2,10)}`}function te(Q,De){return zn({uid:l++,name:Q.name,size:Q.size,state:De===""?"queued":"failed",progress:0,error:De,retryable:!1,file:null,source:_i(Q),handle:null,uploadId:ie()})}function fe(Q){return o.value.find(De=>De.uid===Q)}async function Ee(Q){if(!P){i.value="failed";return}Q&&(i.value="loading");const De=await P.list();if(D)return;if(!De.data){Q&&(i.value="failed");return}const re=o.value.filter(qe=>qe.state!=="done");for(const qe of o.value)qe.state==="done"&&_a(qe.uid);o.value=[...De.data.map(q),...re],i.value="ready"}function Se(){N.value||f.value?.click()}function Te(Q){if(Q.length===0||N.value)return;if(d.value=0,!X.value)for(const at of[...o.value])at.state!=="failed"&&(at.state!=="done"||at.file?.pending)&&ot(at);let De=X.value?typeof K.value=="number"?Math.max(K.value-se.value.length,0):Number.POSITIVE_INFINITY:1,re=0;const qe=[];for(const at of Q.slice(0,X.value?Q.length:1)){const Pt=M(at);if(Pt===""&&De<=0){re++;continue}Pt===""&&De--,qe.push(te(at,Pt))}o.value=[...o.value,...qe],d.value=re,Fe()}function de(Q){const De=Q.target;Te(Array.from(De.files??[])),De.value=""}function $e(Q){return v.value===null&&Array.from(Q.dataTransfer?.types??[]).includes("Files")}function ke(Q){$e(Q)&&(Q.preventDefault(),u.value=!0)}function Le(Q){$e(Q)&&(Q.preventDefault(),u.value=!1,Te(Array.from(Q.dataTransfer?.files??[])))}function Fe(){if(!P||o.value.some(De=>De.state==="uploading"))return;const Q=o.value.find(De=>De.state==="queued");Q&&Ke(Q)}async function Ke(Q){if(!P||!Q.source)return;Q.state="uploading",Q.progress=0,Q.error="",Q.retryable=!1;const De=new Set(o.value.filter(qe=>qe.file).map(qe=>qe.file.id)),re=n?.beginUpload();try{const qe=P.upload(Q.source,(Jn,Ja)=>{Q.progress=Ja>0?Math.min(100,Math.round(Jn/Ja*100)):0},Q.uploadId||void 0);Q.handle=_i(qe);const at=await qe.promise;Q.handle=null;const Pt=!!fe(Q.uid);if(at.ok)!Pt||D?P.remove(at.item.id):(Q.state="done",Q.progress=100,Q.file=at.item,Q.name=at.item.file_name,Q.size=at.item.file_size,n?.markDirty());else if(at.reason==="aborted"||at.reason==="network"){const Jn=await tt(De);if(at.reason==="aborted"){for(const Ja of Jn)P.remove(Ja.id);o.value=o.value.filter(Ja=>Ja.uid!==Q.uid),_a(Q.uid)}else Pt&&Jn[0]&&Jn.length===1?(Q.state="done",Q.progress=100,Q.file=Jn[0],Q.name=Jn[0].file_name,Q.size=Jn[0].file_size,n?.markDirty()):(Q.state="failed",Q.error=h("backend::lang.fileupload.upload_failed"),Q.retryable=!0)}else if(Pt)switch(Q.state="failed",at.reason){case"too_large":Q.error=J.value?h("backend::lang.fileupload.too_large",{name:Q.name,size:J.value}):at.message||h("backend::lang.fileupload.upload_failed");break;case"invalid":Q.error=at.message||h("backend::lang.fileupload.upload_failed");break;default:Q.error=at.message||h("backend::lang.fileupload.upload_failed"),Q.retryable=at.status>=500}}finally{re?.(),D||Fe()}}async function tt(Q){if(!P)return[];const De=await P.list();return De.data?De.data.filter(re=>re.pending&&!Q.has(re.id)):[]}function et(Q){Q.state!=="failed"||!Q.source||(Q.state="queued",Q.error="",Q.retryable=!1,Fe())}async function ot(Q){const De=o.value.findIndex(qe=>qe.uid===Q.uid);if(De<0)return;switch(o.value=o.value.filter(qe=>qe.uid!==Q.uid),_a(Q.uid),Q.state){case"uploading":Q.handle?.abort(),n?.markDirty(),Fe();return;case"queued":case"failed":return}if(!P||!Q.file)return;n?.markDirty();const re=await P.remove(Q.file.id);if(!re.data&&!D){const qe=[...o.value];qe.splice(Math.min(De,qe.length),0,Q),o.value=qe,Ie(re.error?.message||h("backend::lang.form.error_generic"),"danger")}}function rt(){return o.value.map(Q=>Q.uid)}function Tt(Q){const De=new Map(o.value.map(at=>[at.uid,at])),re=Q.map(at=>De.get(at)).filter(at=>!!at),qe=o.value.filter(at=>!Q.includes(at.uid));o.value=[...re,...qe]}function Ot(){R!==null&&clearTimeout(R),R=setTimeout(()=>{R=null,ze()},Wq)}function zt(){return o.value.filter(Q=>Q.state==="done"&&Q.file).map(Q=>Q.file.id)}async function ze(){if(!P)return;const Q=zt();if(S){I=Q;return}const De=H;H=null;const re=++z;S=!0;try{const qe=await P.reorder(Q);if(I)return;!qe.data&&!D&&re===z&&(De&&Tt(De),Ie(h("backend::lang.fileupload.reorder_failed"),"danger"))}finally{S=!1,I&&(I=null,ze())}}function Ve(Q,De){const re=o.value.findIndex(Pt=>Pt.uid===Q);if(re<0||De<0||De>=o.value.length||De===re)return!1;H===null&&(H=rt());const qe=[...o.value],[at]=qe.splice(re,1);return qe.splice(De,0,at),o.value=qe,c.value=h("backend::lang.fileupload.moved",{name:at.name,position:De+1,total:qe.length}),Ot(),!0}async function We(Q,De){const re=o.value.findIndex(at=>at.uid===De.uid);let qe;switch(Q.key){case"ArrowUp":case"ArrowLeft":qe=re-1;break;case"ArrowDown":case"ArrowRight":qe=re+1;break;default:return}Q.preventDefault(),Ve(De.uid,qe)&&(await He(),m.value?.querySelector(`[data-handle="${De.uid}"]`)?.focus())}function Nt(Q,De){v.value=De.uid,Q.dataTransfer&&(Q.dataTransfer.effectAllowed="move",Q.dataTransfer.setData("text/plain",De.name))}function rn(Q,De){v.value!==null&&(Q.preventDefault(),y.value=De.uid)}function Wa(Q,De){v.value!==null&&(Q.preventDefault(),Ve(v.value,o.value.findIndex(re=>re.uid===De.uid)),ba())}function ba(){v.value=null,y.value=null}function Nn(Q){const De=Q.file?.content_type??Q.source?.type??"";return r.includes(De.toLowerCase())}function Wt(Q){return!Q.file||!Nn(Q)||E.value.has(Q.uid)?null:!t.field.protected&&!B.value.has(Q.uid)?Q.file.thumb_url||Q.file.url||null:k.value[Q.uid]??null}function Ga(){return typeof URL.revokeObjectURL=="function"}function _a(Q){const De=k.value[Q];if(De!==void 0){Ga()&&URL.revokeObjectURL(De);const re={...k.value};delete re[Q],k.value=re}if(O.delete(Q),B.value.has(Q)){const re=new Set(B.value);re.delete(Q),B.value=re}}async function Ya(Q){if(!P||!Q.file||O.has(Q.uid)||typeof URL.createObjectURL!="function")return;O.add(Q.uid);const De=await P.thumb(Q.file.id);if(!(D||!fe(Q.uid)||!O.has(Q.uid))){if(!De){E.value=new Set([...E.value,Q.uid]);return}k.value={...k.value,[Q.uid]:URL.createObjectURL(De)}}}Ne(()=>o.value.map(Q=>`${Q.uid}:${Q.state}`).join(","),()=>{if(t.field.protected)for(const Q of o.value)Q.state==="done"&&Nn(Q)&&Ya(Q)});function Ce(Q){if(!t.field.protected&&!B.value.has(Q.uid)&&(B.value=new Set([...B.value,Q.uid]),P&&typeof URL.createObjectURL=="function")){Ya(Q);return}E.value=new Set([...E.value,Q.uid])}async function Be(Q,De){if(!P||!Q.file||typeof URL.createObjectURL!="function")return;const re=await P.download(Q.file.id);if(!re){Ie(h("backend::lang.form.error_generic"),"danger");return}const qe=URL.createObjectURL(re);T.push(qe);const at=document.createElement("a");at.href=qe,at.rel="noopener",De?at.download=Q.file.file_name:at.target="_blank",at.click()}function Ge(Q){return t.field.useCaption&&Q.file?.title?Q.file.title:Q.name}function st(Q){return ae.value&&!!Q.file?.pending}const kt=_(()=>x.value===null?void 0:fe(x.value));function Mt(Q){x.value=Q.uid,C.value=!0}function Br(Q){const De=kt.value;De&&(De.file=Q)}function vo(){const Q=x.value;x.value=null,Q!==null&&m.value?.querySelector(`[data-caption="${Q}"]`)?.focus()}const mo=_(()=>{const Q=t.field.thumbOptions?.mode;return Q==="fit"||Q==="auto"?"object-contain":"object-cover"});return xt(()=>{Ee(!0)}),n&&Ne(n.revision,()=>{Ee(!1)}),Et(()=>{D=!0,R!==null&&(clearTimeout(R),R=null);for(const Q of o.value)Q.handle?.abort();if(Ga()){for(const Q of Object.values(k.value))URL.revokeObjectURL(Q);for(const Q of T)URL.revokeObjectURL(Q)}}),(Q,De)=>(p(),g("div",{id:e.controlId,ref_key:"root",ref:m,role:"group","data-fileupload":"","data-field-name":e.field.name,"aria-labelledby":e.field.label?`${e.controlId}-label`:void 0,"aria-describedby":e.describedBy||void 0,"aria-busy":i.value==="loading"?"true":void 0,class:"flex min-w-0 flex-col gap-4"},[i.value==="loading"?(p(),g("span",DR)):i.value==="failed"?(p(),g("p",OR,$(s(h)("backend::lang.fileupload.load_failed")),1)):(p(),g(ve,{key:2},[N.value&&he.value.length===0?(p(),g("p",MR,$(s(h)("backend::lang.fileupload.empty")),1)):W.value&&X.value&&he.value.length>0?(p(),g("ul",IR,[(p(!0),g(ve,null,Me(he.value,re=>(p(),g("li",{key:re.uid,"data-file-item":re.uid,"data-state":re.state,class:pe([[re.state==="failed"?"border-danger":"border-border",v.value===re.uid?"opacity-50":"",y.value===re.uid&&v.value!==re.uid?"border-2 border-dashed border-primary bg-sel":""],"relative overflow-hidden rounded-inner border bg-surface"]),onDragover:qe=>rn(qe,re),onDrop:qe=>Wa(qe,re)},[b("div",RR,[re.state==="uploading"?(p(),U(s(Oa),{key:0,size:20,class:"animate-spin text-muted","aria-hidden":"true"})):re.state==="failed"?(p(),U(s(ht),{key:1,size:16,class:"text-danger","aria-hidden":"true"})):re.state==="done"?(p(),g(ve,{key:2},[Wt(re)&&!e.field.protected&&re.file?.url?(p(),g("a",{key:0,href:re.file.url,target:"_blank",rel:"noopener",class:"block size-full","aria-label":s(h)("backend::lang.fileupload.open_preview",{name:re.name})},[b("img",{src:Wt(re)??void 0,alt:Ge(re),class:pe([mo.value,"size-full"]),onError:qe=>Ce(re)},null,42,LR)],8,qR)):Wt(re)?(p(),g("button",{key:1,type:"button",class:"block size-full","aria-label":s(h)("backend::lang.fileupload.open_preview",{name:re.name}),onClick:qe=>Be(re,!1)},[b("img",{src:Wt(re)??void 0,alt:Ge(re),class:pe([mo.value,"size-full"])},null,10,BR)],8,NR)):E.value.has(re.uid)?(p(),g("span",FR,[L(s(nm),{size:20,"aria-hidden":"true"}),ye(" "+$(s(h)("backend::lang.fileupload.preview_unavailable")),1)])):(p(),U(s(ql),{key:3,size:20,class:"text-muted","aria-hidden":"true"}))],64)):(p(),U(s(ql),{key:3,size:20,class:"text-muted","aria-hidden":"true"})),!N.value&&re.state==="done"?(p(),g("button",{key:4,type:"button",draggable:"true","data-handle":re.uid,"aria-label":s(h)("backend::lang.fileupload.move",{name:re.name}),class:pe([Wc,"absolute top-2 left-2 cursor-grab"]),onKeydown:qe=>We(qe,re),onDragstart:qe=>Nt(qe,re),onDragend:ba},[L(s(Bi),{size:16,"aria-hidden":"true"})],40,VR)):G("",!0),N.value?G("",!0):(p(),g("div",zR,[e.field.useCaption&&re.state==="done"?(p(),g("button",{key:0,type:"button","data-caption":re.uid,"aria-label":s(h)("backend::lang.fileupload.edit_details",{name:re.name}),class:pe(Wc),onClick:qe=>Mt(re)},[L(s(Wo),{size:16,"aria-hidden":"true"})],8,jR)):G("",!0),re.state==="failed"&&re.retryable?(p(),g("button",{key:1,type:"button","data-action":"retry","aria-label":s(h)("backend::lang.fileupload.retry"),class:pe(Wc),onClick:qe=>et(re)},[L(s(pi),{size:16,"aria-hidden":"true"})],8,UR)):G("",!0),b("button",{type:"button","data-action":"remove-file","aria-label":re.state==="uploading"||re.state==="queued"?s(h)("backend::lang.fileupload.cancel_upload",{name:re.name}):s(h)("backend::lang.form.remove_item",{name:re.name}),class:pe(Gq),onClick:qe=>ot(re)},[L(s(Xt),{size:16,"aria-hidden":"true"})],8,HR)]))]),b("div",KR,[b("span",{class:"truncate text-[13px]",title:Ge(re)},$(Ge(re)),9,WR),b("span",GR,[re.state==="queued"?(p(),g("span",YR,$(s(h)("backend::lang.fileupload.queued")),1)):re.state==="uploading"?(p(),g("span",JR,$(s(h)("backend::lang.fileupload.uploading",{percent:re.progress})),1)):(p(),g("span",ZR,$(me(re.size)),1)),st(re)?(p(),g("span",XR,$(s(h)("backend::lang.fileupload.unsaved")),1)):G("",!0)]),re.state==="uploading"?(p(),U(s(Nc),{key:0,"model-value":re.progress,max:100,"aria-label":s(h)("backend::lang.fileupload.uploading",{percent:re.progress}),class:"h-1 w-full overflow-hidden rounded-pill bg-subtle"},{default:F(()=>[L(s(Bc),{class:"h-full bg-primary",style:cn({width:`${re.progress}%`})},null,8,["style"])]),_:2},1032,["model-value","aria-label"])):G("",!0),re.state==="failed"?(p(),g("p",QR,[b("span",eq,$(s(h)("backend::lang.fileupload.upload_error"))+": ",1),ye($(re.error),1)])):G("",!0)])],42,PR))),128))])):W.value&&!X.value&&he.value.length>0?(p(),g("div",tq,[(p(!0),g(ve,null,Me(he.value,re=>(p(),g("div",{key:re.uid,"data-file-item":re.uid,"data-state":re.state,class:"flex items-start gap-4"},[b("div",{class:pe([re.state==="failed"?"border-danger":"border-border","flex size-40 shrink-0 items-center justify-center overflow-hidden rounded-inner border bg-subtle"])},[re.state==="uploading"?(p(),U(s(Oa),{key:0,size:20,class:"animate-spin text-muted","aria-hidden":"true"})):re.state==="failed"?(p(),U(s(ht),{key:1,size:16,class:"text-danger","aria-hidden":"true"})):Wt(re)?(p(),g("img",{key:2,src:Wt(re)??void 0,alt:Ge(re),class:pe([mo.value,"size-full"]),onError:qe=>Ce(re)},null,42,aq)):E.value.has(re.uid)?(p(),g("span",rq,[L(s(nm),{size:20,"aria-hidden":"true"}),ye(" "+$(s(h)("backend::lang.fileupload.preview_unavailable")),1)])):(p(),U(s(ql),{key:4,size:20,class:"text-muted","aria-hidden":"true"}))],2),b("div",lq,[b("span",{class:"truncate font-semibold",title:Ge(re)},$(Ge(re)),9,oq),b("span",sq,[re.state==="queued"?(p(),g("span",iq,$(s(h)("backend::lang.fileupload.queued")),1)):re.state==="uploading"?(p(),g("span",uq,$(s(h)("backend::lang.fileupload.uploading",{percent:re.progress})),1)):(p(),g("span",cq,$(me(re.size)),1)),st(re)?(p(),g("span",dq,$(s(h)("backend::lang.fileupload.unsaved")),1)):G("",!0)]),re.state==="uploading"?(p(),U(s(Nc),{key:0,"model-value":re.progress,max:100,"aria-label":s(h)("backend::lang.fileupload.uploading",{percent:re.progress}),class:"h-1 w-full overflow-hidden rounded-pill bg-subtle"},{default:F(()=>[L(s(Bc),{class:"h-full bg-primary",style:cn({width:`${re.progress}%`})},null,8,["style"])]),_:2},1032,["model-value","aria-label"])):G("",!0),re.state==="failed"?(p(),g("p",fq,[b("span",pq,$(s(h)("backend::lang.fileupload.upload_error"))+": ",1),ye($(re.error),1)])):G("",!0),N.value?G("",!0):(p(),g("div",vq,[re.state!=="failed"?(p(),U(Ue,{key:0,size:"sm",variant:"outline","data-action":"replace-file",icon:s(Go),onClick:Se},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.replace_file")),1)]),_:1},8,["icon"])):G("",!0),re.state==="failed"&&re.retryable?(p(),U(Ue,{key:1,size:"sm",variant:"outline","data-action":"retry",icon:s(pi),onClick:qe=>et(re)},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.retry")),1)]),_:1},8,["icon","onClick"])):G("",!0),e.field.useCaption&&re.state==="done"?(p(),U(Ue,{key:2,size:"sm",variant:"outline","data-caption":re.uid,icon:s(Wo),onClick:qe=>Mt(re)},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.details_submit")),1)]),_:1},8,["data-caption","icon","onClick"])):G("",!0),L(Ue,{size:"sm",variant:"danger","data-action":"remove-file",icon:s(Xt),onClick:qe=>ot(re)},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.remove_file")),1)]),_:1},8,["icon","onClick"])]))])],8,nq))),128))])):he.value.length>0?(p(),g("ul",mq,[(p(!0),g(ve,null,Me(he.value,re=>(p(),g("li",{key:re.uid,"data-file-item":re.uid,"data-state":re.state,class:pe([[re.state==="failed"?"border-danger":"border-border",v.value===re.uid?"opacity-50":"",y.value===re.uid&&v.value!==re.uid?"border-2 border-dashed border-primary bg-sel":""],"flex min-h-14 flex-col justify-center gap-1 rounded-inner border bg-surface px-3 py-2"]),onDragover:qe=>rn(qe,re),onDrop:qe=>Wa(qe,re)},[b("div",yq,[X.value&&!N.value&&re.state==="done"?(p(),g("button",{key:0,type:"button",draggable:"true","data-handle":re.uid,"aria-label":s(h)("backend::lang.fileupload.move",{name:re.name}),class:pe([Al,"cursor-grab"]),onKeydown:qe=>We(qe,re),onDragstart:qe=>Nt(qe,re),onDragend:ba},[L(s(Bi),{size:16,"aria-hidden":"true"})],40,gq)):G("",!0),b("span",bq,[re.state==="uploading"?(p(),U(s(Oa),{key:0,size:16,class:"animate-spin text-muted","aria-hidden":"true"})):re.state==="failed"?(p(),U(s(ht),{key:1,size:16,class:"text-danger","aria-hidden":"true"})):Wt(re)?(p(),g("img",{key:2,src:Wt(re)??void 0,alt:"",class:"size-8 object-cover",onError:qe=>Ce(re)},null,40,_q)):(p(),U(s(ql),{key:3,size:16,class:"text-muted","aria-hidden":"true"}))]),b("span",xq,[e.field.useCaption&&re.file?.title?(p(),g(ve,{key:0},[b("span",{class:"truncate font-semibold",title:re.file.title},$(re.file.title),9,kq),b("span",{class:"truncate text-[13px] text-muted",title:re.name},$(re.name),9,wq)],64)):(p(),g("span",{key:1,class:"truncate",title:re.name},$(re.name),9,$q))]),b("span",Cq,[re.state==="queued"?(p(),g("span",Sq,$(s(h)("backend::lang.fileupload.queued")),1)):re.state==="uploading"?(p(),g("span",Eq,$(s(h)("backend::lang.fileupload.uploading",{percent:re.progress})),1)):(p(),g("span",Aq,$(me(re.size)),1)),st(re)?(p(),g("span",Tq,$(s(h)("backend::lang.fileupload.unsaved")),1)):G("",!0)]),!X.value&&!N.value&&re.state!=="failed"?(p(),U(Ue,{key:1,size:"sm",variant:"outline","data-action":"replace-file",icon:s(Go),onClick:Se},{default:F(()=>[ye($(s(h)("backend::lang.fileupload.replace_file")),1)]),_:1},8,["icon"])):G("",!0),b("span",Dq,[re.state==="done"&&re.file?(p(),g(ve,{key:0},[!e.field.protected&&re.file.url?(p(),g("a",{key:0,href:re.file.url,download:"",target:"_blank",rel:"noopener","aria-label":s(h)("backend::lang.fileupload.download",{name:re.name}),class:pe(Al)},[L(s(wd),{size:16,"aria-hidden":"true"})],8,Oq)):e.field.protected?(p(),g("button",{key:1,type:"button","data-action":"download","aria-label":s(h)("backend::lang.fileupload.download",{name:re.name}),class:pe(Al),onClick:qe=>Be(re,!0)},[L(s(wd),{size:16,"aria-hidden":"true"})],8,Mq)):G("",!0),e.field.useCaption&&!N.value?(p(),g("button",{key:2,type:"button","data-caption":re.uid,"aria-label":s(h)("backend::lang.fileupload.edit_details",{name:re.name}),class:pe(Al),onClick:qe=>Mt(re)},[L(s(Wo),{size:16,"aria-hidden":"true"})],8,Iq)):G("",!0)],64)):G("",!0),re.state==="failed"&&re.retryable?(p(),g("button",{key:1,type:"button","data-action":"retry","aria-label":s(h)("backend::lang.fileupload.retry"),class:pe(Al),onClick:qe=>et(re)},[L(s(pi),{size:16,"aria-hidden":"true"})],8,Pq)):G("",!0),N.value?G("",!0):(p(),g("button",{key:2,type:"button","data-action":"remove-file","aria-label":re.state==="uploading"||re.state==="queued"?s(h)("backend::lang.fileupload.cancel_upload",{name:re.name}):s(h)("backend::lang.form.remove_item",{name:re.name}),class:pe([Al,"hover:bg-danger-soft hover:text-danger"]),onClick:qe=>ot(re)},[L(s(Xt),{size:16,"aria-hidden":"true"})],8,Rq))])]),re.state==="uploading"?(p(),U(s(Nc),{key:0,"model-value":re.progress,max:100,"aria-label":s(h)("backend::lang.fileupload.uploading",{percent:re.progress}),class:"h-1 w-full overflow-hidden rounded-pill bg-subtle"},{default:F(()=>[L(s(Bc),{class:"h-full bg-primary",style:cn({width:`${re.progress}%`})},null,8,["style"])]),_:2},1032,["model-value","aria-label"])):G("",!0),re.state==="failed"?(p(),g("p",qq,[b("span",Lq,$(s(h)("backend::lang.fileupload.upload_error"))+": ",1),ye($(re.error),1)])):G("",!0)],42,hq))),128))])):G("",!0),oe.value?(p(),g("button",{key:4,type:"button","data-fileupload-dropzone":"","aria-describedby":e.describedBy||void 0,class:pe([[u.value?"border-solid border-primary bg-sel":e.invalid?"border-dashed border-danger bg-subtle":"border-dashed border-border-strong bg-subtle"],"flex min-h-[112px] w-full flex-col items-center justify-center gap-2 rounded-control border-[1.5px] px-4 py-6 text-center transition-colors duration-150 ease-out hover:bg-hover"]),onClick:Se,onDragover:ke,onDragleave:De[0]||(De[0]=re=>u.value=!1),onDrop:Le},[b("span",Bq,[L(s(Go),{size:20,class:"text-muted"})]),b("span",Fq,$(_e.value),1),ee.value!==""?(p(),g("span",Vq,$(ee.value),1)):G("",!0)],42,Nq)):Z.value&&ee.value!==""?(p(),g("p",zq,$(ee.value),1)):G("",!0),d.value>0?(p(),g("p",jq,[L(s(ht),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(s(rl)("backend::lang.fileupload.too_many",d.value,{max:K.value??0})),1)])):G("",!0)],64)),b("input",{ref_key:"input",ref:f,type:"file",hidden:"",tabindex:"-1","data-fileupload-input":"",accept:xe.value,multiple:X.value||void 0,onChange:de},null,40,Uq),b("p",Hq,$(c.value),1),e.field.useCaption?(p(),U(AR,{key:3,open:C.value,"onUpdate:open":De[1]||(De[1]=re=>C.value=re),file:kt.value?.file??null,routes:s(P),preview:kt.value?Wt(kt.value):null,"id-prefix":e.controlId,onSaved:Br,onClosed:vo},null,8,["open","file","routes","preview","id-prefix"])):G("",!0)],8,TR))}}),Jq=["id","name","value","required","aria-required","aria-invalid","aria-describedby"],Zq=le({__name:"NumberField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>n.modelValue===null||n.modelValue===void 0?"":String(n.modelValue)),l=_(()=>Nr(n.field));function o(i){const u=i.target.value.trim();if(u===""){a("update:modelValue",null);return}const d=Number(u);a("update:modelValue",Number.isFinite(d)?d:null)}return(i,u)=>(p(),g("input",je({id:e.controlId},l.value,{name:e.field.name,type:"number",inputmode:"decimal",value:r.value,required:e.field.required||void 0,"aria-required":e.field.required?"true":void 0,"aria-invalid":e.invalid?"true":void 0,"aria-describedby":e.describedBy||void 0,class:[s(Lt)(e.invalid),"h-input tabular-nums"],onInput:o}),null,16,Jq))}}),Xq=["id","aria-labelledby","aria-describedby"],Qq=le({__name:"PartialField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},setup(e){const t=e,n=it(R0,A(0));return(a,r)=>(p(),g("div",{id:e.controlId,role:"group","data-partial-field":"","aria-labelledby":t.field.label?`${e.controlId}-label`:void 0,"aria-describedby":e.describedBy||void 0},[e.source?(p(),U(bp,{key:0,variant:"field",source:e.source,name:t.field.path||t.field.name,"record-id":e.recordId??null,"reload-key":s(n)},null,8,["source","name","record-id","reload-key"])):(p(),U(Uu,{key:1,"data-partial-failed":"",text:s(h)("backend::lang.extension.partial_failed")},null,8,["text"]))],8,Xq))}}),eL={class:"flex min-w-0 flex-col gap-1.5"},tL={class:"relative"},nL=["id","name","type","value","placeholder","disabled","required","aria-required","aria-invalid","aria-describedby"],aL=["aria-pressed","aria-label","disabled"],rL=["id","data-secret-state","role"],lL={key:3},oL=le({__name:"PasswordField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=A(!1),l=_(()=>typeof n.modelValue=="string"?n.modelValue:""),o=_(()=>Nr(n.field)),i=it(co,null);i&&Ne(i.revision,()=>{r.value=!1});const u=it(L0,null),d=_(()=>u?.value[n.field.name]??""),c=_(()=>d.value!==""),f=_(()=>d.value==="stored"&&n.modelValue===null),m=_(()=>`${n.controlId}-secret`),v=_(()=>[n.describedBy??"",c.value?m.value:""].filter(Boolean).join(" ")),y=_(()=>{if(d.value==="stored"&&!f.value)return h("backend::lang.secret.placeholder_stored");const k=o.value.placeholder;return typeof k=="string"?k:void 0});function x(){r.value=!1,a("update:modelValue",null)}function C(){a("update:modelValue","")}return(k,E)=>(p(),g("div",eL,[b("div",tL,[b("input",je({id:e.controlId,autocomplete:"new-password",spellcheck:"false"},o.value,{name:e.field.name,type:r.value?"text":"password",value:f.value?"":l.value,placeholder:y.value,disabled:f.value||void 0,required:e.field.required||void 0,"aria-required":e.field.required?"true":void 0,"aria-invalid":e.invalid?"true":void 0,"aria-describedby":v.value||void 0,class:[s(Lt)(e.invalid),"h-input pr-12"],onInput:E[0]||(E[0]=B=>a("update:modelValue",B.target.value))}),null,16,nL),b("button",{type:"button","data-password-toggle":"","aria-pressed":r.value?"true":"false","aria-label":s(h)(r.value?"backend::lang.form.hide_password":"backend::lang.form.show_password"),disabled:f.value||void 0,class:"absolute top-1/2 right-1.5 flex size-8 -translate-y-1/2 items-center justify-center rounded-pager text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text disabled:opacity-60",onClick:E[1]||(E[1]=B=>r.value=!r.value)},[(p(),U(Kt(r.value?s(Z$):s(Q$)),{size:16,"aria-hidden":"true"}))],8,aL)]),c.value?(p(),g("p",{key:0,id:m.value,"data-secret-state":f.value?"clearing":d.value,role:f.value?"status":void 0,class:pe([f.value?"text-danger":"text-muted","flex flex-wrap items-center gap-2 text-[13px]"])},[f.value?(p(),g(ve,{key:0},[L(s(ht),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.secret.clear_pending")),1),L(Ue,{variant:"ghost",size:"sm",icon:s(vb),"data-action":"secret-undo",onClick:C},{default:F(()=>[ye($(s(h)("backend::lang.secret.undo")),1)]),_:1},8,["icon"])],64)):d.value==="stored"?(p(),g(ve,{key:1},[L(s(ur),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.secret.stored")),1),L(Ue,{variant:"ghost",size:"sm",icon:s(Tr),"data-action":"secret-clear",onClick:x},{default:F(()=>[ye($(s(h)("backend::lang.secret.clear")),1)]),_:1},8,["icon"])],64)):d.value==="env"?(p(),g(ve,{key:2},[L(s(Na),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(s(h)("backend::lang.secret.env")),1)],64)):(p(),g("span",lL,$(s(h)("backend::lang.secret.empty")),1))],10,rL)):G("",!0)]))}}),sL=["aria-labelledby","data-ml-field"],iL={class:"flex flex-wrap items-center gap-2"},uL=["value","aria-label"],cL=["value"],Wu=le({__name:"MLField",props:{inner:{},innerType:{},mlType:{},contentLocale:{type:Boolean},field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>ua(n.modelValue)),l=it(eu,null),o=_(()=>{const k=l?.value;return k&&k.length>0?[...k]:[]}),i=A(o.value[0]??"en"),u=_(()=>`${n.controlId}-label`),d=_(()=>`${n.controlId}-editor`),c=_(()=>r.value[i.value]??""),f=_(()=>({...n.field,type:n.innerType})),m=_(()=>n.contentLocale?{contentLocale:i.value}:{});function v(k){k&&(i.value=k)}function y(k){const E=k.target.value;v(E),EP(E)}function x(k){a("update:modelValue",{...r.value,[i.value]:k})}function C(k){const E=k.detail;typeof E=="string"&&E!==""&&v(E)}return xt(()=>{window.addEventListener(hs,C)}),ja(()=>{window.removeEventListener(hs,C)}),(k,E)=>(p(),g("div",{class:"flex flex-col gap-1.5",role:"group","aria-labelledby":u.value,"data-ml-field":e.mlType},[b("div",iL,[b("select",{"data-ml-locale":"",class:"rounded-control border border-border-strong bg-surface px-2 py-1 text-[13px]",value:i.value,"aria-label":`Locale for ${e.field.label||e.field.name}`,onChange:y},[(p(!0),g(ve,null,Me(o.value,B=>(p(),g("option",{key:B,value:B},$(B),9,cL))),128))],40,uL)]),(p(),U(Kt(e.inner),je({field:f.value,"model-value":c.value,"control-id":d.value,invalid:e.invalid,"described-by":e.describedBy,source:e.source,"record-id":e.recordId},m.value,{"onUpdate:modelValue":x}),null,16,["field","model-value","control-id","invalid","described-by","source","record-id"]))],8,sL))}}),dL=["id","aria-labelledby","aria-describedby","aria-busy"],fL={key:0,"data-plugin-field-skeleton":"",class:"h-[42px] w-full rounded-control bg-skel","aria-hidden":"true"},F0=le({__name:"PluginField",props:{contentLocale:{},field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=it(Ku,null),l=A("loading"),o=A(null);let i=null,u=!1;const d=_(()=>r?.value||Wn.value),c=_(()=>JSON.stringify(n.field.typeOptions??{})),f=_(()=>n.field.readOnly===!0);function m(T,P){if(Object.is(T,P))return!0;if(T===null||P===null||typeof T!="object"||typeof P!="object")return!1;try{return JSON.stringify(T)===JSON.stringify(P)}catch{return!1}}function v(T,P){m(T.value,P)||(T.value=P)}function y(T,P,R){R?T.setAttribute(P,""):T.removeAttribute(P)}function x(T){T.setAttribute("field-name",n.field.name),T.setAttribute("record-id",n.recordId==null?"":String(n.recordId)),T.setAttribute("locale",n.contentLocale??""),T.setAttribute("ui-locale",d.value),T.setAttribute("options",c.value),y(T,"disabled",f.value),y(T,"invalid",n.invalid===!0)}function C(T){let P;return{promise:new Promise((H,S)=>{P=setTimeout(()=>S(new Error("field type element was not defined in time")),T)}),cancel:()=>clearTimeout(P)}}async function k(T){const P=await o8(T);if(customElements.get(T))return;if(P.length>0)throw new Error(`plugin script failed: ${P.join(", ")}`);const R=C(N0);try{await Promise.race([customElements.whenDefined(T),R.promise])}finally{R.cancel()}}async function E(T){const P=i,R=T.detail;if(!P||R===null||typeof R!="object")return;const{id:H,file:S}=R,I=X=>{!u&&i===P&&P.dispatchEvent(new CustomEvent(tR,{detail:{id:H,...X}}))},z=()=>h("backend::lang.fileupload.upload_failed"),D=n.source;if(!(S instanceof Blob)||!D){I({error:z()});return}const N=S instanceof File&&S.name!==""?S.name:"upload";try{const X=await Re.POST("/{vendor}/{plugin}/{controller}/{id}/fields/{field}/upload",{params:{path:{...D,id:n.recordId??0,field:n.field.name}},body:{file:""},bodySerializer:()=>{const K=new FormData;return K.append("file",S,N),K}});if(X.data){I({url:X.data.data.url});return}const W=X.response.status===422?_p(X.error?.error):"";I({error:W||z()})}catch{I({error:z()})}}function B(T){E(T)}function O(T){const P=T.detail;P!==null&&typeof P=="object"&&Object.hasOwn(P,"value")&&a("update:modelValue",P.value)}return xt(async()=>{const T=n.field.element??"";try{if(T==="")throw new Error("plugin field without an element");if(await k(T),u||!o.value)return;const P=document.createElement(T);x(P),v(P,n.modelValue),P.addEventListener(gh,O),P.addEventListener(bh,B),o.value.append(P),i=P,l.value="ready"}catch{u||(l.value="failed")}}),Ne(()=>[n.recordId,n.invalid,n.contentLocale,f.value,d.value,c.value],()=>{i&&x(i)}),Ne(()=>n.modelValue,T=>{i&&v(i,T)},{deep:!0}),Et(()=>{u=!0,i?.removeEventListener(gh,O),i?.removeEventListener(bh,B),i=null}),(T,P)=>l.value==="failed"?(p(),U(Uu,{key:0,id:e.controlId,"data-plugin-field-failed":"","aria-describedby":e.describedBy||void 0,text:s(h)("backend::lang.extension.widget_failed")},null,8,["id","aria-describedby","text"])):(p(),g("div",{key:1,id:e.controlId,role:"group","data-plugin-field":"","aria-labelledby":e.field.label?`${e.controlId}-label`:void 0,"aria-describedby":e.describedBy||void 0,"aria-busy":l.value==="loading"?"true":void 0,class:"flex min-h-input min-w-0 flex-col"},[l.value==="loading"?(p(),g("span",fL)):G("",!0),b("div",{ref_key:"mountPoint",ref:o,class:"contents"},null,512)],8,dL))}}),pL=le({__name:"MLPluginField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t;return(r,l)=>(p(),U(Wu,je(n,{inner:F0,"inner-type":e.field.type,"ml-type":e.field.type,"content-locale":"","onUpdate:modelValue":l[0]||(l[0]=o=>a("update:modelValue",o))}),null,16,["inner-type","ml-type"]))}}),vL=["id"],mL=["id","aria-labelledby","aria-label","aria-describedby","data-mode"],hL=["aria-labelledby"],yL=["id"],gL={class:"min-w-0 [overflow-wrap:anywhere]"},bL={key:0,class:"shrink-0 text-[12px] font-semibold text-muted","aria-hidden":"true"},_L=["data-permission","data-locked","data-locked-by"],xL={class:"flex min-w-0 flex-col"},kL=["id"],wL=["id"],$L=le({__name:"PermissionEditorField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=it(wp,null),l=_(()=>{const O=new Map;for(const T of r?.value[n.field.name]??[])O.set(T.code,T);return O}),o=_(()=>n.field.permissionOptions??[]),i=_(()=>n.field.mode==="radio"),u=_(()=>!!n.field.readOnly||!!Nr(n.field).readonly),d=_(()=>P0(n.field,n.modelValue)),c=_(()=>{const O=[],T=[];for(const P of o.value){if(!P.tab){T.push(P);continue}let R=O.find(H=>H.label===P.tab);R||(R={key:`tab:${P.tab}`,label:P.tab,options:[]},O.push(R)),R.options.push(P)}return T.length>0&&O.push({key:"other",label:h("backend::lang.permissioneditor.other"),options:T}),O}),f=[{value:"1",label:"backend::lang.permissioneditor.allow",checked:"data-[state=checked]:bg-ok-bg data-[state=checked]:text-ok-text"},{value:"0",label:"backend::lang.permissioneditor.inherit",checked:"data-[state=checked]:bg-surface data-[state=checked]:text-text data-[state=checked]:shadow-tab"},{value:"-1",label:"backend::lang.permissioneditor.deny",checked:"data-[state=checked]:bg-danger-soft data-[state=checked]:text-danger"}],m=_(()=>`${n.controlId}-label`);function v(O,T){return`${n.controlId}-${O}-${T}`}function y(O){return l.value.get(O.code)}function x(O){return u.value||!!O.locked||y(O)!==void 0}function C(O){return(!!O.locked||y(O)!==void 0)&&!u.value}function k(O){return y(O)?.note||h("backend::lang.permissioneditor.locked")}function E(O){const T=y(O);return T?T.value===1||i.value&&T.value===-1?T.value:0:d.value[O.code]??0}function B(O,T){if(x(O))return;const P={...d.value};T===1||i.value&&T===-1?P[O.code]=T:delete P[O.code],a("update:modelValue",P)}return(O,T)=>o.value.length===0?(p(),g("div",{key:0,id:e.controlId,"data-permission-empty":"",class:"flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 text-muted"},$(s(h)("backend::lang.permissioneditor.empty")),9,vL)):(p(),g("div",{key:1,id:e.controlId,role:"group","aria-labelledby":e.field.label?m.value:void 0,"aria-label":e.field.label?void 0:e.field.name,"aria-describedby":e.describedBy||void 0,class:pe([e.invalid?"border-danger":"border-border","overflow-hidden rounded-inner border"]),"data-permission-editor":"","data-mode":i.value?"radio":"checkbox"},[(p(!0),g(ve,null,Me(c.value,(P,R)=>(p(),g("div",{key:P.key,role:"group","aria-labelledby":`${e.controlId}-section-${R}`,"data-permission-section":""},[b("h3",{id:`${e.controlId}-section-${R}`,class:pe([R>0?"border-t border-border":"","flex h-row-head items-center justify-between gap-4 bg-subtle px-4 font-semibold"])},[b("span",gL,$(P.label),1),i.value?G("",!0):(p(),g("span",bL,$(s(h)("backend::lang.permissioneditor.allow")),1))],10,yL),(p(!0),g(ve,null,Me(P.options,(H,S)=>(p(),g("div",{key:H.code,"data-permission":H.code,"data-locked":C(H)?"":void 0,"data-locked-by":C(H)&&y(H)?"record":void 0,class:"flex min-h-[56px] items-center justify-between gap-x-4 gap-y-2 border-t border-border px-4 py-3 max-sm:flex-col max-sm:items-start"},[b("div",xL,[(p(),U(Kt(i.value?"span":"label"),{id:`${v(R,S)}-label`,for:i.value?void 0:v(R,S),class:"[overflow-wrap:anywhere]"},{default:F(()=>[ye($(H.label||H.code)+" ",1),C(H)?(p(),U(s(ur),{key:0,size:14,class:"ml-1 inline-block align-[-2px] text-muted","aria-hidden":"true"})):G("",!0)]),_:2},1032,["id","for"])),C(H)?(p(),g("p",{key:0,id:`${v(R,S)}-note`,class:"text-[13px] text-muted [overflow-wrap:anywhere]","data-permission-locked":""},$(k(H)),9,kL)):H.comment?(p(),g("p",{key:1,id:`${v(R,S)}-note`,class:"text-[13px] text-muted [overflow-wrap:anywhere]"},$(H.comment),9,wL)):G("",!0)]),i.value?(p(),U(s(W1),{key:0,orientation:"horizontal","model-value":String(E(H)),disabled:x(H),"aria-disabled":x(H)?"true":void 0,"aria-labelledby":`${v(R,S)}-label`,"aria-describedby":C(H)||H.comment?`${v(R,S)}-note`:void 0,class:"inline-flex shrink-0 gap-1 rounded-inner border border-border bg-subtle p-1","onUpdate:modelValue":I=>B(H,Number(I))},{default:F(()=>[(p(),g(ve,null,Me(f,I=>L(s(G1),{key:I.value,value:I.value,"data-segment":I.value,class:pe([I.checked,"inline-flex h-pager items-center rounded-tab px-4 text-[13px] whitespace-nowrap text-muted transition-colors duration-150 ease-out hover:text-text disabled:cursor-not-allowed disabled:hover:text-muted data-[state=checked]:text-[14px] data-[state=checked]:font-semibold"])},{default:F(()=>[ye($(s(h)(I.label)),1)]),_:2},1032,["value","data-segment","class"])),64))]),_:1},8,["model-value","disabled","aria-disabled","aria-labelledby","aria-describedby","onUpdate:modelValue"])):(p(),U(s(hD),{key:1,id:v(R,S),"model-value":E(H)===1,disabled:x(H),"aria-disabled":x(H)?"true":void 0,"aria-labelledby":`${v(R,S)}-label`,"aria-describedby":C(H)||H.comment?`${v(R,S)}-note`:void 0,class:"flex size-[18px] shrink-0 items-center justify-center rounded-checkbox border border-border-strong bg-surface disabled:cursor-not-allowed disabled:opacity-60 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-on-primary","onUpdate:modelValue":I=>B(H,I===!0?1:0)},{default:F(()=>[L(s(gD),null,{default:F(()=>[L(s(Ln),{size:14,"aria-hidden":"true"})]),_:1})]),_:1},8,["id","model-value","disabled","aria-disabled","aria-labelledby","aria-describedby","onUpdate:modelValue"]))],8,_L))),128))],8,hL))),128))],10,mL))}}),CL=le({__name:"FieldRenderer",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>r_(n.field));return(l,o)=>(p(),U(Kt(r.value),{field:e.field,"model-value":e.modelValue,"control-id":e.controlId,invalid:e.invalid,"described-by":e.describedBy,labels:e.labels,source:e.source,"record-id":e.recordId,"onUpdate:modelValue":o[0]||(o[0]=i=>a("update:modelValue",i))},null,8,["field","model-value","control-id","invalid","described-by","labels","source","record-id"]))}}),SL=["data-field"],EL=["id"],AL={key:0,class:"text-danger","aria-hidden":"true"},TL=["id","for"],DL={key:0,class:"text-danger","aria-hidden":"true"},OL=["id"],ML=["id"],IL=["id"],PL=["id"],RL=le({__name:"FormField",props:{field:{},modelValue:{},errors:{},notices:{},labels:{},source:{},recordId:{},idPrefix:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=_(()=>`${n.idPrefix??"field"}-${n.field.name}`),l=_(()=>r.value),o=_(()=>`${r.value}-comment`),i=_(()=>`${r.value}-error`),u=_(()=>`${r.value}-notice`),d=_(()=>`${r.value}-trigger`),c=it(Ms,null),f=it($p,null),m=_(()=>f?.value[c?c.path(n.field.name):n.field.name]??""),v=_(()=>(n.errors?.length??0)>0),y=_(()=>(n.notices?.length??0)>0),x=_(()=>d7(n.field.type)),C=_(()=>f7(n.field.type)||Yu(n.field)),k=_(()=>!x.value&&!!n.field.comment),E=_(()=>[m.value!==""?d.value:"",k.value||x.value&&n.field.comment?o.value:"",v.value?i.value:"",y.value?u.value:""].filter(Boolean).join(" "));return(B,O)=>(p(),g("div",{class:"flex min-w-0 flex-col gap-1.5","data-field":e.field.name},[C.value&&e.field.label?(p(),g("span",{key:0,id:`${l.value}-label`,class:"font-semibold"},[ye($(e.field.label),1),e.field.required?(p(),g("span",AL," *")):G("",!0)],8,EL)):!x.value&&!C.value?(p(),g("label",{key:1,id:`${l.value}-label`,for:l.value,class:"font-semibold"},[ye($(e.field.label||e.field.name),1),e.field.required?(p(),g("span",DL," *")):G("",!0)],8,TL)):G("",!0),m.value!==""?(p(),g("p",{key:2,id:d.value,"data-trigger-note":"",class:"flex items-center gap-2 text-[13px] text-muted"},[L(s(Na),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(m.value),1)],8,OL)):G("",!0),L(CL,{field:e.field,"model-value":e.modelValue,"control-id":l.value,invalid:v.value,"described-by":E.value,labels:e.labels,source:e.source,"record-id":e.recordId,"onUpdate:modelValue":O[0]||(O[0]=T=>a("update:modelValue",T))},null,8,["field","model-value","control-id","invalid","described-by","labels","source","record-id"]),k.value?(p(),g("p",{key:3,id:o.value,class:"text-[13px] text-muted"},$(e.field.comment),9,ML)):G("",!0),y.value?(p(),g("div",{key:4,id:u.value,role:"status","data-field-notice":"",class:"summer-callout summer-callout--warning text-[13px]!"},[(p(!0),g(ve,null,Me(e.notices,(T,P)=>(p(),g("p",{key:P,class:"summer-callout__text"},$(T),1))),128))],8,IL)):G("",!0),v.value?(p(),g("div",{key:5,id:i.value,class:"flex flex-col gap-0.5 text-[13px] text-danger"},[(p(!0),g(ve,null,Me(e.errors,(T,P)=>(p(),g("p",{key:P,class:"flex items-center gap-1.5"},[L(s(ht),{size:14,class:"shrink-0","aria-hidden":"true"}),b("span",null,$(T),1)]))),128))],8,PL)):G("",!0)],8,SL))}}),qL={class:"grid grid-cols-1 gap-x-6 gap-y-[22px] min-[600px]:grid-cols-2"},fo=le({__name:"FormGrid",props:{fields:{},values:{},errors:{},notices:{},labels:{},source:{},recordId:{},idPrefix:{},scopePath:{}},emits:["update"],setup(e,{emit:t}){const n=e,a=t;vt(Ms,{fields:_(()=>n.fields),values:_(()=>n.values),path:l=>n.scopePath?`${n.scopePath}.${l}`:l});function r(l){if(l.type===hl)return"col-span-full";switch(l.span){case"left":return"min-[600px]:col-start-1";case"right":return"min-[600px]:col-start-2";case"auto":case"row":return"";default:return"col-span-full"}}return(l,o)=>(p(),g("div",qL,[(p(!0),g(ve,null,Me(e.fields,i=>(p(),U(RL,{key:i.name,class:pe(r(i)),field:i,"model-value":e.values[i.name],errors:e.errors[i.name],notices:e.notices?.[i.name],labels:e.labels?.[i.name],source:e.source,"record-id":e.recordId,"id-prefix":e.idPrefix,"onUpdate:modelValue":u=>a("update",i.name,u)},null,8,["class","field","model-value","errors","notices","labels","source","record-id","id-prefix","onUpdate:modelValue"]))),128))]))}}),LL=["data-preview-field"],NL=["id"],BL={class:"m-0 min-w-0"},FL={key:0,"data-switch":"true",class:"inline-flex h-6 items-center rounded-pill bg-ok-bg px-2.5 text-[12px] font-semibold text-ok-text"},VL={key:1,"data-switch":"false",class:"inline-flex h-6 items-center rounded-pill border border-border-strong px-2.5 text-[12px] font-semibold text-muted"},zL={class:"flex size-[22px] shrink-0 items-center justify-center rounded-full bg-primary text-[10px] font-bold text-on-primary","aria-hidden":"true"},jL={class:"font-semibold"},UL={key:0,class:"px-2 text-muted","data-empty":""},HL={key:0},KL={key:1,class:"text-muted","data-empty":""},WL={key:0},GL={key:1,class:"text-muted","data-empty":""},Gc="flex min-h-input items-center rounded-control border border-border bg-subtle px-3.5 [overflow-wrap:anywhere]",V0=le({__name:"PreviewField",props:{field:{},value:{},labels:{},source:{},recordId:{},idPrefix:{}},setup(e){const t=e,n=new Set(["datepicker","fileupload","partial","permissioneditor","richeditor","repeater","money","taglist"]),a=_(()=>`${t.idPrefix??"preview"}-${t.field.name}`),r=_(()=>`${a.value}-label`),l=_(()=>{const v=t.field.type;return n.has(v)||Yu(t.field)?"control":v==="checkbox"||v==="switch"?"toggle":v==="relation"?t.field.multiple?"chips":"relation":v==="textarea"?"textarea":"text"}),o=_(()=>({...t.field,readOnly:!0})),i=_(()=>r_(t.field));function u(v){return v==null||v===""}const d=_(()=>{const v=t.value;if(u(v)||typeof v=="object")return"";if(t.field.type==="dropdown"){const y=(t.field.options??[]).find(x=>String(x.value)===String(v));return y?y.label:String(v)}return String(v)}),c=_(()=>t.labels?.[0]?.label??""),f=_(()=>Array.isArray(t.value)?t.labels??[]:[]);function m(v){return v.trim().split(/\s+/).filter(Boolean).slice(0,2).map(x=>x.charAt(0).toUpperCase()).join("")}return(v,y)=>(p(),g("div",{class:"flex min-w-0 flex-col gap-1.5","data-preview-field":e.field.name},[b("dt",{id:r.value,class:"font-semibold"},$(e.field.label||e.field.name),9,NL),b("dd",BL,[l.value==="control"?(p(),U(Kt(i.value),{key:0,field:o.value,"model-value":e.value,"control-id":a.value,labels:e.labels,source:e.source,"record-id":e.recordId},null,8,["field","model-value","control-id","labels","source","record-id"])):l.value==="toggle"?(p(),g(ve,{key:1},[s(Hu)(e.value)?(p(),g("span",FL,$(s(h)("backend::lang.list.column_switch_true")),1)):(p(),g("span",VL,$(s(h)("backend::lang.list.column_switch_false")),1))],64)):l.value==="chips"?(p(),g("div",{key:2,"data-preview-value":"",class:pe([Gc,"flex-wrap gap-1.5 p-1.5"])},[(p(!0),g(ve,null,Me(f.value,x=>(p(),g("span",{key:String(x.value),"data-chip":"",class:"inline-flex min-h-[30px] items-center gap-1.5 rounded-pill bg-surface pr-3 pl-1"},[b("span",zL,$(m(x.label)),1),b("span",jL,$(x.label),1)]))),128)),f.value.length===0?(p(),g("span",UL,$(s(h)("backend::lang.list.empty_value")),1)):G("",!0)])):l.value==="relation"?(p(),g("div",{key:3,"data-preview-value":"",class:pe(Gc)},[c.value!==""?(p(),g("span",HL,$(c.value),1)):(p(),g("span",KL,$(e.field.emptyOption||s(h)("backend::lang.list.empty_value")),1))])):(p(),g("div",{key:4,"data-preview-value":"",class:pe([Gc,l.value==="textarea"?"items-start! py-3 whitespace-pre-wrap":""])},[d.value!==""?(p(),g("span",WL,$(d.value),1)):(p(),g("span",GL,$(s(h)("backend::lang.list.empty_value")),1))],2))])],8,LL))}}),z0=new Set(["p","br","strong","b","em","i","u","s","h3","ul","ol","li","blockquote","a","div","span"]);function j0(e){const t=document.createElement("template");return t.innerHTML=e,t.content}function YL(e){if(e==="")return[];const t=new Set;for(const n of Array.from(j0(e).querySelectorAll("*")))t.add(n.localName.toLowerCase());return[...t]}function _h(e){return YL(e).some(t=>!z0.has(t))}const JL=["aria-labelledby","aria-describedby","data-repeater"],ZL={key:0,"data-repeater-empty":"",class:"flex flex-col items-center gap-2 rounded-inner border border-dashed border-border-strong px-6 py-8 text-center"},XL={class:"font-semibold"},QL={key:0,class:"max-w-[420px] text-[13px] text-muted"},e9={key:0,"data-repeater-slot":"",class:"h-12 rounded-inner border-2 border-dashed border-primary bg-sel"},t9=["data-repeater-row","data-repeater-key","onDragover"],n9=["data-repeater-handle","aria-label","onKeydown","onDragstart"],a9={class:"text-[13px] text-muted tabular-nums"},r9=["title"],l9={key:1,"data-repeater-errors":"",class:"inline-flex h-6 items-center rounded-pill bg-danger-soft px-2.5 text-[13px] font-semibold text-danger"},o9={key:2,class:"flex gap-1"},s9=["aria-label","disabled","onClick"],i9=["aria-label","disabled","onClick"],u9=["aria-label","aria-expanded","aria-controls","onClick"],c9=["aria-label","disabled","onClick"],d9=["id"],f9={key:0,class:"m-0 grid grid-cols-1 gap-x-6 gap-y-[22px] min-[600px]:grid-cols-2"},p9={key:2,class:"flex flex-wrap items-center gap-4"},v9={key:0,"data-repeater-count":"",class:"text-[13px] text-muted tabular-nums"},Eo="inline-flex size-8 shrink-0 items-center justify-center rounded-pager text-muted transition-colors duration-150 ease-out hover:bg-hover hover:text-text disabled:cursor-not-allowed disabled:opacity-40",m9=le({__name:"RepeaterField",props:{field:{},modelValue:{},controlId:{},invalid:{type:Boolean},describedBy:{},labels:{},source:{},recordId:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,a=t,r=it(Cp,null),l=_(()=>n.field.form?.fields??[]),o=_(()=>!!n.field.readOnly),i=_(()=>Array.isArray(n.modelValue)?n.modelValue.map(J=>J!==null&&typeof J=="object"&&!Array.isArray(J)?J:{}):[]),u=_(()=>typeof n.field.maxItems=="number"?n.field.maxItems:null),d=_(()=>typeof n.field.minItems=="number"?n.field.minItems:0),c=_(()=>n.field.prompt||h("backend::lang.repeater.add")),f=_(()=>`${n.controlId}-label`);let m=0;const v=A([]),y=A(new Set);let x;function C(){return m+=1,`r${m}`}Ne(()=>n.modelValue,J=>{J===x&&v.value.length===i.value.length||v.value.length!==i.value.length&&(v.value=i.value.map(()=>C()),y.value=new Set)},{immediate:!0});function k(J,ee){v.value=ee,x=J,a("update:modelValue",J)}function E(J){return J==null||J===""||J===!1||Array.isArray(J)&&J.length===0}function B(){const J={};for(const ee of l.value)ee.default!==void 0?J[ee.name]=ee.default:ee.type==="checkbox"||ee.type==="switch"?J[ee.name]=!1:J[ee.name]=null;return J}function O(J){return l.value.some(ee=>{const ne=J[ee.name];return E(ne)?!1:ee.default===void 0||String(ee.default)!==String(ne)})}function T(J){return(j0(J).textContent??"").replace(/\s+/g," ").trim()}function P(J){const ee=i.value[J]??{},ne=l.value.find(q=>q.name===n.field.titleFrom),w=ne?ee[ne.name]:void 0;let M="";return ne&&!E(w)&&typeof w!="object"&&(ne.type==="dropdown"?M=(ne.options??[]).find(q=>String(q.value)===String(w))?.label??String(w):ne.type==="richeditor"?M=T(String(w)):M=String(w).trim()),M!==""?M:h("backend::lang.repeater.untitled",{n:J+1})}function R(J,ee){const ne=`${n.field.name}.${ee}.`,w={};for(const[M,q]of Object.entries(J??{}))M.startsWith(ne)&&M.length>ne.length&&(w[M.slice(ne.length)]=q);return w}const H=_(()=>i.value.map((J,ee)=>R(r?.errors.value,ee))),S=_(()=>i.value.map((J,ee)=>R(r?.notices.value,ee))),I=J=>Object.keys(H.value[J]??{}).length;Ne(H,J=>{const ee=J.flatMap((ne,w)=>Object.keys(ne).length>0?[v.value[w]]:[]);if(ee.length>0){const ne=new Set(y.value);for(const w of ee)ne.delete(w);y.value=ne}});function z(J){return o.value||!y.value.has(J)}function D(J,ee){const ne=new Set(y.value);ee?ne.delete(J):ne.add(J),y.value=ne}const N=_(()=>v.value.some(J=>!y.value.has(J)));function X(){y.value=N.value?new Set(v.value):new Set}const W=A(null),K=A(null);function ae(J){return W.value?.querySelector(`[data-repeater-handle="${J}"]`)??null}function se(J,ee,ne){const w=i.value.map((M,q)=>q===J?{...M,[ee]:ne}:M);k(w,[...v.value]),r?.clearError(`${n.field.name}.${J}.${ee}`)}async function he(){if(o.value||u.value!==null&&i.value.length>=u.value)return;const J=C();k([...i.value,B()],[...v.value,J]),await He(),W.value?.querySelector(`[data-repeater-key="${J}"]`)?.querySelector('[data-repeater-body] input, [data-repeater-body] select, [data-repeater-body] textarea, [data-repeater-body] [contenteditable="true"]')?.focus()}async function ge(J){const ee=i.value[J];if(!ee||o.value||i.value.length<=d.value)return;if(O(ee)&&r){const q=P(J);if(!await r.confirm({message:h("backend::lang.repeater.remove_confirm",{title:q}),confirmLabel:h("backend::lang.repeater.remove"),danger:!0}))return}const ne=v.value.filter((q,ie)=>ie!==J);k(i.value.filter((q,ie)=>ie!==J),ne),await He();const w=ne[J]??ne[J-1],M=w?ae(w):null;M?M.focus():K.value?.$el.focus()}async function oe(J,ee){const ne=i.value.length;if(o.value||J===ee||J<0||ee<0||J>=ne||ee>=ne)return;const w=[...i.value],M=[...v.value],[q]=w.splice(J,1),[ie]=M.splice(J,1);w.splice(ee,0,q),M.splice(ee,0,ie),k(w,M),await He(),ae(ie)?.focus(),r?.announce(h("backend::lang.repeater.moved",{title:P(ee),position:ee+1,total:ne}))}function Z(J,ee){(J.key==="ArrowUp"||J.key==="ArrowDown")&&(J.preventDefault(),oe(ee,J.key==="ArrowUp"?ee-1:ee+1))}const ue=A(null),j=A(null);function xe(J,ee){ue.value=ee,j.value=null,J.dataTransfer?.setData("text/plain",v.value[ee]??""),J.dataTransfer&&(J.dataTransfer.effectAllowed="move")}function _e(J,ee){if(ue.value===null)return;J.preventDefault();const w=J.currentTarget.getBoundingClientRect();j.value=J.clientY>w.top+w.height/2?ee+1:ee}function Y(J){if(ue.value===null||j.value===null)return;J.preventDefault();const ee=ue.value,ne=j.value>ee?j.value-1:j.value;me(),oe(ee,ne)}function me(){ue.value=null,j.value=null}return(J,ee)=>(p(),g("div",{ref_key:"root",ref:W,role:"group","aria-labelledby":f.value,"aria-describedby":e.describedBy||void 0,"data-repeater":e.field.name,class:"flex flex-col gap-4"},[i.value.length===0?(p(),g("div",ZL,[b("p",XL,$(s(h)("backend::lang.repeater.empty")),1),o.value?G("",!0):(p(),g("p",QL,$(s(h)("backend::lang.repeater.empty_hint",{prompt:c.value})),1))])):G("",!0),(p(!0),g(ve,null,Me(i.value,(ne,w)=>(p(),g(ve,{key:v.value[w]},[ue.value!==null&&j.value===w&&j.value!==ue.value&&j.value!==ue.value+1?(p(),g("div",e9)):G("",!0),b("div",{"data-repeater-row":w,"data-repeater-key":v.value[w],class:pe([[I(w)>0?"border-danger":"border-border",ue.value===w?"opacity-50":""],"rounded-inner border bg-surface"]),onDragover:M=>_e(M,w),onDrop:Y},[b("div",{class:pe([z(v.value[w])?"rounded-t-inner border-b border-border":"rounded-inner","flex min-h-12 items-center gap-2 bg-subtle px-2"])},[o.value?G("",!0):(p(),g("button",{key:0,type:"button",draggable:"true","data-repeater-handle":v.value[w],"aria-label":s(h)("backend::lang.repeater.move",{title:P(w)}),class:pe([Eo,"cursor-grab"]),onKeydown:M=>Z(M,w),onDragstart:M=>xe(M,w),onDragend:me},[L(s(Bi),{size:16,"aria-hidden":"true"})],40,n9)),b("span",a9,$(w+1)+".",1),b("span",{"data-repeater-title":"",class:"min-w-0 flex-1 truncate font-semibold",title:P(w)},$(P(w)),9,r9),I(w)>0?(p(),g("span",l9,$(s(rl)("backend::lang.form.tab_errors",I(w))),1)):G("",!0),o.value?G("",!0):(p(),g("div",o9,[b("button",{type:"button","data-action":"repeater-up","aria-label":s(h)("backend::lang.repeater.move_up",{title:P(w)}),disabled:w===0,class:pe(Eo),onClick:M=>oe(w,w-1)},[L(s(Qg),{size:16,"aria-hidden":"true"})],8,s9),b("button",{type:"button","data-action":"repeater-down","aria-label":s(h)("backend::lang.repeater.move_down",{title:P(w)}),disabled:w===i.value.length-1,class:pe(Eo),onClick:M=>oe(w,w+1)},[L(s(yr),{size:16,"aria-hidden":"true"})],8,i9),b("button",{type:"button","data-action":"repeater-toggle","aria-label":s(h)(z(v.value[w])?"backend::lang.repeater.collapse":"backend::lang.repeater.expand",{title:P(w)}),"aria-expanded":z(v.value[w])?"true":"false","aria-controls":`${e.controlId}-${v.value[w]}-body`,class:pe(Eo),onClick:M=>D(v.value[w],!z(v.value[w]))},[L(s(yr),{size:16,class:pe([z(v.value[w])?"rotate-180":"","transition-transform duration-150"]),"aria-hidden":"true"},null,8,["class"])],8,u9),b("button",{type:"button","data-action":"repeater-remove","aria-label":s(h)("backend::lang.repeater.remove_named",{title:P(w)}),disabled:i.value.length<=d.value,class:pe([Eo,"hover:bg-danger-soft hover:text-danger"]),onClick:M=>ge(w)},[L(s(Tr),{size:16,"aria-hidden":"true"})],8,c9)]))],2),z(v.value[w])?(p(),g("div",{key:0,id:`${e.controlId}-${v.value[w]}-body`,"data-repeater-body":"",class:"p-4"},[o.value?(p(),g("dl",f9,[(p(!0),g(ve,null,Me(l.value,M=>(p(),U(V0,{key:M.name,class:pe(M.span==="left"?"min-[600px]:col-start-1":M.span==="right"?"min-[600px]:col-start-2":"col-span-full"),field:{...M,readOnly:!0},value:ne[M.name],source:e.source,"record-id":e.recordId,"id-prefix":`${e.controlId}-${v.value[w]}`},null,8,["class","field","value","source","record-id","id-prefix"]))),128))])):(p(),U(fo,{key:1,fields:l.value,values:ne,errors:H.value[w]??{},notices:S.value[w],source:e.source,"record-id":e.recordId,"id-prefix":`${e.controlId}-${v.value[w]}`,"scope-path":e.field.name,onUpdate:(M,q)=>se(w,M,q)},null,8,["fields","values","errors","notices","source","record-id","id-prefix","scope-path","onUpdate"]))],8,d9)):G("",!0)],42,t9)],64))),128)),ue.value!==null&&j.value===i.value.length&&j.value!==ue.value+1?(p(),g("div",{key:1,"data-repeater-slot":"",class:"h-12 rounded-inner border-2 border-dashed border-primary bg-sel",onDragover:ee[0]||(ee[0]=mt(()=>{},["prevent"])),onDrop:Y},null,32)):G("",!0),o.value?G("",!0):(p(),g("div",p9,[L(Ue,{ref_key:"addButton",ref:K,variant:"outline",size:"sm",icon:s(Ss),"data-action":"repeater-add",disabled:u.value!==null&&i.value.length>=u.value,onClick:he},{default:F(()=>[ye($(c.value),1)]),_:1},8,["icon","disabled"]),u.value!==null?(p(),g("span",v9,$(s(h)("backend::lang.repeater.count",{current:i.value.length,max:u.value})),1)):G("",!0),i.value.length>1?(p(),U(Ue,{key:1,variant:"ghost",size:"sm",class:"ml-auto","data-action":"repeater-toggle-all",onClick:X},{default:F(()=>[ye($(s(h)(N.value?"backend::lang.repeater.collapse_all":"backend::lang.repeater.expand_all")),1)]),_:1})):G("",!0)]))],8,JL))}}),h9="modulepreload",y9=function(e,t){return new URL(e,t).href},xh={},U0=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){let d=function(c){return Promise.all(c.map(f=>Promise.resolve(f).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const o=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),u=i?.nonce||i?.getAttribute("nonce");r=d(n.map(c=>{if(c=y9(c,a),c in xh)return;xh[c]=!0;const f=c.endsWith(".css"),m=f?'[rel="stylesheet"]':"";if(a)for(let y=o.length-1;y>=0;y--){const x=o[y];if(x.href===c&&(!f||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${m}`))return;const v=document.createElement("link");if(v.rel=f?"stylesheet":h9,f||(v.as="script"),v.crossOrigin="",v.href=c,u&&v.setAttribute("nonce",u),document.head.appendChild(v),f)return new Promise((y,x)=>{v.addEventListener("load",y),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function l(o){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o}return r.then(o=>{for(const i of o||[])i.status==="rejected"&&l(i.reason);return t().catch(l)})};function kh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n2?a-2:0),l=2;l1?n-1:0),r=1;r"u"?null:Vt(BigInt.prototype.toString),Ah=typeof Symbol>"u"?null:Vt(Symbol.prototype.toString),fn=Vt(Object.prototype.hasOwnProperty),Do=Vt(Object.prototype.toString),Qt=Vt(RegExp.prototype.test),tr=O9(TypeError);function Vt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:No;if(wh&&wh(e,null),!Yl(t))return e;let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const l=n(r);l!==r&&(w9(t)||(t[a]=l),r=l)}e[r]=!0}return e}function M9(e){for(let t=0;t/g),B9=Yt(/\${[\w\W]*/g),F9=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),V9=Yt(/^aria-[\-\w]+$/),Ih=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z9=Yt(/^(?:\w+script|data):/i),j9=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U9=Yt(/^html$/i),H9=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),Ph=Yt(/<[/\w!]/g),Rh=Yt(/<[/\w]/g),K9=Yt(/<\/no(script|embed|frames)/i),W9=Yt(/\/>/i),_n={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},W0=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],G9=Ut(ft({},W0)),Y9=(function(){const e={};return Yr(W0,t=>{e[t]=Yt(new RegExp("])","i"))}),Ut(e)})(),J9=function(){return typeof window>"u"?null:window},Z9=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(a=n.getAttribute(r));const l="dompurify"+(a?"#"+a:"");try{return t.createPolicy(l,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},qh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},nr=function(t,n,a,r){return fn(t,n)&&Yl(t[n])?ft(r.base?xn(r.base):{},t[n],r.transform):a},ed=function(t,n,a){const r=fn(t,n)?t[n]:void 0;return r&&typeof r=="object"?xn(r):a()};function G0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J9();const t=Oe=>G0(Oe);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==_n.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const a=n,r=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,o=e.Node,i=e.Element,u=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,c=e.trustedTypes,f=i.prototype,m=Tn(f,"cloneNode"),v=Tn(f,"remove"),y=Tn(f,"removeAttributeNode"),x=Tn(f,"nextSibling"),C=Tn(f,"childNodes"),k=Tn(f,"parentNode"),E=Tn(f,"shadowRoot"),B=Tn(f,"attributes"),O=o&&o.prototype?Tn(o.prototype,"nodeType"):null,T=o&&o.prototype?Tn(o.prototype,"nodeName"):null,P=o&&o.prototype?Tn(o.prototype,"ownerDocument"):null,R=function(V){return O?O(V):V.nodeType},H=function(V){return T?T(V):V.nodeName};if(typeof l=="function"){const Oe=n.createElement("template");Oe.content&&Oe.content.ownerDocument&&(n=Oe.content.ownerDocument)}let S,I="",z,D=!1,N=0;const X=function(){if(N>0)throw tr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},W=function(V){X(),N++;try{return S.createHTML(V)}finally{N--}},K=function(V){X(),N++;try{return S.createScriptURL(V)}finally{N--}},ae=function(){return D||(z=Z9(c,r),D=!0),z},se=n,he=se.implementation,ge=se.createNodeIterator,oe=se.createDocumentFragment,Z=se.getElementsByTagName,ue=a.importNode;let j=qh();t.isSupported=typeof H0=="function"&&typeof k=="function"&&he&&he.createHTMLDocument!==void 0;const xe=L9,_e=N9,Y=B9,me=F9,J=V9,ee=z9,ne=j9,w=H9;let M=Ih,q=null;const ie=ft({},[...Th,...Jc,...Zc,...Xc,...Dh]);let te=null;const fe=ft({},[...Oh,...Qc,...Mh,...ri]);let Ee=Object.seal(Il(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,Te=null;const de=Object.seal(Il(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $e=!0,ke=!0,Le=!1,Fe=!0,Ke=!1,tt=!0,et=!1,ot=!1,rt=null,Tt=null,Ot=!1,zt=!1,ze=!1,Ve=!1,We=!0,Nt=!1;const rn="user-content-";let Wa=!0,ba=!1,Nn={},Wt=null;const Ga=ft({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let _a=null;const Ya=ft({},["audio","video","img","source","image","track"]);let Ce=null;const Be=ft({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",st="http://www.w3.org/2000/svg",kt="http://www.w3.org/1999/xhtml";let Mt=kt,Br=!1,vo=null;const mo=ft({},[Ge,st,kt],Yc),Q=Ut(["mi","mo","mn","ms","mtext"]);let De=ft({},Q);const re=Ut(["annotation-xml"]);let qe=ft({},re);const at=ft({},["title","style","font","a","script"]);let Pt=null;const Jn=["application/xhtml+xml","text/html"],Ja="text/html";let Rt=null,yl=null;const h_=n.createElement("form"),Tp=function(V){return V instanceof RegExp||V instanceof Function},Ju=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(yl&&yl===V)return;(!V||typeof V!="object")&&(V={}),V=xn(V),Pt=Jn.indexOf(V.PARSER_MEDIA_TYPE)===-1?Ja:V.PARSER_MEDIA_TYPE,Rt=Pt==="application/xhtml+xml"?Yc:No,q=nr(V,"ALLOWED_TAGS",ie,{transform:Rt}),te=nr(V,"ALLOWED_ATTR",fe,{transform:Rt}),vo=nr(V,"ALLOWED_NAMESPACES",mo,{transform:Yc}),Ce=nr(V,"ADD_URI_SAFE_ATTR",Be,{transform:Rt,base:Be}),_a=nr(V,"ADD_DATA_URI_TAGS",Ya,{transform:Rt,base:Ya}),Wt=nr(V,"FORBID_CONTENTS",Ga,{transform:Rt}),Se=nr(V,"FORBID_TAGS",xn({}),{transform:Rt}),Te=nr(V,"FORBID_ATTR",xn({}),{transform:Rt}),Nn=fn(V,"USE_PROFILES")?V.USE_PROFILES&&typeof V.USE_PROFILES=="object"?xn(V.USE_PROFILES):V.USE_PROFILES:!1,$e=V.ALLOW_ARIA_ATTR!==!1,ke=V.ALLOW_DATA_ATTR!==!1,Le=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ke=V.SAFE_FOR_TEMPLATES||!1,tt=V.SAFE_FOR_XML!==!1,et=V.WHOLE_DOCUMENT||!1,zt=V.RETURN_DOM||!1,ze=V.RETURN_DOM_FRAGMENT||!1,Ve=V.RETURN_TRUSTED_TYPE||!1,Ot=V.FORCE_BODY||!1,We=V.SANITIZE_DOM!==!1,Nt=V.SANITIZE_NAMED_PROPS||!1,Wa=V.KEEP_CONTENT!==!1,ba=V.IN_PLACE||!1,M=P9(V.ALLOWED_URI_REGEXP)?V.ALLOWED_URI_REGEXP:Ih,Mt=typeof V.NAMESPACE=="string"?V.NAMESPACE:kt,De=ed(V,"MATHML_TEXT_INTEGRATION_POINTS",()=>ft({},Q)),qe=ed(V,"HTML_INTEGRATION_POINTS",()=>ft({},re));const ce=ed(V,"CUSTOM_ELEMENT_HANDLING",()=>Il(null));if(Ee=Il(null),fn(ce,"tagNameCheck")&&Tp(ce.tagNameCheck)&&(Ee.tagNameCheck=ce.tagNameCheck),fn(ce,"attributeNameCheck")&&Tp(ce.attributeNameCheck)&&(Ee.attributeNameCheck=ce.attributeNameCheck),fn(ce,"allowCustomizedBuiltInElements")&&typeof ce.allowCustomizedBuiltInElements=="boolean"&&(Ee.allowCustomizedBuiltInElements=ce.allowCustomizedBuiltInElements),Yt(Ee),Ke&&(ke=!1),ze&&(zt=!0),Nn&&(q=ft({},Dh),te=Il(null),Nn.html===!0&&(ft(q,Th),ft(te,Oh)),Nn.svg===!0&&(ft(q,Jc),ft(te,Qc),ft(te,ri)),Nn.svgFilters===!0&&(ft(q,Zc),ft(te,Qc),ft(te,ri)),Nn.mathMl===!0&&(ft(q,Xc),ft(te,Mh),ft(te,ri))),de.tagCheck=null,de.attributeCheck=null,fn(V,"ADD_TAGS")&&(typeof V.ADD_TAGS=="function"?de.tagCheck=V.ADD_TAGS:Yl(V.ADD_TAGS)&&(q===ie&&(q=xn(q)),ft(q,V.ADD_TAGS,Rt))),fn(V,"ADD_ATTR")&&(typeof V.ADD_ATTR=="function"?de.attributeCheck=V.ADD_ATTR:Yl(V.ADD_ATTR)&&(te===fe&&(te=xn(te)),ft(te,V.ADD_ATTR,Rt))),fn(V,"ADD_FORBID_CONTENTS")&&Yl(V.ADD_FORBID_CONTENTS)&&(Wt===Ga&&(Wt=xn(Wt)),ft(Wt,V.ADD_FORBID_CONTENTS,Rt)),Wa&&(q["#text"]=!0),et&&ft(q,["html","head","body"]),q.table&&(ft(q,["tbody"]),delete Se.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw tr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw tr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ae=S;S=V.TRUSTED_TYPES_POLICY;try{I=W("")}catch(Pe){throw S=Ae,Pe}}else V.TRUSTED_TYPES_POLICY===null?(S=void 0,I=""):(S===void 0&&(S=ae()),S&&typeof I=="string"&&(I=W("")));Ut&&Ut(V),yl=V},Dp=ft({},[...Jc,...Zc,...R9]),Op=ft({},[...Xc,...q9]),y_=function(V,ce,Ae){return ce.namespaceURI===kt?V==="svg":ce.namespaceURI===Ge?V==="svg"&&(Ae==="annotation-xml"||De[Ae]):!!Dp[V]},g_=function(V,ce,Ae){return ce.namespaceURI===kt?V==="math":ce.namespaceURI===st?V==="math"&&qe[Ae]:!!Op[V]},b_=function(V,ce,Ae){return ce.namespaceURI===st&&!qe[Ae]||ce.namespaceURI===Ge&&!De[Ae]?!1:!Op[V]&&(at[V]||!Dp[V])},__=function(V){let ce=k(V);(!ce||!ce.tagName)&&(ce={namespaceURI:Mt,tagName:"template"});const Ae=No(V.tagName),Pe=No(ce.tagName);return vo[V.namespaceURI]?V.namespaceURI===st?y_(Ae,ce,Pe):V.namespaceURI===Ge?g_(Ae,ce,Pe):V.namespaceURI===kt?b_(Ae,ce,Pe):!!(Pt==="application/xhtml+xml"&&vo[V.namespaceURI]):!1},Za=function(V){Ao(t.removed,{element:V});try{k(V).removeChild(V)}catch{if(v(V),!k(V))throw tr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Mp=function(V,ce,Ae){try{y(V,ce)}catch{try{V.removeAttribute(Ae)}catch{}}},Ps=function(V){Rs(V);const ce=C(V);if(ce){const Pe=[];Yr(ce,Ye=>{Ao(Pe,Ye)}),Yr(Pe,Ye=>{try{v(Ye)}catch{}})}const Ae=B(V);if(Ae)for(let Pe=Ae.length-1;Pe>=0;--Pe){const Ye=Ae[Pe],ct=Ye&&Ye.name;typeof ct=="string"&&Mp(V,Ye,ct)}},Fr=function(V,ce,Ae){if(!Ae)try{Ae=ce.getAttributeNode(V)}catch{Ae=null}Ao(t.removed,{attribute:Ae||null,from:ce});try{Ae?y(ce,Ae):ce.removeAttribute(V)}catch{try{ce.removeAttribute(V)}catch{}}if(V==="is")if(zt||ze)try{Za(ce)}catch{}else try{ce.setAttribute(V,"")}catch{}},x_=function(V){const ce=B(V);if(ce)for(let Ae=ce.length-1;Ae>=0;--Ae){const Pe=ce[Ae],Ye=Pe&&Pe.name;typeof Ye!="string"||te[Rt(Ye)]||Mp(V,Pe,Ye)}},Rs=function(V){const ce=[V];for(;ce.length>0;){const Ae=ce.pop();R(Ae)===_n.element&&x_(Ae);const Pe=C(Ae);if(Pe)for(let Ye=Pe.length-1;Ye>=0;--Ye)ce.push(Pe[Ye])}},Ip=function(V,ce){return tt?V==="patchsrc"?!0:V==="for"&&ce!=="label"&&ce!=="output":!1},k_=function(V){if(!tt)return;const ce=[V];for(;ce.length>0;){const Ae=ce.pop(),Pe=R(Ae);if(Pe===_n.processingInstruction||Pe===_n.comment&&Qt(Rh,Ae.data)){try{v(Ae)}catch{}continue}if(Pe===_n.element){const ct=Ae,dt=Rt(H(Ae));try{ct.hasAttribute&&ct.hasAttribute("patchsrc")&&ct.removeAttribute("patchsrc"),ct.hasAttribute&&ct.hasAttribute("for")&&Ip("for",dt)&&ct.removeAttribute("for")}catch{}}const Ye=C(Ae);if(Ye)for(let ct=Ye.length-1;ct>=0;--ct)ce.push(Ye[ct])}},Pp=function(V){let ce=null,Ae=null;if(Ot)V=""+V;else{const ct=Ch(V,/^[\r\n\t ]+/);Ae=ct&&ct[0]}Pt==="application/xhtml+xml"&&Mt===kt&&(V=''+V+"");const Pe=S?W(V):V;if(Mt===kt)try{ce=new d().parseFromString(Pe,Pt)}catch{}if(!ce||!ce.documentElement){ce=he.createDocument(Mt,"template",null);try{ce.documentElement.innerHTML=Br?I:Pe}catch{}}const Ye=ce.body||ce.documentElement;return V&&Ae&&Ye.insertBefore(n.createTextNode(Ae),Ye.childNodes[0]||null),Mt===kt?Z.call(ce,et?"html":"body")[0]:et?ce.documentElement:Ye},Rp=function(V){const ce=P?P(V):V.ownerDocument;return ge.call(ce||V,V,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},qs=function(V){return V=To(V,xe," "),V=To(V,_e," "),V=To(V,Y," "),V},Zu=function(V){var ce;V.normalize();const Ae=P?P(V):V.ownerDocument,Pe=ge.call(Ae||V,V,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let Ye=Pe.nextNode();for(;Ye;)Ye.data=qs(Ye.data),Ye=Pe.nextNode();const ct=(ce=V.querySelectorAll)===null||ce===void 0?void 0:ce.call(V,"template");ct&&Yr(ct,dt=>{gl(dt.content)&&Zu(dt.content)})},Ls=function(V){const ce=T?T(V):null;return typeof ce!="string"||Rt(ce)!=="form"?!1:typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||V.attributes!==B(V)||typeof V.removeAttribute!="function"||typeof V.removeAttributeNode!="function"||typeof V.getAttributeNode!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function"||V.nodeType!==O(V)||V.childNodes!==C(V)},gl=function(V){if(!O||typeof V!="object"||V===null)return!1;try{return O(V)===_n.documentFragment}catch{return!1}},ho=function(V){if(!O||typeof V!="object"||V===null)return!1;try{return typeof O(V)=="number"}catch{return!1}};function Zn(Oe,V,ce){Oe.length!==0&&Yr(Oe,Ae=>{Ae.call(t,V,ce,yl)})}const w_=function(V,ce){return!!(tt&&V.hasChildNodes()&&!ho(V.firstElementChild)&&Qt(Ph,V.textContent)&&Qt(Ph,V.innerHTML)||tt&&V.namespaceURI===kt&&G9[ce]&&(ho(V.firstElementChild)||typeof V.textContent=="string"&&Qt(Y9[ce],V.textContent))||V.nodeType===_n.processingInstruction||tt&&V.nodeType===_n.comment&&Qt(Rh,V.data))},Ns=function(V,ce){if(V instanceof RegExp)return Qt(V,ce);if(V instanceof Function){for(var Ae=arguments.length,Pe=new Array(Ae>2?Ae-2:0),Ye=2;Ye=0;--dt){const It=V===Ae?m(Ye[dt],!0):Ye[dt];Pe.insertBefore(It,x(V))}}}return Za(V),!0},qp=function(V,ce,Ae,Pe){return V.length===0?ce:ce===Ae||ce===Pe?xn(ce):ce},bl=function(V,ce){return V===ce||k(V)!==null?!1:(ba&&Rs(V),!0)},Lp=function(V,ce){if(Zn(j.beforeSanitizeElements,V,null),bl(V,ce))return!0;if(Ls(V))return Za(V),!0;const Ae=Rt(H(V));if(q=qp(j.uponSanitizeElement,q,ie,rt),Zn(j.uponSanitizeElement,V,{tagName:Ae,allowedTags:q}),bl(V,ce))return!0;if(w_(V,Ae))return Za(V),!0;if(Se[Ae]||!(de.tagCheck instanceof Function&&de.tagCheck(Ae))&&!q[Ae]){const Pe=$_(V,Ae,ce);return Pe===!1&&(Zn(j.afterSanitizeElements,V,null),bl(V,ce))?!0:Pe}if(R(V)===_n.element&&!__(V)||(Ae==="noscript"||Ae==="noembed"||Ae==="noframes")&&Qt(K9,V.innerHTML))return Za(V),!0;if(Ke&&V.nodeType===_n.text){const Pe=qs(V.textContent);V.textContent!==Pe&&(Ao(t.removed,{element:V.cloneNode()}),V.textContent=Pe)}return Zn(j.afterSanitizeElements,V,null),bl(V,ce)},Np=function(V,ce,Ae){if(Te[ce]||Ip(ce,V)||We&&(ce==="id"||ce==="name")&&(Ae in n||Ae in h_))return!1;const Pe=te[ce]||de.attributeCheck instanceof Function&&de.attributeCheck(ce,V);return ke&&Qt(me,ce)||$e&&Qt(J,ce)?!0:Pe?Ce[ce]||Qt(M,To(Ae,ne,""))||(ce==="src"||ce==="xlink:href"||ce==="href")&&V!=="script"&&Sh(Ae,"data:")===0&&_a[V]||Le&&!Qt(ee,To(Ae,ne,""))?!0:!Ae:Bp(V)&&Ns(Ee.tagNameCheck,V)&&Ns(Ee.attributeNameCheck,ce,V)||ce==="is"&&Ee.allowCustomizedBuiltInElements&&Ns(Ee.tagNameCheck,Ae)},C_=ft({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Bp=function(V){return!C_[No(V)]&&Qt(w,V)},S_=function(V,ce,Ae,Pe){if(S&&typeof c=="object"&&typeof c.getAttributeType=="function"&&!Ae)switch(c.getAttributeType(V,ce)){case"TrustedHTML":return W(Pe);case"TrustedScriptURL":return K(Pe)}return Pe},E_=function(V,ce,Ae,Pe){try{return Ae?V.setAttributeNS(Ae,ce,Pe):V.setAttribute(ce,Pe),Ls(V)?(Za(V),!1):!0}catch{return Fr(ce,V),!1}},Fp=function(V,ce){if(Zn(j.beforeSanitizeAttributes,V,null),bl(V,ce))return;const Ae=V.attributes;if(!Ae||Ls(V))return;te=qp(j.uponSanitizeAttribute,te,fe,Tt);const Pe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let Ye=Ae.length;const ct=Rt(V.nodeName);for(;Ye--;){const dt=Ae[Ye],It=dt.name,En=dt.namespaceURI,gn=dt.value,_l=Rt(It),Qu=gn;let ln=It==="value"?Qu:A9(Qu),Vp=!1;if(Pe.attrName=_l,Pe.attrValue=ln,Pe.keepAttr=!0,Pe.forceKeepAttr=void 0,Zn(j.uponSanitizeAttribute,V,Pe),ln=Pe.attrValue,Nt&&(_l==="id"||_l==="name")&&Sh(ln,rn)!==0&&(Fr(It,V,dt),ln=rn+ln,Vp=!0),tt&&Qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ln)){Fr(It,V,dt);continue}if(_l==="attributename"&&Ch(ln,"href")){Fr(It,V,dt);continue}if(!Pe.forceKeepAttr){if(!Pe.keepAttr){Fr(It,V,dt);continue}if(!Fe&&Qt(W9,ln)){Fr(It,V,dt);continue}if(Ke&&(ln=qs(ln)),!Np(ct,_l,ln)){Fr(It,V,dt);continue}ln=S_(ct,_l,En,ln),ln!==Qu&&E_(V,It,En,ln)&&Vp&&$h(t.removed)}}Zn(j.afterSanitizeAttributes,V,null),bl(V,ce)},Bs=function(V){let ce=null;const Ae=Rp(V);for(Zn(j.beforeSanitizeShadowDOM,V,null);ce=Ae.nextNode();)if(Zn(j.uponSanitizeShadowNode,ce,null),Lp(ce,V),Fp(ce,V),gl(ce.content)&&Bs(ce.content),R(ce)===_n.element){const Pe=E(ce);gl(Pe)&&(Xu(Pe),Bs(Pe))}Zn(j.afterSanitizeShadowDOM,V,null)},Xu=function(V){const ce=[{node:V,shadow:null}];for(;ce.length>0;){const Ae=ce.pop();if(Ae.shadow){Bs(Ae.shadow);continue}const Pe=Ae.node,Ye=R(Pe)===_n.element,ct=C(Pe);if(ct)for(let dt=ct.length-1;dt>=0;--dt)ce.push({node:ct[dt],shadow:null});if(Ye){const dt=T?T(Pe):null;if(typeof dt=="string"&&Rt(dt)==="template"){const It=Pe.content;gl(It)&&ce.push({node:It,shadow:null})}}if(Ye){const dt=E(Pe);gl(dt)&&ce.push({node:null,shadow:dt},{node:dt,shadow:null})}}};return t.sanitize=function(Oe){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=null,Ae=null,Pe=null,Ye=null;if(Br=!Oe,Br&&(Oe=""),typeof Oe!="string"&&!ho(Oe)&&(Oe=I9(Oe),typeof Oe!="string"))throw tr("dirty is not a string, aborting");if(!t.isSupported)return Oe;ot?(q=rt,te=Tt):Ju(V),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(q=xn(q)),j.uponSanitizeAttribute.length>0&&(te=xn(te)),t.removed=[];const ct=ba&&typeof Oe!="string"&&ho(Oe);if(ct){k_(Oe);const En=H(Oe);if(typeof En=="string"){const gn=Rt(En);if(!q[gn]||Se[gn])throw Ps(Oe),tr("root node is forbidden and cannot be sanitized in-place")}if(Ls(Oe))throw Ps(Oe),tr("root node is clobbered and cannot be sanitized in-place");try{Xu(Oe)}catch(gn){throw Ps(Oe),gn}}else if(ho(Oe))ce=Pp(""),Ae=ce.ownerDocument.importNode(Oe,!0),Ae.nodeType===_n.element&&Ae.nodeName==="BODY"||Ae.nodeName==="HTML"?ce=Ae:ce.appendChild(Ae),Xu(ce);else{if(!zt&&!Ke&&!et&&Oe.indexOf("<")===-1)return S&&Ve?W(Oe):Oe;if(ce=Pp(Oe),!ce)return zt?null:Ve?I:""}ce&&Ot&&Za(ce.firstChild);const dt=ct?Oe:ce;try{const En=Rp(dt);for(;Pe=En.nextNode();)Lp(Pe,dt),Fp(Pe,dt),gl(Pe.content)&&Bs(Pe.content)}catch(En){throw ct&&(Ps(Oe),Yr(t.removed,gn=>{gn.element&&Rs(gn.element)})),En}if(ct){let En=!1;if(Yr(t.removed,gn=>{gn.element&&(gn.element===Oe&&(En=!0),Rs(gn.element))}),En)throw tr("a node selected for removal could not be safely returned; refusing to sanitize in place");return Ke&&Zu(Oe),Oe}if(zt){if(Ke&&Zu(ce),ze)for(Ye=oe.call(ce.ownerDocument);ce.firstChild;)Ye.appendChild(ce.firstChild);else Ye=ce;return(te.shadowroot||te.shadowrootmode)&&(Ye=ue.call(a,Ye,!0)),Ye}let It=et?ce.outerHTML:ce.innerHTML;return et&&q["!doctype"]&&ce.ownerDocument&&ce.ownerDocument.doctype&&ce.ownerDocument.doctype.name&&Qt(U9,ce.ownerDocument.doctype.name)&&(It=" +`+It),Ke&&(It=qs(It)),S&&Ve?W(It):It},t.setConfig=function(){let Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ju(Oe),ot=!0,rt=q,Tt=te},t.clearConfig=function(){yl=null,ot=!1,rt=null,Tt=null,S=z,I=""},t.isValidAttribute=function(Oe,V,ce){yl||Ju({});const Ae=Rt(Oe),Pe=Rt(V);return Np(Ae,Pe,ce)},t.addHook=function(Oe,V){typeof V=="function"&&fn(j,Oe)&&Ao(j[Oe],V)},t.removeHook=function(Oe,V){if(fn(j,Oe)){if(V!==void 0){const ce=S9(j[Oe],V);return ce===-1?void 0:E9(j[Oe],ce,1)[0]}return $h(j[Oe])}},t.removeHooks=function(Oe){fn(j,Oe)&&(j[Oe]=[])},t.removeAllHooks=function(){j=qh()},t}var X9=G0();const Q9=["http","https","mailto","tel"],eN=/[\x00-\x20\x7f]+/g,tN=/^([a-z][a-z0-9+.-]*):/i;function Y0(e){if(e==null)return!1;const t=e.replace(eN,"");if(t==="")return!1;const n=tN.exec(t);if(n)return Q9.includes(n[1].toLowerCase());try{return new URL(t,"https://admin.invalid/"),!0}catch{return!1}}const nN=["script","style","template","noscript","iframe","frame","frameset","object","embed","applet","svg","math","title","head","meta","link","base"],J0=Object.freeze({ALLOWED_TAGS:[...z0],ALLOWED_ATTR:["href"],ALLOW_DATA_ATTR:!1,ALLOW_ARIA_ATTR:!1,ADD_FORBID_CONTENTS:[...nN],KEEP_CONTENT:!0,RETURN_TRUSTED_TYPE:!1}),aN='

a + diff --git a/modules/cabana/README.md b/modules/cabana/README.md index 066efac8..db640dcd 100644 --- a/modules/cabana/README.md +++ b/modules/cabana/README.md @@ -94,7 +94,7 @@ Guarded routes run surf's `locale.from-principal` after the backend guard: an in | GET `/account/tokens/scopes` | Scopes the caller may assign (`cabana.AdminAPITokenScope`), including `*`, `admin:read` and overlapping plugin scopes. Interactive session only. | | GET `/account/contributions` | The sections plugins contribute to My account (`cabana.AccountContributionView`): translated label, description and status for the signed-in administrator, and the actions (`cabana.AccountContributionActionView`) they hold the permissions for and whose `Applies` reports true. A section whose status or one of whose actions' `Applies` failed carries `error: true`. An empty list when no plugin contributes. Interactive session only. | | GET `/mcp/consent/{request}` | A pending MCP authorization request of an administrator-only grant (`cabana.MCPConsentView`), resolved by the published `pact.MCPAdminConsent` for the signed-in administrator: the client (`cabana.MCPConsentClientView`, with the redirect URI's host), the administrator (`cabana.MCPConsentAdminView`: login, name, email), the requested scopes the administrator can grant in catalog order (`cabana.AdminAPITokenScope`; scopes outside the catalog or without an owned permission are hidden, as in the token picker), `offline_access` (requested), `consent_required` and `expires_at`. 404 `request_not_found` when no provider is published or the request is unknown. Interactive session only. | -| POST `/mcp/consent/{request}` | Allow or deny that request (`cabana.MCPConsentDecisionRequest`: `decision` `allow` or `deny`, `scopes`, `offline_access`; at most 16 KiB, unknown fields 400). An allow keeps the submitted scopes that were requested and can be granted (others are dropped), normalises them like token creation (`*` collapses to `["*"]`), answers 422 `no_grantable_scopes` when nothing is left and grants offline access only when it was requested and asked for; the answer is `cabana.MCPConsentDecisionView` (`redirect_uri`). cabana opens no transaction: the provider owns it. Interactive session only, AJAX header required. | +| POST `/mcp/consent/{request}` | Allow or deny that request (`cabana.MCPConsentDecisionRequest`: `decision` `allow` or `deny`, `scopes`, `offline_access`; at most 16 KiB, unknown fields 400). An allow keeps the submitted scopes that were requested and can be granted (others are dropped), normalises them like token creation (`*` collapses to `["*"]`), answers 422 `no_grantable_scopes` when nothing is left and grants offline access only when it was requested and asked for; the answer is `cabana.MCPConsentDecisionView` (`redirect_uri`). Both decisions load the request first, and a redirect the provider answers that does not go back to the request's redirect URI (same scheme, host and path) is refused with 500. cabana opens no transaction: the provider owns it. Interactive session only, AJAX header required. | | POST `/account/contribution-items/{name}/{item}/actions/{action}` | Run one item action of a contributed section on one row: 404 for an unknown section or item action, 403 without its permissions, 404 when the section's `Items` does not list `{item}` for the signed-in administrator (so another administrator's row is never reachable) or when `Run` answers `pact.ErrAccountItemNotFound`; `Run` gets the administrator and item ids inside a transaction and answers `cabana.AccountActionResultView`. The path is not under `/account/contributions/` because a nine-segment POST there would overlap the controller routes. Interactive session only, AJAX header required. | | POST `/account/contributions/{name}/actions/{action}` | Run one contributed action for the signed-in administrator: 404 for an unknown section or action, 403 without the action's permissions, 409 when it no longer applies; `Run` gets the administrator's id inside a transaction and answers `cabana.AccountActionResultView` (translated `message`, optional `url`, only an `http`/`https` or same-origin URL). Interactive session only, AJAX header required. | | GET `/navigation`, GET `/settings` | Navigation and settings entries the administrator may open and, for a navigation entry with a `Visible` func, that it answers true for the request; a settings entry's `controller` names the admin controller a link entry opens and is empty for a singleton form, and `path` (only on the admin's own Plugins entry) names the SPA route it opens. | diff --git a/modules/cabana/admin_openapi.go b/modules/cabana/admin_openapi.go index f80a4b74..66472b6d 100644 --- a/modules/cabana/admin_openapi.go +++ b/modules/cabana/admin_openapi.go @@ -483,7 +483,7 @@ func AdminMCPConsentShow() {} // AdminMCPConsentDecide documents POST /mcp/consent/{request}. // // @Summary Allow or deny an MCP consent request -// @Description Allows or denies a pending MCP authorization request for the signed-in admin and answers the client redirect URI. Submitted scopes that were not requested or that the admin cannot grant are dropped, * collapses as for personal tokens, and 422 no_grantable_scopes answers when nothing is left. Needs X-Requested-With; the body is capped at 16 KiB and unknown fields are refused (400). Personal API tokens are refused (403 interactive_only). +// @Description Allows or denies a pending MCP authorization request for the signed-in admin and answers the client redirect URI. Submitted scopes that were not requested or that the admin cannot grant are dropped, * collapses as for personal tokens, and 422 no_grantable_scopes answers when nothing is left. Both decisions load the request first; a provider redirect that does not go back to the request's redirect URI (same scheme, host and path) is refused (500). Needs X-Requested-With; the body is capped at 16 KiB and unknown fields are refused (400). Personal API tokens are refused (403 interactive_only). // @Tags admin // @Accept json // @Produce json diff --git a/modules/cabana/mcp_admin_consent_test.go b/modules/cabana/mcp_admin_consent_test.go index f5eaf92a..f8d44465 100644 --- a/modules/cabana/mcp_admin_consent_test.go +++ b/modules/cabana/mcp_admin_consent_test.go @@ -35,8 +35,10 @@ type recordingAdminConsent struct { required bool showErr error decideErr error - shows []consentCall - calls []consentCall + // redirect replaces Decide's redirect URI while set. + redirect string + shows []consentCall + calls []consentCall } func (f *recordingAdminConsent) set(fn func(*recordingAdminConsent)) { @@ -71,6 +73,9 @@ func (f *recordingAdminConsent) MCPAdminConsentDecide(_ context.Context, adminID if requestID != "req1" { return "", pact.ErrMCPConsentNotFound } + if f.redirect != "" { + return f.redirect, nil + } if !decision.Allow { return "myagent:/callback?error=access_denied", nil } @@ -405,8 +410,9 @@ func TestMCPAdminConsent(t *testing.T) { if rec := decide("nope", `{"decision":"deny"}`, readerP); rec.Code != http.StatusNotFound || errorCode(rec) != "request_not_found" { t.Fatalf("deny of an unknown request = %d %s", rec.Code, rec.Body.String()) } - if got := provider.lastCall(t); got.request != "nope" || got.decision.Allow { - t.Fatalf("deny of an unknown request reached Decide with %+v", got) + // Both decisions load the request first: neither reaches Decide. + if got := provider.lastCall(t); got.request == "nope" { + t.Fatalf("a decision of an unknown request reached Decide with %+v", got) } provider.set(func(f *recordingAdminConsent) { f.decideErr = pact.ErrMCPConsentNotFound }) rec := decide("req1", `{"decision":"allow","scopes":["admin:read"]}`, readerP) @@ -421,6 +427,34 @@ func TestMCPAdminConsent(t *testing.T) { } }) + t.Run("a provider redirect away from the request's redirect URI is refused", func(t *testing.T) { + for _, foreign := range []string{ + "https://evil.example/callback?code=c1", + "evilagent:/callback?code=c1", + "myagent:/elsewhere?code=c1", + "myagent://host/callback?code=c1", + "javascript:alert(1)", + "/callback?code=c1", + } { + provider.set(func(f *recordingAdminConsent) { f.redirect = foreign }) + allow := decide("req1", `{"decision":"allow","scopes":["admin:read"]}`, readerP) + deny := decide("req1", `{"decision":"deny"}`, readerP) + provider.set(func(f *recordingAdminConsent) { f.redirect = "" }) + for name, rec := range map[string]*httptest.ResponseRecorder{"allow": allow, "deny": deny} { + if rec.Code != http.StatusInternalServerError || strings.Contains(rec.Body.String(), foreign) { + t.Fatalf("%s answering %q = %d %s, want 500 without the URI", name, foreign, rec.Code, rec.Body.String()) + } + } + } + // The registered redirect with its own query and a fragment kept. + provider.set(func(f *recordingAdminConsent) { f.redirect = "myagent:/callback?state=1&code=c9#frag" }) + rec := decide("req1", `{"decision":"allow","scopes":["admin:read"]}`, readerP) + provider.set(func(f *recordingAdminConsent) { f.redirect = "" }) + if rec.Code != http.StatusOK || !strings.Contains(rec.Body.String(), "code=c9") { + t.Fatalf("the registered redirect = %d %s", rec.Code, rec.Body.String()) + } + }) + t.Run("malformed bodies and the body cap", func(t *testing.T) { before := provider.callCount() for _, body := range []string{ @@ -456,3 +490,39 @@ func TestMCPAdminConsent(t *testing.T) { } }) } + +// TestMCPConsentSameRedirect locks the redirect check of the consent +// decision (32.2 WR-06): the provider's redirect must keep the registered +// URI's scheme, user info, host with port, path and opaque part; only the +// query and fragment may differ. Runs under -short. +func TestMCPConsentSameRedirect(t *testing.T) { + const want = "https://agent.example.test:8443/oauth/cb?x=1" + for got, ok := range map[string]bool{ + "https://agent.example.test:8443/oauth/cb?x=1&code=a&state=s": true, + "https://agent.example.test:8443/oauth/cb?error=access_denied": true, + "https://agent.example.test:8443/oauth/cb#frag": true, + "http://agent.example.test:8443/oauth/cb?code=a": false, + "https://agent.example.test/oauth/cb?code=a": false, + "https://evil.example:8443/oauth/cb?code=a": false, + "https://user@agent.example.test:8443/oauth/cb?code=a": false, + "https://agent.example.test:8443/oauth/cb/../x?code=a": false, + "https://agent.example.test:8443/oauth/cb2?code=a": false, + "//agent.example.test:8443/oauth/cb?code=a": false, + "javascript:alert(1)": false, + "": false, + "%zz": false, + } { + if mcpConsentSameRedirect(want, got) != ok { + t.Fatalf("mcpConsentSameRedirect(%q, %q) = %v, want %v", want, got, !ok, ok) + } + } + if !mcpConsentSameRedirect("urn:ietf:wg:oauth:2.0:oob", "urn:ietf:wg:oauth:2.0:oob?code=a") { + t.Fatal("an opaque redirect with a query added does not match") + } + if mcpConsentSameRedirect("urn:ietf:wg:oauth:2.0:oob", "urn:ietf:wg:oauth:2.0:other?code=a") { + t.Fatal("a different opaque redirect matches") + } + if mcpConsentSameRedirect("", "https://agent.example.test/cb") { + t.Fatal("an empty registered redirect matches") + } +} diff --git a/modules/cabana/mcp_consent.go b/modules/cabana/mcp_consent.go index d6ea5f62..a65ad5cc 100644 --- a/modules/cabana/mcp_consent.go +++ b/modules/cabana/mcp_consent.go @@ -81,6 +81,29 @@ func mcpConsentRedirectHost(raw string) string { return u.String() } +// mcpConsentSameRedirect reports whether got, the redirect a provider +// answered for a decision, goes back to want, the pending request's +// registered redirect URI: the same scheme, user info, host (with its +// port), path and opaque part, whatever query and fragment it adds (the +// code, state, iss or error parameters). An unparsable or empty URI never +// matches, so the consent screen never sends the browser anywhere the +// request did not name. +func mcpConsentSameRedirect(want, got string) bool { + if want == "" || got == "" { + return false + } + w, err := url.Parse(want) + if err != nil { + return false + } + g, err := url.Parse(got) + if err != nil { + return false + } + return g.Scheme != "" && g.Scheme == w.Scheme && g.User.String() == w.User.String() && + g.Host == w.Host && g.Opaque == w.Opaque && g.EscapedPath() == w.EscapedPath() +} + // mcpConsentShow serves GET /mcp/consent/{request}: the pending MCP // authorization request of an administrator-only grant, as the published // pact.MCPAdminConsent resolves it for the signed-in administrator, with @@ -152,8 +175,11 @@ func (s *service) mcpConsentShow(w http.ResponseWriter, r *http.Request) { // and that the administrator can grant (others are dropped, not refused), // normalises them as personal-token creation does (* collapses to ["*"]) // and answers 422 no_grantable_scopes when nothing is left; offline access -// is granted only when it was requested and the body asks for it. The -// provider owns the transaction and the lock of the pending request. +// is granted only when it was requested and the body asks for it. Both +// decisions load the request first (404 when it is gone), and the +// provider's redirect must go back to the request's redirect URI +// (mcpConsentSameRedirect), else 500. The provider owns the transaction +// and the lock of the pending request. func (s *service) mcpConsentDecide(w http.ResponseWriter, r *http.Request) { principal := accountPrincipal(w, r) if principal == nil { @@ -171,22 +197,26 @@ func (s *service) mcpConsentDecide(w http.ResponseWriter, r *http.Request) { WriteError(w, http.StatusBadRequest, "invalid_request", "Invalid request") return } + if body.Decision != "allow" && body.Decision != "deny" { + WriteError(w, http.StatusBadRequest, "invalid_request", "Invalid request") + return + } ctx := r.Context() requestID := r.PathValue("request") + // Both decisions load the request: an allow filters against its scopes, + // and either answer's redirect is checked against its redirect URI. + req, err := provider.MCPAdminConsentShow(ctx, principal.ID, requestID) + if errors.Is(err, pact.ErrMCPConsentNotFound) { + s.writeMCPConsentNotFound(w, r) + return + } + if err != nil { + moduleLog.ErrorContext(ctx, "cabana: mcp consent decide could not load the request", "admin_id", principal.ID, "error", err) + WriteError(w, http.StatusInternalServerError, "error", msgServerError) + return + } var decision pact.MCPAdminConsentDecision - switch body.Decision { - case "deny": - case "allow": - req, err := provider.MCPAdminConsentShow(ctx, principal.ID, requestID) - if errors.Is(err, pact.ErrMCPConsentNotFound) { - s.writeMCPConsentNotFound(w, r) - return - } - if err != nil { - moduleLog.ErrorContext(ctx, "cabana: mcp consent decide could not load the request", "admin_id", principal.ID, "error", err) - WriteError(w, http.StatusInternalServerError, "error", msgServerError) - return - } + if body.Decision == "allow" { grantable := map[string]bool{} for _, scope := range s.grantableConsentScopes(principal, req.Scopes) { grantable[scope.Name] = true @@ -211,9 +241,6 @@ func (s *service) mcpConsentDecide(w http.ResponseWriter, r *http.Request) { Scopes: scopes, OfflineAccess: req.OfflineAccess && body.OfflineAccess, } - default: - WriteError(w, http.StatusBadRequest, "invalid_request", "Invalid request") - return } redirect, err := provider.MCPAdminConsentDecide(ctx, principal.ID, requestID, decision) switch { @@ -228,6 +255,11 @@ func (s *service) mcpConsentDecide(w http.ResponseWriter, r *http.Request) { WriteError(w, http.StatusInternalServerError, "error", msgServerError) return } + if !mcpConsentSameRedirect(req.RedirectURI, redirect) { + moduleLog.ErrorContext(ctx, "cabana: mcp consent provider answered a foreign redirect", "admin_id", principal.ID, "allow", decision.Allow, "client_id", req.ClientID) + WriteError(w, http.StatusInternalServerError, "error", msgServerError) + return + } moduleLog.InfoContext(ctx, "cabana: mcp consent decided", "admin_id", principal.ID, "allow", decision.Allow, "scopes", decision.Scopes) WriteData(w, http.StatusOK, MCPConsentDecisionView{RedirectURI: redirect}, nil) } diff --git a/modules/pact/README.md b/modules/pact/README.md index 2a79485b..2440bb5c 100644 --- a/modules/pact/README.md +++ b/modules/pact/README.md @@ -166,7 +166,7 @@ func (p *BlogPlugin) Schedule() []pact.ScheduledCommand { | `pact.MCPTokenVerifier` | Published by the OAuth server plugin: verifies an access token at the MCP endpoint into a `pact.MCPGrant` (user, client, token, scopes, expiry and, for a `backend` grant, `BackendUserID`, the backend account the consent showed) and names its resource. `pact.MCPGrant.Subject` says what the grant acts as: empty is the frontend user in `UserID` (the meaning every grant had before), `pact.MCPGrantSubjectBackend` is the administrator in `pact.MCPGrant.BackendUserID` alone, with `UserID` 0 and no frontend user; the MCP endpoint refuses any other value. A refused token is `pact.ErrMCPTokenInvalid`. The interface is only `MCPVerifyToken` and `MCPResource`. | | `pact.MCPAdvertisedScopes` | Optional second interface on that verifier. `pact.MCPAdvertisedScopes.MCPScopesSupported` is the MCP scope list pier copies into protected-resource metadata when the slice is non-empty. | | `pact.MCPPersonalTokenResolver` | Published by the one plugin whose personal tokens may open an MCP session (one resolver per application): resolves a raw token into a `pact.MCPSubject` whose `TokenID` identifies the token row (it keys the session binding; a subject without one is refused); false when the prefix is not its own, which the endpoint answers as unauthorized. | -| `pact.MCPAdminConsent` | Published (`app.Publish`) by the plugin that owns the MCP authorization server, one per application: `pact.MCPAdminConsent.MCPAdminConsentShow` answers a pending request for the signed-in administrator as a `pact.MCPAdminConsentRequest`, `pact.MCPAdminConsent.MCPAdminConsentDecide` applies a `pact.MCPAdminConsentDecision` and answers the client redirect URI. The framework serves the consent endpoints of the admin API over it and applies the scope policy before calling Decide; the provider only resolves and issues. | +| `pact.MCPAdminConsent` | Published (`app.Publish`) by the plugin that owns the MCP authorization server, one per application: `pact.MCPAdminConsent.MCPAdminConsentShow` answers a pending request for the signed-in administrator as a `pact.MCPAdminConsentRequest`, `pact.MCPAdminConsent.MCPAdminConsentDecide` applies a `pact.MCPAdminConsentDecision` and answers the client redirect URI. The framework serves the consent endpoints of the admin API over it and applies the scope policy before calling Decide, and refuses (500) a redirect URI from Decide that does not go back to the request's `pact.MCPAdminConsentRequest.RedirectURI` (same scheme, host and path); the provider only resolves and issues. | | `pact.MCPAdminConsentRequest` | A pending request as the administrator's consent screen shows it: request and client ids, client name, logo URL, redirect URI, requested data scopes (`offline_access` excluded), whether `offline_access` was requested, whether consent must be asked and the expiry. | | `pact.MCPAdminConsentDecision` | The administrator's answer: `Allow`, the scopes to grant (already filtered by the framework) and `OfflineAccess`. | | `pact.ErrMCPConsentNotFound` / `pact.ErrMCPConsentNoScopes` | What a `pact.MCPAdminConsent` answers for a missing, expired, used or foreign request, and for an allow that leaves nothing to grant. | diff --git a/modules/pact/mcp.go b/modules/pact/mcp.go index 51959fe6..cab32664 100644 --- a/modules/pact/mcp.go +++ b/modules/pact/mcp.go @@ -343,6 +343,10 @@ type MCPPersonalTokenResolver interface { // and owns the scope policy: it shows only requested scopes the // administrator can grant and filters a decision the same way before it // calls MCPAdminConsentDecide, so the provider only resolves and issues. +// The framework also loads the request before either decision and refuses +// a redirect URI from MCPAdminConsentDecide that does not go back to its +// RedirectURI (same scheme, user info, host and path; the query and +// fragment may differ). // // MCPAdminConsentShow answers the pending request requestID for the // administrator adminID; a missing, expired, used or foreign request is