diff --git a/package-lock.json b/package-lock.json index f6fde0f6a99..f0f6d1ee1ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24396,6 +24396,7 @@ "@vitest/coverage-v8": "^3.2.4", "@wc-toolkit/storybook-helpers": "^9.0.1", "del": "^8.0.1", + "dom-accessibility-api": "^0.7.1", "globby": "^14.1.0", "happy-dom": "^18.0.1", "lit": "^3.3.1", @@ -24466,6 +24467,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "packages/craftcms-cp/node_modules/dom-accessibility-api": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.7.1.tgz", + "integrity": "sha512-vdnCeZD+3wZ+8h8xXL/ZtBlvvoobOFyPzSiIfO6sGOZDqjFx4aLMAjZhl4rawj5xYz3UwP6Tgvyh0iH4IOCVnQ==", + "dev": true, + "license": "MIT" + }, "packages/craftcms-cp/node_modules/glob": { "version": "11.0.3", "dev": true, diff --git a/packages/craftcms-cp/package.json b/packages/craftcms-cp/package.json index 62d84c98e72..26376f942f8 100644 --- a/packages/craftcms-cp/package.json +++ b/packages/craftcms-cp/package.json @@ -73,6 +73,7 @@ "@vitest/coverage-v8": "^3.2.4", "@wc-toolkit/storybook-helpers": "^9.0.1", "del": "^8.0.1", + "dom-accessibility-api": "^0.7.1", "globby": "^14.1.0", "happy-dom": "^18.0.1", "lit": "^3.3.1", diff --git a/packages/craftcms-cp/src/components/button/button.styles.ts b/packages/craftcms-cp/src/components/button/button.styles.ts index 08b523e9ec1..7feb310361c 100644 --- a/packages/craftcms-cp/src/components/button/button.styles.ts +++ b/packages/craftcms-cp/src/components/button/button.styles.ts @@ -164,6 +164,25 @@ export default css` craft-button-reset, craft-button-submit { /* Temporarily make it very obvious when these are used */ - outline: 10px solid red; + outline: 10px solid var(--c-button-danger-border); + } + + .a11y-error { + position: relative; + outline: 2px solid var(--c-color-danger-border-normal) !important; + background-color: rgba(255, 0, 0, 0.1) !important; + + &:after { + content: '!'; + position: absolute; + display: inline-flex; + font-size: calc(11rem / 16); + padding: 0.125em 0.5em 0.25em; + inset-block-start: -2px; + inset-inline-start: 0; + background: var(--c-color-danger-bg-emphasis); + color: white; + transform: translateX(-100%); + } } `; diff --git a/packages/craftcms-cp/src/components/button/button.ts b/packages/craftcms-cp/src/components/button/button.ts index d9ebdc1630f..0e077ccc90e 100644 --- a/packages/craftcms-cp/src/components/button/button.ts +++ b/packages/craftcms-cp/src/components/button/button.ts @@ -1,8 +1,10 @@ import {LionButtonSubmit} from '@lion/ui/button.js'; import {html, nothing} from 'lit'; -import {property} from 'lit/decorators.js'; +import {property, state} from 'lit/decorators.js'; import styles from './button.styles.js'; import '../spinner/spinner.js'; +import '../icon/icon.js'; +import {computeAccessibleName} from 'dom-accessibility-api'; import {classMap} from 'lit/directives/class-map.js'; /** @@ -26,6 +28,27 @@ export default class CraftButton extends LionButtonSubmit { return [...super.styles, styles]; } + override async firstUpdated(changedProperties: Map) { + super.firstUpdated(changedProperties); + + await this.updateComplete; + + const childComponents = this.querySelectorAll('craft-icon, craft-spinner'); + await Promise.all( + Array.from(childComponents).map((child: any) => child.updateComplete) + ); + + if (!this.accessibleName) { + this.accessibleName = computeAccessibleName(this); + } + + this._hasAccessibilityError = + !this.accessibleName || this.accessibleName.trim() === ''; + } + + /** The computed accessible name */ + @property() accessibleName: string; + /** Visual appearance of the button */ @property({reflect: true}) appearance: 'accent' | 'plain' = 'accent'; @@ -43,6 +66,9 @@ export default class CraftButton extends LionButtonSubmit { /** Set align-items for the content */ @property() align: 'start' | 'end' | 'center' = 'center'; + @state() + private _hasAccessibilityError: boolean = false; + override render() { return html`
diff --git a/packages/craftcms-cp/src/components/nav-item/nav-item.ts b/packages/craftcms-cp/src/components/nav-item/nav-item.ts index 1a847e34c3c..e398716c23b 100644 --- a/packages/craftcms-cp/src/components/nav-item/nav-item.ts +++ b/packages/craftcms-cp/src/components/nav-item/nav-item.ts @@ -108,20 +108,25 @@ export default class CraftNavItem extends LitElement { ${hasSubnav ? html` - - + ` @@ -143,7 +148,7 @@ export default class CraftNavItem extends LitElement { aria-current="${this.active ? 'page' : false}" > ${hasPrefix ? this.renderPrefix() : nothing} - + ${this.renderSuffix(hasSubnav)} `; diff --git a/resources/build/AppLayout.js b/resources/build/AppLayout.js index 38c743ff1ca..7f31b826b6a 100644 --- a/resources/build/AppLayout.js +++ b/resources/build/AppLayout.js @@ -1 +1 @@ -import{d as $,ad as F,l as C,o as s,q as R,s as f,w as N,a as e,c as t,m as c,t as u,_ as k,F as g,p as D,b as x,u as v,a0 as I,A as w,a7 as z,U as y,af as J,v as j,a2 as O,ak as M,ab as P,Y as Q,z as U,ai as Y,a6 as G,r as h,B as H,al as K,e as W}from"./cp3.js";const X={class:"system-info__icon"},Z=["src"],ee={class:"system-info__name"},se=$({__name:"SystemInfo",setup(a){const i=F(),o=f(()=>i.system),n=f(()=>i.site),l=f(()=>n.value.url?"a":"div");return(_,d)=>(s(),C(R(l.value),{class:"system-info",href:n.value.url,target:n.value.url?"_blank":null},{default:N(()=>[e("div",X,[o.value.icon?(s(),t("img",{key:0,src:o.value.icon.url,alt:""},null,8,Z)):c("",!0)]),e("div",ee,u(o.value.name),1)]),_:1},8,["href","target"]))}}),T=k(se,[["__scopeId","data-v-f4725d04"]]),te=["icon","href","active","indicator"],ae={key:0,slot:"subnav"},ie=["active","href","indicator"],ne=["name"],oe={key:1,class:"nav-indicator",slot:"icon"},le=[".displayedJob",".hasReservedJobs",".hasWaitingJobs"],re=$({__name:"MainNav",setup(a){const i=I(),{nav:o}=F(),n=f(()=>i.props.queue);return(l,_)=>(s(),t("craft-nav-list",null,[(s(!0),t(g,null,D(v(o),d=>(s(),t("craft-nav-item",{key:d.url,icon:d.icon,href:d.url,active:d.sel,indicator:!!d.badgeCount},[x(u(d.label)+" ",1),d.subnav?(s(),t(g,{key:0},[d.subnav?(s(),t("craft-nav-list",ae,[(s(!0),t(g,null,D(d.subnav,m=>(s(),t("craft-nav-item",{key:m.url,active:m.sel,href:m.url,indicator:!!m.badgeCount},[m.icon?(s(),t("craft-icon",{key:0,name:m.icon,slot:"icon"},null,8,ne)):(s(),t("span",oe)),x(" "+u(m.label),1)],8,ie))),128))])):c("",!0)],64)):c("",!0)],8,te))),128)),e("cp-queue-indicator",{".displayedJob":n.value.displayedJob,".hasReservedJobs":n.value.hasReservedJobs,".hasWaitingJobs":n.value.hasWaitingJobs},null,40,le)]))}}),de=k(re,[["__scopeId","data-v-2115cac3"]]),ce={class:"flex justify-center py-4 px-2 text-muted"},ue={lang:"en",class:"flex items-center gap-2"},be={class:"edition-logo"},_e={"aria-hidden":"true"},ve={class:"sr-only"},fe=$({__name:"EditionInfo",setup(a){const{app:i}=F(),o=f(()=>`${i.edition.name} Edition`);return(n,l)=>(s(),t("div",ce,[e("div",null,[e("span",ue,[l[0]||(l[0]=x(" Craft CMS ",-1)),e("span",be,[e("span",_e,u(v(i).edition.name),1),e("span",ve,u(o.value),1)]),x(" "+u(v(i).version),1)])])]))}}),me=k(fe,[["__scopeId","data-v-f8b4ece7"]]),pe={},he={class:"dev-mode"};function ye(a,i){return s(),t("div",he,[...i[0]||(i[0]=[e("div",{class:"inline-flex py-1 px-2 bg-slate-900 text-slate-100 font-mono text-xs rounded-lg"}," Dev Mode is enabled ",-1)])])}const ge=k(pe,[["render",ye],["__scopeId","data-v-52fa7a33"]]),$e=["data-visibility","data-mode"],ke={class:"cp-sidebar__header"},xe={key:0,class:"sidebar-header"},Ce={class:"cp-sidebar__body"},Se={class:"cp-sidebar__footer"},we=$({__name:"CpSidebar",props:{mode:{default:"floating"},visibility:{default:"hidden"}},emits:["close","dock"],setup(a,{emit:i}){const o=i,n=f(()=>a.mode==="floating");return w(()=>a.visibility,async l=>{n.value&&l==="visible"&&(await z(),document.querySelector(".cp-sidebar").querySelector('button, [href], [tabindex]:not([tabindex="-1"])')?.focus())}),(l,_)=>(s(),t("nav",{class:"cp-sidebar","data-visibility":a.visibility,"data-mode":a.mode},[a.visibility==="visible"?(s(),t(g,{key:0},[e("div",ke,[a.mode!=="docked"?(s(),t("div",xe,[y(T),_[2]||(_[2]=e("div",{class:"ml-auto"},null,-1)),e("craft-button",{size:"small",icon:"",onClick:_[0]||(_[0]=d=>o("close")),type:"button"},[..._[1]||(_[1]=[e("craft-icon",{name:"x",style:{"font-size":"0.7em"}},null,-1)])])])):c("",!0)]),e("div",Ce,[y(de)]),e("div",Se,[y(me),y(ge)])],64)):c("",!0)],8,$e))}}),Je=k(we,[["__scopeId","data-v-22a18951"]]),Be={class:"breadcrumbs"},De={key:2,class:"separator"},Fe=$({__name:"Breadcrumbs",props:{items:{},separator:{default:"/"}},setup(a){return(i,o)=>(s(),t("ul",Be,[(s(!0),t(g,null,D(a.items,(n,l)=>(s(),t("li",{key:l,class:J({"breadcrumb-item":!0,"breadcrumb-item--active":l===a.items.length-1})},[n.url?(s(),C(j,{key:0,href:n.url},{default:N(()=>[x(u(n.label),1)]),_:2},1032,["href"])):(s(),t(g,{key:1},[x(u(n.label),1)],64)),l(s(),C(O,null,{default:N(()=>[v(i)?(s(),t("div",We,u(v(i)),1)):c("",!0)]),_:1}))}}),Me={class:"cp"},Te={class:"cp__header"},qe={class:"flex gap-2 p-2"},Le=["name"],Ve={key:0,variant:"danger",rounded:"none"},Ae={key:1,variant:"success",rounded:"none"},Ee={class:"cp__sidebar"},Re={class:"cp__main"},ze={key:0,class:"px-4 py-2 border-b border-b-border-subtle"},je={class:"index-grid index-grid--header"},Oe={class:"index-grid__aside"},Pe={class:"text-xl"},Qe={class:"index-grid__main"},Ue={class:"cp__footer"},Ye={key:0,class:"fixed bottom-2 right-2 flex gap-2 justify-end items-center p-2"},Ge={class:"bg-blue-50 border border-blue-500 py-1 px-4 rounded"},He=["label"],Ke=["label"],Xe=$({__name:"AppLayout",props:{title:{},debug:{},fullWidth:{type:Boolean,default:!1}},setup(a){P(r=>({v0174160f:A.value}));const i=I(),o=f(()=>i.props.flash?.error),n=f(()=>i.props.flash?.success),l=f(()=>i.props.crumbs??null),_=Q("sidebarToggle"),{announcement:d,announce:m}=M();w(n,r=>m(r)),w(o,r=>m(r));const b=Y({sidebar:{mode:"floating",visibility:"hidden"}}),B=U("(min-width: 1024px)"),S=H(!1);w(B,r=>{r?(b.sidebar.mode="docked",b.sidebar.visibility="visible"):(b.sidebar.mode="floating",b.sidebar.visibility="hidden")},{immediate:!0});function q(){b.sidebar.visibility==="visible"?b.sidebar.visibility="hidden":b.sidebar.visibility="visible"}function L(){b.sidebar.visibility="hidden",_.value.focus()}const V=f(()=>b.sidebar.visibility==="visible"?"x":"bars"),A=f(()=>b.sidebar.mode==="docked"?b.sidebar.visibility==="visible"?"var(--global-sidebar-width)":"0":"auto");return(r,p)=>(s(),t(g,null,[y(v(G),{title:a.title},null,8,["title"]),y(Ie,{debug:!0}),e("div",Me,[e("div",Te,[e("div",qe,[v(B)?c("",!0):(s(),t("craft-button",{key:0,icon:"",type:"button",appearance:"plain",onClick:q,ref_key:"sidebarToggle",ref:_},[e("craft-icon",{name:V.value},null,8,Le)],512)),v(B)?(s(),C(T,{key:1})):c("",!0),p[2]||(p[2]=e("div",{class:"ml-auto"},null,-1)),p[3]||(p[3]=e("craft-button",{icon:"",appearance:"plain"},[e("craft-icon",{name:"search"})],-1))]),o.value?(s(),t("craft-callout",Ve,u(o.value),1)):c("",!0),n.value?(s(),t("craft-callout",Ae,u(n.value),1)):c("",!0)]),e("div",Ee,[y(Je,{mode:b.sidebar.mode,visibility:b.sidebar.visibility,onClose:L},null,8,["mode","visibility"])]),e("div",Re,[h(r.$slots,"main",{},()=>[e("main",null,[h(r.$slots,"breadcrumbs",{},()=>[l.value?(s(),t("div",ze,[y(Ne,{items:l.value},null,8,["items"])])):c("",!0)],!0),h(r.$slots,"header",{},()=>[e("div",{class:J({container:!0,"container--full":a.fullWidth})},[e("div",je,[e("div",Oe,[h(r.$slots,"title",{},()=>[e("h1",Pe,u(a.title),1)],!0),h(r.$slots,"title-badge",{},void 0,!0)]),e("div",Qe,[h(r.$slots,"actions",{},void 0,!0)])])],2)],!0),e("div",{class:J({container:!0,"container--full":a.fullWidth})},[h(r.$slots,"default",{},void 0,!0)],2)])],!0)]),e("div",Ue,[e("footer",null,[e("div",{class:J({container:!0,"container--full":a.fullWidth})},[h(r.$slots,"footer",{},void 0,!0)],2)])])]),a.debug?(s(),t("div",Ye,[e("div",Ge,u(v(d)??"No announcement"),1),e("div",null,[S.value?(s(),C(K,{key:0,data:a.debug,class:"max-h-[50vh] max-w-[600px] overflow-scroll absolute transform -translate-full"},null,8,["data"])):c("",!0),S.value?(s(),t("craft-button",{key:1,icon:"",type:"button",onClick:p[0]||(p[0]=E=>S.value=!1)},[e("craft-icon",{label:v(W)("Close Debug panel"),name:"x"},null,8,He)])):(s(),t("craft-button",{key:2,type:"button",onClick:p[1]||(p[1]=E=>S.value=!0),icon:""},[e("craft-icon",{name:"code",label:v(W)("Show debug variables")},null,8,Ke)]))])])):c("",!0)],64))}}),es=k(Xe,[["__scopeId","data-v-aa1ed59c"]]);export{es as A}; +import{d as g,ad as N,l as S,o as s,q as R,s as v,w as T,a as e,c as t,m as u,t as _,_ as $,F as y,p as F,b as x,u as c,a0 as W,A as J,a7 as z,U as p,i as C,af as B,v as j,a2 as O,ak as I,ab as P,Y as Q,z as U,ai as Y,a6 as G,r as h,B as H,al as K}from"./cp3.js";const X={class:"system-info__icon"},Z=["src"],ee={class:"system-info__name"},se=g({__name:"SystemInfo",setup(a){const i=N(),o=v(()=>i.system),n=v(()=>i.site),l=v(()=>n.value.url?"a":"div");return(f,d)=>(s(),S(R(l.value),{class:"system-info",href:n.value.url,target:n.value.url?"_blank":null},{default:T(()=>[e("div",X,[o.value.icon?(s(),t("img",{key:0,src:o.value.icon.url,alt:""},null,8,Z)):u("",!0)]),e("div",ee,_(o.value.name),1)]),_:1},8,["href","target"]))}}),M=$(se,[["__scopeId","data-v-f4725d04"]]),te=["icon","href","active","indicator"],ae={key:0,slot:"subnav"},ie=["active","href","indicator"],ne=["name"],oe={key:1,class:"nav-indicator",slot:"icon"},le=[".displayedJob",".hasReservedJobs",".hasWaitingJobs"],re=g({__name:"MainNav",setup(a){const i=W(),{nav:o}=N(),n=v(()=>i.props.queue);return(l,f)=>(s(),t("craft-nav-list",null,[(s(!0),t(y,null,F(c(o),d=>(s(),t("craft-nav-item",{key:d.url,icon:d.icon,href:d.url,active:d.sel,indicator:!!d.badgeCount},[x(_(d.label)+" ",1),d.subnav?(s(),t(y,{key:0},[d.subnav?(s(),t("craft-nav-list",ae,[(s(!0),t(y,null,F(d.subnav,m=>(s(),t("craft-nav-item",{key:m.url,active:m.sel,href:m.url,indicator:!!m.badgeCount},[m.icon?(s(),t("craft-icon",{key:0,name:m.icon,slot:"icon"},null,8,ne)):(s(),t("span",oe)),x(" "+_(m.label),1)],8,ie))),128))])):u("",!0)],64)):u("",!0)],8,te))),128)),e("cp-queue-indicator",{".displayedJob":n.value.displayedJob,".hasReservedJobs":n.value.hasReservedJobs,".hasWaitingJobs":n.value.hasWaitingJobs},null,40,le)]))}}),de=$(re,[["__scopeId","data-v-2115cac3"]]),ce={class:"flex justify-center py-4 px-2 text-muted"},ue={lang:"en",class:"flex items-center gap-2"},_e={class:"edition-logo"},be={"aria-hidden":"true"},ve={class:"sr-only"},fe=g({__name:"EditionInfo",setup(a){const{app:i}=N(),o=v(()=>`${i.edition.name} Edition`);return(n,l)=>(s(),t("div",ce,[e("div",null,[e("span",ue,[l[0]||(l[0]=x(" Craft CMS ",-1)),e("span",_e,[e("span",be,_(c(i).edition.name),1),e("span",ve,_(o.value),1)]),x(" "+_(c(i).version),1)])])]))}}),me=$(fe,[["__scopeId","data-v-f8b4ece7"]]),he={},pe={class:"dev-mode"};function ye(a,i){return s(),t("div",pe,[...i[0]||(i[0]=[e("div",{class:"inline-flex py-1 px-2 bg-slate-900 text-slate-100 font-mono text-xs rounded-lg"}," Dev Mode is enabled ",-1)])])}const ge=$(he,[["render",ye],["__scopeId","data-v-52fa7a33"]]),$e=["data-visibility","data-mode"],ke={class:"cp-sidebar__header"},xe={key:0,class:"sidebar-header"},Ce=["label"],Se={class:"cp-sidebar__body"},we={class:"cp-sidebar__footer"},Je=g({__name:"CpSidebar",props:{mode:{default:"floating"},visibility:{default:"hidden"}},emits:["close","dock"],setup(a,{emit:i}){const o=i,n=v(()=>a.mode==="floating");return J(()=>a.visibility,async l=>{n.value&&l==="visible"&&(await z(),document.querySelector(".cp-sidebar").querySelector('button, [href], [tabindex]:not([tabindex="-1"])')?.focus())}),(l,f)=>(s(),t("nav",{class:"cp-sidebar","data-visibility":a.visibility,"data-mode":a.mode},[a.visibility==="visible"?(s(),t(y,{key:0},[e("div",ke,[a.mode!=="docked"?(s(),t("div",xe,[p(M),f[1]||(f[1]=e("div",{class:"ml-auto"},null,-1)),e("craft-button",{size:"small",icon:"",onClick:f[0]||(f[0]=d=>o("close")),type:"button"},[e("craft-icon",{name:"x",style:{"font-size":"0.7em"},label:c(C)("Close")},null,8,Ce)])])):u("",!0)]),e("div",Se,[p(de)]),e("div",we,[p(me),p(ge)])],64)):u("",!0)],8,$e))}}),Be=$(Je,[["__scopeId","data-v-7f5f0148"]]),De={class:"breadcrumbs"},Fe={key:2,class:"separator"},Ne=g({__name:"Breadcrumbs",props:{items:{},separator:{default:"/"}},setup(a){return(i,o)=>(s(),t("ul",De,[(s(!0),t(y,null,F(a.items,(n,l)=>(s(),t("li",{key:l,class:B({"breadcrumb-item":!0,"breadcrumb-item--active":l===a.items.length-1})},[n.url?(s(),S(j,{key:0,href:n.url},{default:T(()=>[x(_(n.label),1)]),_:2},1032,["href"])):(s(),t(y,{key:1},[x(_(n.label),1)],64)),l(s(),S(O,null,{default:T(()=>[c(i)?(s(),t("div",We,_(c(i)),1)):u("",!0)]),_:1}))}}),Me={class:"cp"},qe={class:"cp__header"},Le={class:"flex gap-2 p-2"},Ve=["name","label"],Ae={icon:"",appearance:"plain"},Ee=["label"],Re={key:0,variant:"danger",rounded:"none"},ze={key:1,variant:"success",rounded:"none"},je={class:"cp__sidebar"},Oe={class:"cp__main"},Pe={key:0,class:"px-4 py-2 border-b border-b-border-subtle"},Qe={class:"index-grid index-grid--header"},Ue={class:"index-grid__aside"},Ye={class:"text-xl"},Ge={class:"index-grid__main"},He={class:"cp__footer"},Ke={key:0,class:"fixed bottom-2 right-2 flex gap-2 justify-end items-center p-2"},Xe={class:"bg-blue-50 border border-blue-500 py-1 px-4 rounded"},Ze=["label"],es=["label"],ss=g({__name:"AppLayout",props:{title:{},debug:{},fullWidth:{type:Boolean,default:!1}},setup(a){P(r=>({v18fa8ee2:A.value}));const i=W(),o=v(()=>i.props.flash?.error),n=v(()=>i.props.flash?.success),l=v(()=>i.props.crumbs??null),f=Q("sidebarToggle"),{announcement:d,announce:m}=I();J(n,r=>m(r)),J(o,r=>m(r));const b=Y({sidebar:{mode:"floating",visibility:"hidden"}}),D=U("(min-width: 1024px)"),w=H(!1);J(D,r=>{r?(b.sidebar.mode="docked",b.sidebar.visibility="visible"):(b.sidebar.mode="floating",b.sidebar.visibility="hidden")},{immediate:!0});function q(){b.sidebar.visibility==="visible"?b.sidebar.visibility="hidden":b.sidebar.visibility="visible"}function L(){b.sidebar.visibility="hidden",f.value.focus()}const V=v(()=>b.sidebar.visibility==="visible"?"x":"bars"),A=v(()=>b.sidebar.mode==="docked"?b.sidebar.visibility==="visible"?"var(--global-sidebar-width)":"0":"auto");return(r,k)=>(s(),t(y,null,[p(c(G),{title:a.title},null,8,["title"]),p(Ie,{debug:!0}),e("div",Me,[e("div",qe,[e("div",Le,[c(D)?u("",!0):(s(),t("craft-button",{key:0,icon:"",type:"button",appearance:"plain",onClick:q,ref_key:"sidebarToggle",ref:f},[e("craft-icon",{name:V.value,label:c(C)("Toggle menu")},null,8,Ve)],512)),c(D)?(s(),S(M,{key:1})):u("",!0),k[2]||(k[2]=e("div",{class:"ml-auto"},null,-1)),e("craft-button",Ae,[e("craft-icon",{name:"search",label:c(C)("Search")},null,8,Ee)])]),o.value?(s(),t("craft-callout",Re,_(o.value),1)):u("",!0),n.value?(s(),t("craft-callout",ze,_(n.value),1)):u("",!0)]),e("div",je,[p(Be,{mode:b.sidebar.mode,visibility:b.sidebar.visibility,onClose:L},null,8,["mode","visibility"])]),e("div",Oe,[h(r.$slots,"main",{},()=>[e("main",null,[h(r.$slots,"breadcrumbs",{},()=>[l.value?(s(),t("div",Pe,[p(Te,{items:l.value},null,8,["items"])])):u("",!0)],!0),h(r.$slots,"header",{},()=>[e("div",{class:B({container:!0,"container--full":a.fullWidth})},[e("div",Qe,[e("div",Ue,[h(r.$slots,"title",{},()=>[e("h1",Ye,_(a.title),1)],!0),h(r.$slots,"title-badge",{},void 0,!0)]),e("div",Ge,[h(r.$slots,"actions",{},void 0,!0)])])],2)],!0),e("div",{class:B({container:!0,"container--full":a.fullWidth})},[h(r.$slots,"default",{},void 0,!0)],2)])],!0)]),e("div",He,[e("footer",null,[e("div",{class:B({container:!0,"container--full":a.fullWidth})},[h(r.$slots,"footer",{},void 0,!0)],2)])])]),a.debug?(s(),t("div",Ke,[e("div",Xe,_(c(d)??"No announcement"),1),e("div",null,[w.value?(s(),S(K,{key:0,data:a.debug,class:"max-h-[50vh] max-w-[600px] overflow-scroll absolute transform -translate-full"},null,8,["data"])):u("",!0),w.value?(s(),t("craft-button",{key:1,icon:"",type:"button",onClick:k[0]||(k[0]=E=>w.value=!1)},[e("craft-icon",{label:c(C)("Close Debug panel"),name:"x"},null,8,Ze)])):(s(),t("craft-button",{key:2,type:"button",onClick:k[1]||(k[1]=E=>w.value=!0),icon:""},[e("craft-icon",{name:"code",label:c(C)("Show debug variables")},null,8,es)]))])])):u("",!0)],64))}}),as=$(ss,[["__scopeId","data-v-05cadcff"]]);export{as as A}; diff --git a/resources/build/CalloutReadOnly.vue_vue_type_script_setup_true_lang.js b/resources/build/CalloutReadOnly.vue_vue_type_script_setup_true_lang.js index ad00aee0eda..9f174518c6a 100644 --- a/resources/build/CalloutReadOnly.vue_vue_type_script_setup_true_lang.js +++ b/resources/build/CalloutReadOnly.vue_vue_type_script_setup_true_lang.js @@ -1 +1 @@ -import{d as s,c as a,o,a as r,r as n,b as l,t as c,u as i,e as d}from"./cp3.js";const u={appearance:"fill",rounded:"start",class:"border border-b-border-subtle"},f=s({__name:"CalloutReadOnly",setup(p){return(t,e)=>(o(),a("craft-callout",u,[e[0]||(e[0]=r("craft-icon",{slot:"icon",name:"custom-icons/gear-slash"},null,-1)),n(t.$slots,"default",{},()=>[l(c(i(d)("Changes to these settings arenʼt permitted in this environment.")),1)])]))}});export{f as _}; +import{d as s,c as a,o,a as r,r as n,b as l,t as c,u as i,i as d}from"./cp3.js";const u={appearance:"fill",rounded:"start",class:"border border-b-border-subtle"},f=s({__name:"CalloutReadOnly",setup(p){return(t,e)=>(o(),a("craft-callout",u,[e[0]||(e[0]=r("craft-icon",{slot:"icon",name:"custom-icons/gear-slash"},null,-1)),n(t.$slots,"default",{},()=>[l(c(i(d)("Changes to these settings arenʼt permitted in this environment.")),1)])]))}});export{f as _}; diff --git a/resources/build/CpQueueIndicator.js b/resources/build/CpQueueIndicator.js index da60c38f136..b17c122bba9 100644 --- a/resources/build/CpQueueIndicator.js +++ b/resources/build/CpQueueIndicator.js @@ -1,9 +1,9 @@ -import{i as k,n as y,f as M,Q as E,g as I,E as _,x as g,J as C,h as O}from"./cp3.js";var S=Object.defineProperty,j=Object.getOwnPropertyDescriptor,Q=e=>{throw TypeError(e)},u=(e,s,t,l)=>{for(var n=l>1?void 0:l?j(s,t):s,c=e.length-1,b;c>=0;c--)(b=e[c])&&(n=(l?b(s,t,n):b(n))||n);return l&&n&&S(s,t,n),n},W=(e,s,t)=>s.has(e)||Q("Cannot "+t),a=(e,s,t)=>(W(e,s,"read from private field"),t?t.call(e):s.get(e)),d=(e,s,t)=>s.has(e)?Q("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),p=(e,s,t)=>(W(e,s,"access private method"),t),r,J,h,i,f,v,w,$,m;let o=class extends M{constructor(){super(...arguments),d(this,i),this.displayedJob=null,this.hasReservedJobs=!1,this.hasWaitingJobs=!1,d(this,r,E.getInstance()),d(this,J,I.getInstance()),d(this,h,e=>{this.displayedJob=e.detail.displayedJob})}connectedCallback(){super.connectedCallback(),this.displayedJob||(this.displayedJob=a(this,r).displayedJob),a(this,r).addEventListener("job-update",a(this,h)),p(this,i,v).call(this),p(this,i,f).call(this)}disconnectedCallback(){super.disconnectedCallback(),a(this,r).removeEventListener("job-update",a(this,h))}update(e){super.update(e),(e.has("hasReservedJobs")||e.has("hasWaitingJobs"))&&p(this,i,f).call(this),e.has("displayedJob")&&p(this,i,v).call(this)}render(){if(!this.displayedJob)return _;const e=a(this,i,m);return g` +import{e as k,n as y,f as M,Q as x,g as E,E as _,x as g,J as C,h as I}from"./cp3.js";var O=Object.defineProperty,S=Object.getOwnPropertyDescriptor,Q=e=>{throw TypeError(e)},u=(e,s,t,l)=>{for(var n=l>1?void 0:l?S(s,t):s,c=e.length-1,b;c>=0;c--)(b=e[c])&&(n=(l?b(s,t,n):b(n))||n);return l&&n&&O(s,t,n),n},W=(e,s,t)=>s.has(e)||Q("Cannot "+t),a=(e,s,t)=>(W(e,s,"read from private field"),t?t.call(e):s.get(e)),d=(e,s,t)=>s.has(e)?Q("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),p=(e,s,t)=>(W(e,s,"access private method"),t),r,J,h,i,f,v,$,w,m;let o=class extends M{constructor(){super(...arguments),d(this,i),this.displayedJob=null,this.hasReservedJobs=!1,this.hasWaitingJobs=!1,d(this,r,x.getInstance()),d(this,J,E.getInstance()),d(this,h,e=>{this.displayedJob=e.detail.displayedJob})}connectedCallback(){super.connectedCallback(),this.displayedJob||(this.displayedJob=a(this,r).displayedJob),a(this,r).addEventListener("job-update",a(this,h)),p(this,i,v).call(this),p(this,i,f).call(this)}disconnectedCallback(){super.disconnectedCallback(),a(this,r).removeEventListener("job-update",a(this,h))}update(e){super.update(e),(e.has("hasReservedJobs")||e.has("hasWaitingJobs"))&&p(this,i,f).call(this),e.has("displayedJob")&&p(this,i,v).call(this)}render(){if(!this.displayedJob)return _;const e=a(this,i,m);return g`
@@ -13,7 +13,7 @@ import{i as k,n as y,f as M,Q as E,g as I,E as _,x as g,J as C,h as O}from"./cp3 >`:_}
- `}};r=new WeakMap;J=new WeakMap;h=new WeakMap;i=new WeakSet;f=function(){this.hasReservedJobs?a(this,r).startTracking():this.hasWaitingJobs&&a(this,r).runQueue()};v=function(){this.displayedJob?this.setAttribute("visible",""):this.removeAttribute("visible")};w=function(){return this.displayedJob?this.displayedJob.status.value===C.Failed?100:this.displayedJob.progress??0:0};$=function(){return this.displayedJob?.status.value===C.Failed};m=function(){return a(this,r).canAccessQueueManager?null:a(this,J).getCpUrl("utilities/queue-manager")};o.styles=k` + `}};r=new WeakMap;J=new WeakMap;h=new WeakMap;i=new WeakSet;f=function(){this.hasReservedJobs?a(this,r).startTracking():this.hasWaitingJobs&&a(this,r).runQueue()};v=function(){this.displayedJob?this.setAttribute("visible",""):this.removeAttribute("visible")};$=function(){return this.displayedJob?this.displayedJob.status.value===C.Failed?100:this.displayedJob.progress??0:0};w=function(){return this.displayedJob?.status.value===C.Failed};m=function(){return a(this,r).canAccessQueueManager?null:a(this,J).getCpUrl("utilities/queue-manager")};o.styles=k` :host { display: contents; } @@ -26,4 +26,4 @@ import{i as k,n as y,f as M,Q as E,g as I,E as _,x as g,J as C,h as O}from"./cp3 font-size: 0.85em; opacity: 0.7; } - `;u([y({type:Object,attribute:"displayed-job"})],o.prototype,"displayedJob",2);u([y({type:Boolean,attribute:"has-reserved-jobs"})],o.prototype,"hasReservedJobs",2);u([y({type:Boolean,attribute:"has-waiting-jobs"})],o.prototype,"hasWaitingJobs",2);o=u([O("cp-queue-indicator")],o);const x=o;export{x as default}; + `;u([y({type:Object,attribute:"displayed-job"})],o.prototype,"displayedJob",2);u([y({type:Boolean,attribute:"has-reserved-jobs"})],o.prototype,"hasReservedJobs",2);u([y({type:Boolean,attribute:"has-waiting-jobs"})],o.prototype,"hasWaitingJobs",2);o=u([I("cp-queue-indicator")],o);const q=o;export{q as default}; diff --git a/resources/build/DeleteSiteModal.vue_vue_type_script_setup_true_lang.js b/resources/build/DeleteSiteModal.vue_vue_type_script_setup_true_lang.js index 02e150873b0..56763fe9a73 100644 --- a/resources/build/DeleteSiteModal.vue_vue_type_script_setup_true_lang.js +++ b/resources/build/DeleteSiteModal.vue_vue_type_script_setup_true_lang.js @@ -1,4 +1,4 @@ -import{u as E,A as Q,am as _e,an as ft,ao as vt,s as w,B as L,ap as Ee,aq as T,ar as U,ah as H,d as j,as as Z,at as be,au as Ye,a5 as G,P as ce,av as pt,aw as Ce,F as oe,ax as K,ai as ht,ay as ye,az as ge,aA as N,a7 as ne,aB as mt,aC as Ge,aD as B,aE as xe,aF as bt,aG as ie,aH as gt,af as yt,L as Se,K as Qe,l as ue,o as V,w as Y,r as xt,a as z,c as W,t as de,b as St,Y as wt,U as me,I as Ot,m as Ae,p as Fe,_ as Et,M as Ct,e as q,a8 as It,a9 as Rt,a0 as Tt}from"./cp3.js";function re(e,i,t){let l=t.initialDeps??[],n,a=!0;function s(){var o,c,u;let r;t.key&&((o=t.debug)!=null&&o.call(t))&&(r=Date.now());const p=e();if(!(p.length!==l.length||p.some((x,b)=>l[b]!==x)))return n;l=p;let y;if(t.key&&((c=t.debug)!=null&&c.call(t))&&(y=Date.now()),n=i(...p),t.key&&((u=t.debug)!=null&&u.call(t))){const x=Math.round((Date.now()-r)*100)/100,b=Math.round((Date.now()-y)*100)/100,C=b/16,P=(g,I)=>{for(g=String(g);g.lengthl[b]!==x)))return n;l=p;let y;if(t.key&&((c=t.debug)!=null&&c.call(t))&&(y=Date.now()),n=i(...p),t.key&&((u=t.debug)!=null&&u.call(t))){const x=Math.round((Date.now()-r)*100)/100,b=Math.round((Date.now()-y)*100)/100,C=b/16,P=(g,I)=>{for(g=String(g);g.length{l=o},s}function ze(e,i){if(e===void 0)throw new Error("Unexpected undefined");return e}const Mt=(e,i)=>Math.abs(e-i)<1.01,At=(e,i,t)=>{let l;return function(...n){e.clearTimeout(l),l=e.setTimeout(()=>i.apply(this,n),t)}},Ne=e=>{const{offsetWidth:i,offsetHeight:t}=e;return{width:i,height:t}},Ft=e=>e,$t=e=>{const i=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),l=[];for(let n=i;n<=t;n++)l.push(n);return l},Lt=(e,i)=>{const t=e.scrollElement;if(!t)return;const l=e.targetWindow;if(!l)return;const n=s=>{const{width:o,height:c}=s;i({width:Math.round(o),height:Math.round(c)})};if(n(Ne(t)),!l.ResizeObserver)return()=>{};const a=new l.ResizeObserver(s=>{const o=()=>{const c=s[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){n({width:u.inlineSize,height:u.blockSize});return}}n(Ne(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Be={passive:!0},je=typeof window>"u"?!0:"onscrollend"in window,Dt=(e,i)=>{const t=e.scrollElement;if(!t)return;const l=e.targetWindow;if(!l)return;let n=0;const a=e.options.useScrollendEvent&&je?()=>{}:At(l,()=>{i(n,!1)},e.options.isScrollingResetDelay),s=r=>()=>{const{horizontal:p,isRtl:f}=e.options;n=p?t.scrollLeft*(f&&-1||1):t.scrollTop,a(),i(n,r)},o=s(!0),c=s(!1);t.addEventListener("scroll",o,Be);const u=e.options.useScrollendEvent&&je;return u&&t.addEventListener("scrollend",c,Be),()=>{t.removeEventListener("scroll",o),u&&t.removeEventListener("scrollend",c)}},Pt=(e,i,t)=>{if(i?.borderBoxSize){const l=i.borderBoxSize[0];if(l)return Math.round(l[t.options.horizontal?"inlineSize":"blockSize"])}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},Vt=(e,{adjustments:i=0,behavior:t},l)=>{var n,a;const s=e+i;(a=(n=l.scrollElement)==null?void 0:n.scrollTo)==null||a.call(n,{[l.options.horizontal?"left":"top"]:s,behavior:t})};class kt{constructor(i){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const l=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(n=>{n.forEach(a=>{const s=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var n;(n=l())==null||n.disconnect(),t=null},observe:n=>{var a;return(a=l())==null?void 0:a.observe(n,{box:"border-box"})},unobserve:n=>{var a;return(a=l())==null?void 0:a.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([l,n])=>{typeof n>"u"&&delete t[l]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ft,rangeExtractor:$t,onChange:()=>{},measureElement:Pt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var l,n;(n=(l=this.options).onChange)==null||n.call(l,this,t)},this.maybeNotify=re(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const l=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==l){if(this.cleanup(),!l){this.maybeNotify();return}this.scrollElement=l,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,l)=>{const n=new Map,a=new Map;for(let s=l-1;s>=0;s--){const o=t[s];if(n.has(o.lane))continue;const c=a.get(o.lane);if(c==null||o.end>c.end?a.set(o.lane,o):o.ends.end===o.end?s.index-o.index:s.end-o.end)[0]:void 0},this.getMeasurementOptions=re(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(t,l,n,a,s,o)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:l,scrollMargin:n,getItemKey:a,enabled:s,lanes:o}),{key:!1}),this.getMeasurements=re(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:l,scrollMargin:n,getItemKey:a,enabled:s,lanes:o},c)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const f of this.laneAssignments.keys())f>=t&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1);const r=this.measurementsCache.slice(0,u),p=new Array(o).fill(void 0);for(let f=0;f1){b=x;const D=p[b],h=D!==void 0?r[D]:void 0;C=h?h.end+this.options.gap:l+n}else{const D=this.options.lanes===1?r[f-1]:this.getFurthestMeasurement(r,f);C=D?D.end+this.options.gap:l+n,b=D?D.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,b)}const P=c.get(y),g=typeof P=="number"?P:this.options.estimateSize(f),I=C+g;r[f]={index:f,start:C,size:g,end:I,key:y,lane:b},p[b]=f}return this.measurementsCache=r,r},{key:!1,debug:()=>this.options.debug}),this.calculateRange=re(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,l,n,a)=>this.range=t.length>0&&l>0?_t({measurements:t,outerSize:l,scrollOffset:n,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=re(()=>{let t=null,l=null;const n=this.calculateRange();return n&&(t=n.startIndex,l=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,l]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,l]},(t,l,n,a,s)=>a===null||s===null?[]:t({startIndex:a,endIndex:s,overscan:l,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const l=this.options.indexAttribute,n=t.getAttribute(l);return n?parseInt(n,10):(console.warn(`Missing attribute name '${l}={index}' on measured element.`),-1)},this._measureElement=(t,l)=>{const n=this.indexFromElement(t),a=this.measurementsCache[n];if(!a)return;const s=a.key,o=this.elementsCache.get(s);o!==t&&(o&&this.observer.unobserve(o),this.observer.observe(t),this.elementsCache.set(s,t)),t.isConnected&&this.resizeItem(n,this.options.measureElement(t,l,this))},this.resizeItem=(t,l)=>{const n=this.measurementsCache[t];if(!n)return;const a=this.itemSizeCache.get(n.key)??n.size,s=l-a;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,s,this):n.start{if(!t){this.elementsCache.forEach((l,n)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(n))});return}this._measureElement(t,void 0)},this.getVirtualItems=re(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,l)=>{const n=[];for(let a=0,s=t.length;athis.options.debug}),this.getVirtualItemForOffset=t=>{const l=this.getMeasurements();if(l.length!==0)return ze(l[Je(0,l.length-1,n=>ze(l[n]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(t,l,n=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),s=this.getScrollOffset();l==="auto"&&(l=t>=s+a?"end":"start"),l==="center"?t+=(n-a)/2:l==="end"&&(t-=a);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,l="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=this.measurementsCache[t];if(!n)return;const a=this.getSize(),s=this.getScrollOffset();if(l==="auto")if(n.end>=s+a-this.options.scrollPaddingEnd)l="end";else if(n.start<=s+this.options.scrollPaddingStart)l="start";else return[s,l];if(l==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),l];const o=l==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,l,n.size),l]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(t,{align:l="start",behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,l),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:l="auto",behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),t=Math.max(0,Math.min(t,this.options.count-1)),this.currentScrollToIndex=t;let a=0;const s=10,o=u=>{if(!this.targetWindow)return;const r=this.getOffsetForIndex(t,u);if(!r){console.warn("Failed to get offset for index:",t);return}const[p,f]=r;this._scrollToOffset(p,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{const y=()=>{if(this.currentScrollToIndex!==t)return;const x=this.getScrollOffset(),b=this.getOffsetForIndex(t,f);if(!b){console.warn("Failed to get offset for index:",t);return}Mt(b[0],x)||c(f)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(y):y()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===t&&(a++,ao(u)):console.warn(`Failed to scroll to index ${t} after ${s} attempts.`))};o(l)},this.scrollBy=(t,{behavior:l}={})=>{l==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:l})},this.getTotalSize=()=>{var t;const l=this.getMeasurements();let n;if(l.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((t=l[l.length-1])==null?void 0:t.end)??0;else{const a=Array(this.options.lanes).fill(null);let s=l.length-1;for(;s>=0&&a.some(o=>o===null);){const o=l[s];a[o.lane]===null&&(a[o.lane]=o.end),s--}n=Math.max(...a.filter(o=>o!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:l,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:l},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(i)}}const Je=(e,i,t,l)=>{for(;e<=i;){const n=(e+i)/2|0,a=t(n);if(al)i=n-1;else return n}return e>0?e-1:0};function _t({measurements:e,outerSize:i,scrollOffset:t,lanes:l}){const n=e.length-1,a=c=>e[c].start;if(e.length<=l)return{startIndex:0,endIndex:n};let s=Je(0,n,a,t),o=s;if(l===1)for(;o1){const c=Array(l).fill(0);for(;or=0&&u.some(r=>r>=t);){const r=e[s];u[r.lane]=r.start,s--}s=Math.max(0,s-s%l),o=Math.min(n,o+(l-1-o%l))}return{startIndex:s,endIndex:o}}function zt(e){const i=new kt(E(e)),t=ft(i),l=i._didMount();return Q(()=>E(e).getScrollElement(),n=>{n&&i._willUpdate()},{immediate:!0}),Q(()=>E(e),n=>{i.setOptions({...n,onChange:(a,s)=>{var o;_e(t),(o=n.onChange)==null||o.call(n,a,s)}}),i._willUpdate(),_e(t)},{immediate:!0}),vt(l),t}function Nt(e){return zt(w(()=>({observeElementRect:Lt,observeElementOffset:Dt,scrollToFn:Vt,...E(e)})))}function Bt(e,i,t){let l=L(t?.value),n=w(()=>e.value!==void 0);return[w(()=>n.value?e.value:l.value),function(a){return n.value||(l.value=a),i?.(a)}]}function jt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(i=>setTimeout(()=>{throw i}))}function fe(){let e=[],i={addEventListener(t,l,n,a){return t.addEventListener(l,n,a),i.add(()=>t.removeEventListener(l,n,a))},requestAnimationFrame(...t){let l=requestAnimationFrame(...t);i.add(()=>cancelAnimationFrame(l))},nextFrame(...t){i.requestAnimationFrame(()=>{i.requestAnimationFrame(...t)})},setTimeout(...t){let l=setTimeout(...t);i.add(()=>clearTimeout(l))},microTask(...t){let l={current:!0};return jt(()=>{l.current&&t[0]()}),i.add(()=>{l.current=!1})},style(t,l,n){let a=t.style.getPropertyValue(l);return Object.assign(t.style,{[l]:n}),this.add(()=>{Object.assign(t.style,{[l]:a})})},group(t){let l=fe();return t(l),this.add(()=>l.dispose())},add(t){return e.push(t),()=>{let l=e.indexOf(t);if(l>=0)for(let n of e.splice(l,1))n()}},dispose(){for(let t of e.splice(0))t()}};return i}function Wt(){let e=fe();return Ee(()=>e.dispose()),e}function Ht(){let e=Wt();return i=>{e.dispose(),e.nextFrame(i)}}var Ut=Object.defineProperty,qt=(e,i,t)=>i in e?Ut(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,We=(e,i,t)=>(qt(e,typeof i!="symbol"?i+"":i,t),t);class Kt{constructor(){We(this,"current",this.detect()),We(this,"currentId",0)}set(i){this.current!==i&&(this.currentId=0,this.current=i)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let Ie=new Kt;function Le(e){if(Ie.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let i=T(e);if(i)return i.ownerDocument}return document}let He=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Yt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Yt||{}),Gt=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Gt||{}),Qt=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Qt||{}),Xe=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Xe||{});function Jt(e,i=0){var t;return e===((t=Le(e))==null?void 0:t.body)?!1:U(i,{0(){return e.matches(He)},1(){let l=e;for(;l!==null;){if(l.matches(He))return!0;l=l.parentElement}return!1}})}var Xt=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Xt||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Zt(e,i=t=>t){return e.slice().sort((t,l)=>{let n=i(t),a=i(l);if(n===null||a===null)return 0;let s=n.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function en(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function tn(){return/Android/gi.test(window.navigator.userAgent)}function Ze(){return en()||tn()}function we(e,i,t){Ie.isServer||H(l=>{document.addEventListener(e,i,t),l(()=>document.removeEventListener(e,i,t))})}function nn(e,i,t){Ie.isServer||H(l=>{window.addEventListener(e,i,t),l(()=>window.removeEventListener(e,i,t))})}function ln(e,i,t=w(()=>!0)){function l(a,s){if(!t.value||a.defaultPrevented)return;let o=s(a);if(o===null||!o.getRootNode().contains(o))return;let c=(function u(r){return typeof r=="function"?u(r()):Array.isArray(r)||r instanceof Set?r:[r]})(e);for(let u of c){if(u===null)continue;let r=u instanceof HTMLElement?u:T(u);if(r!=null&&r.contains(o)||a.composed&&a.composedPath().includes(r))return}return!Jt(o,Xe.Loose)&&o.tabIndex!==-1&&a.preventDefault(),i(a,o)}let n=L(null);we("pointerdown",a=>{var s,o;t.value&&(n.value=((o=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:o[0])||a.target)},!0),we("mousedown",a=>{var s,o;t.value&&(n.value=((o=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:o[0])||a.target)},!0),we("click",a=>{Ze()||n.value&&(l(a,()=>n.value),n.value=null)},!0),we("touchend",a=>l(a,()=>a.target instanceof HTMLElement?a.target:null),!0),nn("blur",a=>l(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ue(e){return[e.screenX,e.screenY]}function on(){let e=L([-1,-1]);return{wasMoved(i){let t=Ue(i);return e.value[0]===t[0]&&e.value[1]===t[1]?!1:(e.value=t,!0)},update(i){e.value=Ue(i)}}}function an({container:e,accept:i,walk:t,enabled:l}){H(()=>{let n=e.value;if(!n||l!==void 0&&!l.value)return;let a=Le(e);if(!a)return;let s=Object.assign(c=>i(c),{acceptNode:i}),o=a.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,s,!1);for(;o.nextNode();)t(o.currentNode)})}var et=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(et||{});let sn=j({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:i,attrs:t}){return()=>{var l;let{features:n,...a}=e,s={"aria-hidden":(n&2)===2?!0:(l=a["aria-hidden"])!=null?l:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Z({ourProps:s,theirProps:a,slot:{},attrs:t,slots:i,name:"Hidden"})}}});var tt=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(tt||{});function rn(e){function i(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",i))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",i),i())}let le=[];rn(()=>{function e(i){i.target instanceof HTMLElement&&i.target!==document.body&&le[0]!==i.target&&(le.unshift(i.target),le=le.filter(t=>t!=null&&t.isConnected),le.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function un(e){throw new Error("Unexpected object: "+e)}var k=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(k||{});function qe(e,i){let t=i.resolveItems();if(t.length<=0)return null;let l=i.resolveActiveIndex(),n=l??-1;switch(e.focus){case 0:{for(let a=0;a=0;--a)if(!i.resolveDisabled(t[a],a,t))return a;return l}case 2:{for(let a=n+1;a=0;--a)if(!i.resolveDisabled(t[a],a,t))return a;return l}case 4:{for(let a=0;a(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(fn||{}),vn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(vn||{}),pn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(pn||{});let it=Symbol("ComboboxContext");function he(e){let i=xe(it,null);if(i===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,he),t}return i}let at=Symbol("VirtualContext"),hn=j({name:"VirtualProvider",setup(e,{slots:i}){let t=he("VirtualProvider"),l=w(()=>{let o=T(t.optionsRef);if(!o)return{start:0,end:0};let c=window.getComputedStyle(o);return{start:parseFloat(c.paddingBlockStart||c.paddingTop),end:parseFloat(c.paddingBlockEnd||c.paddingBottom)}}),n=Nt(w(()=>({scrollPaddingStart:l.value.start,scrollPaddingEnd:l.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return T(t.optionsRef)},overscan:12}))),a=w(()=>{var o;return(o=t.virtual.value)==null?void 0:o.options}),s=L(0);return Q([a],()=>{s.value+=1}),be(at,t.virtual.value?n:null),()=>[ce("div",{style:{position:"relative",width:"100%",height:`${n.value.getTotalSize()}px`},ref:o=>{if(o){if(typeof process<"u"&&dn.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&n.value.scrollToIndex(t.activeOptionIndex.value)}}},n.value.getVirtualItems().map(o=>bt(i.default({option:t.virtual.value.options[o.index],open:t.comboboxState.value===0})[0],{key:`${s.value}-${o.index}`,"data-index":o.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":o.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`,overflowAnchor:"none"}})))]}}),mn=j({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:i,attrs:t,emit:l}){let n=L(1),a=L(null),s=L(null),o=L(null),c=L(null),u=L({static:!1,hold:!1}),r=L([]),p=L(null),f=L(2),y=L(!1);function x(d=m=>m){let m=p.value!==null?r.value[p.value]:null,O=d(r.value.slice()),S=O.length>0&&O[0].dataRef.order.value!==null?O.sort((R,_)=>R.dataRef.order.value-_.dataRef.order.value):Zt(O,R=>T(R.dataRef.domRef)),F=m?S.indexOf(m):null;return F===-1&&(F=null),{options:S,activeOptionIndex:F}}let b=w(()=>e.multiple?1:0),C=w(()=>e.nullable),[P,g]=Bt(w(()=>e.modelValue),d=>l("update:modelValue",d),w(()=>e.defaultValue)),I=w(()=>P.value===void 0?U(b.value,{1:[],0:void 0}):P.value),D=null,h=null;function M(d){return U(b.value,{0(){return g?.(d)},1:()=>{let m=K(v.value.value).slice(),O=K(d),S=m.findIndex(F=>v.compare(O,K(F)));return S===-1?m.push(O):m.splice(S,1),g?.(m)}})}let $=w(()=>{});Q([$],([d],[m])=>{if(v.virtual.value&&d&&m&&p.value!==null){let O=d.indexOf(m[p.value]);O!==-1?p.value=O:p.value=null}});let v={comboboxState:n,value:I,mode:b,compare(d,m){if(typeof e.by=="string"){let O=e.by;return d?.[O]===m?.[O]}return e.by===null?cn(d,m):e.by(d,m)},calculateIndex(d){return v.virtual.value?e.by===null?v.virtual.value.options.indexOf(d):v.virtual.value.options.findIndex(m=>v.compare(m,d)):r.value.findIndex(m=>v.compare(m.dataRef.value,d))},defaultValue:w(()=>e.defaultValue),nullable:C,immediate:w(()=>!1),virtual:w(()=>null),inputRef:s,labelRef:a,buttonRef:o,optionsRef:c,disabled:w(()=>e.disabled),options:r,change(d){g(d)},activeOptionIndex:w(()=>{if(y.value&&p.value===null&&(v.virtual.value?v.virtual.value.options.length>0:r.value.length>0)){if(v.virtual.value){let m=v.virtual.value.options.findIndex(O=>{var S;return!((S=v.virtual.value)!=null&&S.disabled(O))});if(m!==-1)return m}let d=r.value.findIndex(m=>!m.dataRef.disabled);if(d!==-1)return d}return p.value}),activationTrigger:f,optionsPropsRef:u,closeCombobox(){y.value=!1,!e.disabled&&n.value!==1&&(n.value=1,p.value=null)},openCombobox(){if(y.value=!0,!e.disabled&&n.value!==0){if(v.value.value){let d=v.calculateIndex(v.value.value);d!==-1&&(p.value=d)}n.value=0}},setActivationTrigger(d){f.value=d},goToOption(d,m,O){y.value=!1,D!==null&&cancelAnimationFrame(D),D=requestAnimationFrame(()=>{if(e.disabled||c.value&&!u.value.static&&n.value===1)return;if(v.virtual.value){p.value=d===k.Specific?m:qe({focus:d},{resolveItems:()=>v.virtual.value.options,resolveActiveIndex:()=>{var R,_;return(_=(R=v.activeOptionIndex.value)!=null?R:v.virtual.value.options.findIndex(ee=>{var se;return!((se=v.virtual.value)!=null&&se.disabled(ee))}))!=null?_:null},resolveDisabled:R=>v.virtual.value.disabled(R),resolveId(){throw new Error("Function not implemented.")}}),f.value=O??2;return}let S=x();if(S.activeOptionIndex===null){let R=S.options.findIndex(_=>!_.dataRef.disabled);R!==-1&&(S.activeOptionIndex=R)}let F=d===k.Specific?m:qe({focus:d},{resolveItems:()=>S.options,resolveActiveIndex:()=>S.activeOptionIndex,resolveId:R=>R.id,resolveDisabled:R=>R.dataRef.disabled});p.value=F,f.value=O??2,r.value=S.options})},selectOption(d){let m=r.value.find(S=>S.id===d);if(!m)return;let{dataRef:O}=m;M(O.value)},selectActiveOption(){if(v.activeOptionIndex.value!==null){if(v.virtual.value)M(v.virtual.value.options[v.activeOptionIndex.value]);else{let{dataRef:d}=r.value[v.activeOptionIndex.value];M(d.value)}v.goToOption(k.Specific,v.activeOptionIndex.value)}},registerOption(d,m){let O=ht({id:d,dataRef:m});if(v.virtual.value){r.value.push(O);return}h&&cancelAnimationFrame(h);let S=x(F=>(F.push(O),F));p.value===null&&v.isSelected(m.value.value)&&(S.activeOptionIndex=S.options.indexOf(O)),r.value=S.options,p.value=S.activeOptionIndex,f.value=2,S.options.some(F=>!T(F.dataRef.domRef))&&(h=requestAnimationFrame(()=>{let F=x();r.value=F.options,p.value=F.activeOptionIndex}))},unregisterOption(d,m){if(D!==null&&cancelAnimationFrame(D),m&&(y.value=!0),v.virtual.value){r.value=r.value.filter(S=>S.id!==d);return}let O=x(S=>{let F=S.findIndex(R=>R.id===d);return F!==-1&&S.splice(F,1),S});r.value=O.options,p.value=O.activeOptionIndex,f.value=2},isSelected(d){return U(b.value,{0:()=>v.compare(K(v.value.value),K(d)),1:()=>K(v.value.value).some(m=>v.compare(K(m),K(d)))})},isActive(d){return p.value===v.calculateIndex(d)}};ln([s,o,c],()=>v.closeCombobox(),w(()=>n.value===0)),be(it,v),Ye(w(()=>U(n.value,{0:B.Open,1:B.Closed})));let A=w(()=>{var d;return(d=T(s))==null?void 0:d.closest("form")});return G(()=>{Q([A],()=>{if(!A.value||e.defaultValue===void 0)return;function d(){v.change(e.defaultValue)}return A.value.addEventListener("reset",d),()=>{var m;(m=A.value)==null||m.removeEventListener("reset",d)}},{immediate:!0})}),()=>{var d,m,O;let{name:S,disabled:F,form:R,..._}=e,ee={open:n.value===0,disabled:F,activeIndex:v.activeOptionIndex.value,activeOption:v.activeOptionIndex.value===null?null:v.virtual.value?v.virtual.value.options[(d=v.activeOptionIndex.value)!=null?d:0]:(O=(m=v.options.value[v.activeOptionIndex.value])==null?void 0:m.dataRef.value)!=null?O:null,value:I.value};return ce(oe,[...S!=null&&I.value!=null?nt({[S]:I.value}).map(([se,Ve])=>ce(sn,pt({features:et.Hidden,key:se,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:R,disabled:F,name:se,value:Ve}))):[],Z({theirProps:{...t,...Ce(_,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:ee,slots:i,attrs:t,name:"Combobox"})])}}}),bn=j({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:i,slots:t,expose:l}){var n;let a=(n=e.id)!=null?n:`headlessui-combobox-button-${ye()}`,s=he("ComboboxButton");l({el:s.buttonRef,$el:s.buttonRef});function o(r){s.disabled.value||(s.comboboxState.value===0?s.closeCombobox():(r.preventDefault(),s.openCombobox()),ne(()=>{var p;return(p=T(s.inputRef))==null?void 0:p.focus({preventScroll:!0})}))}function c(r){switch(r.key){case N.ArrowDown:r.preventDefault(),r.stopPropagation(),s.comboboxState.value===1&&s.openCombobox(),ne(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case N.ArrowUp:r.preventDefault(),r.stopPropagation(),s.comboboxState.value===1&&(s.openCombobox(),ne(()=>{s.value.value||s.goToOption(k.Last)})),ne(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return;case N.Escape:if(s.comboboxState.value!==0)return;r.preventDefault(),s.optionsRef.value&&!s.optionsPropsRef.value.static&&r.stopPropagation(),s.closeCombobox(),ne(()=>{var p;return(p=s.inputRef.value)==null?void 0:p.focus({preventScroll:!0})});return}}let u=mt(w(()=>({as:e.as,type:i.type})),s.buttonRef);return()=>{var r,p;let f={open:s.comboboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...y}=e,x={ref:s.buttonRef,id:a,type:u.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(r=T(s.optionsRef))==null?void 0:r.id,"aria-expanded":s.comboboxState.value===0,"aria-labelledby":s.labelRef.value?[(p=T(s.labelRef))==null?void 0:p.id,a].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:c,onClick:o};return Z({ourProps:x,theirProps:y,slot:f,attrs:i,slots:t,name:"ComboboxButton"})}}}),gn=j({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:i,attrs:t,slots:l,expose:n}){var a;let s=(a=e.id)!=null?a:`headlessui-combobox-input-${ye()}`,o=he("ComboboxInput"),c=w(()=>Le(T(o.inputRef))),u={value:!1};n({el:o.inputRef,$el:o.inputRef});function r(){o.change(null);let h=T(o.optionsRef);h&&(h.scrollTop=0),o.goToOption(k.Nothing)}let p=w(()=>{var h;let M=o.value.value;return T(o.inputRef)?typeof e.displayValue<"u"&&M!==void 0?(h=e.displayValue(M))!=null?h:"":typeof M=="string"?M:"":""});G(()=>{Q([p,o.comboboxState,c],([h,M],[$,v])=>{if(u.value)return;let A=T(o.inputRef);A&&((v===0&&M===1||h!==$)&&(A.value=h),requestAnimationFrame(()=>{var d;if(u.value||!A||((d=c.value)==null?void 0:d.activeElement)!==A)return;let{selectionStart:m,selectionEnd:O}=A;Math.abs((O??0)-(m??0))===0&&m===0&&A.setSelectionRange(A.value.length,A.value.length)}))},{immediate:!0}),Q([o.comboboxState],([h],[M])=>{if(h===0&&M===1){if(u.value)return;let $=T(o.inputRef);if(!$)return;let v=$.value,{selectionStart:A,selectionEnd:d,selectionDirection:m}=$;$.value="",$.value=v,m!==null?$.setSelectionRange(A,d,m):$.setSelectionRange(A,d)}})});let f=L(!1);function y(){f.value=!0}function x(){fe().nextFrame(()=>{f.value=!1})}let b=Ht();function C(h){switch(u.value=!0,b(()=>{u.value=!1}),h.key){case N.Enter:if(u.value=!1,o.comboboxState.value!==0||f.value)return;if(h.preventDefault(),h.stopPropagation(),o.activeOptionIndex.value===null){o.closeCombobox();return}o.selectActiveOption(),o.mode.value===0&&o.closeCombobox();break;case N.ArrowDown:return u.value=!1,h.preventDefault(),h.stopPropagation(),U(o.comboboxState.value,{0:()=>o.goToOption(k.Next),1:()=>o.openCombobox()});case N.ArrowUp:return u.value=!1,h.preventDefault(),h.stopPropagation(),U(o.comboboxState.value,{0:()=>o.goToOption(k.Previous),1:()=>{o.openCombobox(),ne(()=>{o.value.value||o.goToOption(k.Last)})}});case N.Home:if(h.shiftKey)break;return u.value=!1,h.preventDefault(),h.stopPropagation(),o.goToOption(k.First);case N.PageUp:return u.value=!1,h.preventDefault(),h.stopPropagation(),o.goToOption(k.First);case N.End:if(h.shiftKey)break;return u.value=!1,h.preventDefault(),h.stopPropagation(),o.goToOption(k.Last);case N.PageDown:return u.value=!1,h.preventDefault(),h.stopPropagation(),o.goToOption(k.Last);case N.Escape:if(u.value=!1,o.comboboxState.value!==0)return;h.preventDefault(),o.optionsRef.value&&!o.optionsPropsRef.value.static&&h.stopPropagation(),o.nullable.value&&o.mode.value===0&&o.value.value===null&&r(),o.closeCombobox();break;case N.Tab:if(u.value=!1,o.comboboxState.value!==0)return;o.mode.value===0&&o.activationTrigger.value!==1&&o.selectActiveOption(),o.closeCombobox();break}}function P(h){i("change",h),o.nullable.value&&o.mode.value===0&&h.target.value===""&&r(),o.openCombobox()}function g(h){var M,$,v;let A=(M=h.relatedTarget)!=null?M:le.find(d=>d!==h.currentTarget);if(u.value=!1,!(($=T(o.optionsRef))!=null&&$.contains(A))&&!((v=T(o.buttonRef))!=null&&v.contains(A))&&o.comboboxState.value===0)return h.preventDefault(),o.mode.value===0&&(o.nullable.value&&o.value.value===null?r():o.activationTrigger.value!==1&&o.selectActiveOption()),o.closeCombobox()}function I(h){var M,$,v;let A=(M=h.relatedTarget)!=null?M:le.find(d=>d!==h.currentTarget);($=T(o.buttonRef))!=null&&$.contains(A)||(v=T(o.optionsRef))!=null&&v.contains(A)||o.disabled.value||o.immediate.value&&o.comboboxState.value!==0&&(o.openCombobox(),fe().nextFrame(()=>{o.setActivationTrigger(1)}))}let D=w(()=>{var h,M,$,v;return(v=($=(M=e.defaultValue)!=null?M:o.defaultValue.value!==void 0?(h=e.displayValue)==null?void 0:h.call(e,o.defaultValue.value):null)!=null?$:o.defaultValue.value)!=null?v:""});return()=>{var h,M,$,v,A,d,m;let O={open:o.comboboxState.value===0},{displayValue:S,onChange:F,...R}=e,_={"aria-controls":(h=o.optionsRef.value)==null?void 0:h.id,"aria-expanded":o.comboboxState.value===0,"aria-activedescendant":o.activeOptionIndex.value===null?void 0:o.virtual.value?(M=o.options.value.find(ee=>!o.virtual.value.disabled(ee.dataRef.value)&&o.compare(ee.dataRef.value,o.virtual.value.options[o.activeOptionIndex.value])))==null?void 0:M.id:($=o.options.value[o.activeOptionIndex.value])==null?void 0:$.id,"aria-labelledby":(d=(v=T(o.labelRef))==null?void 0:v.id)!=null?d:(A=T(o.buttonRef))==null?void 0:A.id,"aria-autocomplete":"list",id:s,onCompositionstart:y,onCompositionend:x,onKeydown:C,onInput:P,onFocus:I,onBlur:g,role:"combobox",type:(m=t.type)!=null?m:"text",tabIndex:0,ref:o.inputRef,defaultValue:D.value,disabled:o.disabled.value===!0?!0:void 0};return Z({ourProps:_,theirProps:R,slot:O,attrs:t,slots:l,features:ge.RenderStrategy|ge.Static,name:"ComboboxInput"})}}}),yn=j({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:i,slots:t,expose:l}){let n=he("ComboboxOptions"),a=`headlessui-combobox-options-${ye()}`;l({el:n.optionsRef,$el:n.optionsRef}),H(()=>{n.optionsPropsRef.value.static=e.static}),H(()=>{n.optionsPropsRef.value.hold=e.hold});let s=Ge(),o=w(()=>s!==null?(s.value&B.Open)===B.Open:n.comboboxState.value===0);an({container:w(()=>T(n.optionsRef)),enabled:w(()=>n.comboboxState.value===0),accept(u){return u.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function c(u){u.preventDefault()}return()=>{var u,r,p;let f={open:n.comboboxState.value===0},y={"aria-labelledby":(p=(u=T(n.labelRef))==null?void 0:u.id)!=null?p:(r=T(n.buttonRef))==null?void 0:r.id,id:a,ref:n.optionsRef,role:"listbox","aria-multiselectable":n.mode.value===1?!0:void 0,onMousedown:c},x=Ce(e,["hold"]);return Z({ourProps:y,theirProps:x,slot:f,attrs:i,slots:n.virtual.value&&n.comboboxState.value===0?{...t,default:()=>[ce(hn,{},t.default)]}:t,features:ge.RenderStrategy|ge.Static,visible:o.value,name:"ComboboxOptions"})}}}),xn=j({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:i,attrs:t,expose:l}){let n=he("ComboboxOption"),a=`headlessui-combobox-option-${ye()}`,s=L(null),o=w(()=>e.disabled);l({el:s,$el:s});let c=w(()=>{var g;return n.virtual.value?n.activeOptionIndex.value===n.calculateIndex(e.value):n.activeOptionIndex.value===null?!1:((g=n.options.value[n.activeOptionIndex.value])==null?void 0:g.id)===a}),u=w(()=>n.isSelected(e.value)),r=xe(at,null),p=w(()=>({disabled:e.disabled,value:e.value,domRef:s,order:w(()=>e.order)}));G(()=>n.registerOption(a,p)),Ee(()=>n.unregisterOption(a,c.value)),H(()=>{let g=T(s);g&&r?.value.measureElement(g)}),H(()=>{n.comboboxState.value===0&&c.value&&(n.virtual.value||n.activationTrigger.value!==0&&ne(()=>{var g,I;return(I=(g=T(s))==null?void 0:g.scrollIntoView)==null?void 0:I.call(g,{block:"nearest"})}))});function f(g){g.preventDefault(),g.button===tt.Left&&(o.value||(n.selectOption(a),Ze()||requestAnimationFrame(()=>{var I;return(I=T(n.inputRef))==null?void 0:I.focus({preventScroll:!0})}),n.mode.value===0&&n.closeCombobox()))}function y(){var g;if(e.disabled||(g=n.virtual.value)!=null&&g.disabled(e.value))return n.goToOption(k.Nothing);let I=n.calculateIndex(e.value);n.goToOption(k.Specific,I)}let x=on();function b(g){x.update(g)}function C(g){var I;if(!x.wasMoved(g)||e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||c.value)return;let D=n.calculateIndex(e.value);n.goToOption(k.Specific,D,0)}function P(g){var I;x.wasMoved(g)&&(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||c.value&&(n.optionsPropsRef.value.hold||n.goToOption(k.Nothing)))}return()=>{let{disabled:g}=e,I={active:c.value,selected:u.value,disabled:g},D={id:a,ref:s,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":u.value,disabled:void 0,onMousedown:f,onFocus:y,onPointerenter:b,onMouseenter:b,onPointermove:C,onMousemove:C,onPointerleave:P,onMouseleave:P},h=Ce(e,["order","value"]);return Z({ourProps:D,theirProps:h,slot:I,attrs:t,slots:i,name:"ComboboxOption"})}}});function Sn(e){let i={called:!1};return(...t)=>{if(!i.called)return i.called=!0,e(...t)}}function Te(e,...i){e&&i.length>0&&e.classList.add(...i)}function Oe(e,...i){e&&i.length>0&&e.classList.remove(...i)}var $e=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))($e||{});function wn(e,i){let t=fe();if(!e)return t.dispose;let{transitionDuration:l,transitionDelay:n}=getComputedStyle(e),[a,s]=[l,n].map(o=>{let[c=0]=o.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,r)=>r-u);return c});return a!==0?t.setTimeout(()=>i("finished"),a+s):i("finished"),t.add(()=>i("cancelled")),t.dispose}function Ke(e,i,t,l,n,a){let s=fe(),o=a!==void 0?Sn(a):()=>{};return Oe(e,...n),Te(e,...i,...t),s.nextFrame(()=>{Oe(e,...t),Te(e,...l),s.add(wn(e,c=>(Oe(e,...l,...i),Te(e,...n),o(c))))}),s.add(()=>Oe(e,...i,...t,...l,...n)),s.add(()=>o("cancelled")),s.dispose}function te(e=""){return e.split(/\s+/).filter(i=>i.length>1)}let De=Symbol("TransitionContext");var On=(e=>(e.Visible="visible",e.Hidden="hidden",e))(On||{});function En(){return xe(De,null)!==null}function Cn(){let e=xe(De,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function In(){let e=xe(Pe,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Pe=Symbol("NestingContext");function Re(e){return"children"in e?Re(e.children):e.value.filter(({state:i})=>i==="visible").length>0}function st(e){let i=L([]),t=L(!1);G(()=>t.value=!0),Ee(()=>t.value=!1);function l(a,s=ie.Hidden){let o=i.value.findIndex(({id:c})=>c===a);o!==-1&&(U(s,{[ie.Unmount](){i.value.splice(o,1)},[ie.Hidden](){i.value[o].state="hidden"}}),!Re(i)&&t.value&&e?.())}function n(a){let s=i.value.find(({id:o})=>o===a);return s?s.state!=="visible"&&(s.state="visible"):i.value.push({id:a,state:"visible"}),()=>l(a,ie.Unmount)}return{children:i,register:n,unregister:l}}let rt=ge.RenderStrategy,Rn=j({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:i,attrs:t,slots:l,expose:n}){let a=L(0);function s(){a.value|=B.Opening,i("beforeEnter")}function o(){a.value&=~B.Opening,i("afterEnter")}function c(){a.value|=B.Closing,i("beforeLeave")}function u(){a.value&=~B.Closing,i("afterLeave")}if(!En()&>())return()=>ce(ut,{...e,onBeforeEnter:s,onAfterEnter:o,onBeforeLeave:c,onAfterLeave:u},l);let r=L(null),p=w(()=>e.unmount?ie.Unmount:ie.Hidden);n({el:r,$el:r});let{show:f,appear:y}=Cn(),{register:x,unregister:b}=In(),C=L(f.value?"visible":"hidden"),P={value:!0},g=ye(),I={value:!1},D=st(()=>{!I.value&&C.value!=="hidden"&&(C.value="hidden",b(g),u())});G(()=>{let S=x(g);Ee(S)}),H(()=>{if(p.value===ie.Hidden&&g){if(f.value&&C.value!=="visible"){C.value="visible";return}U(C.value,{hidden:()=>b(g),visible:()=>x(g)})}});let h=te(e.enter),M=te(e.enterFrom),$=te(e.enterTo),v=te(e.entered),A=te(e.leave),d=te(e.leaveFrom),m=te(e.leaveTo);G(()=>{H(()=>{if(C.value==="visible"){let S=T(r);if(S instanceof Comment&&S.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function O(S){let F=P.value&&!y.value,R=T(r);!R||!(R instanceof HTMLElement)||F||(I.value=!0,f.value&&s(),f.value||c(),S(f.value?Ke(R,h,M,$,v,_=>{I.value=!1,_===$e.Finished&&o()}):Ke(R,A,d,m,v,_=>{I.value=!1,_===$e.Finished&&(Re(D)||(C.value="hidden",b(g),u()))})))}return G(()=>{Q([f],(S,F,R)=>{O(R),P.value=!1},{immediate:!0})}),be(Pe,D),Ye(w(()=>U(C.value,{visible:B.Open,hidden:B.Closed})|a.value)),()=>{let{appear:S,show:F,enter:R,enterFrom:_,enterTo:ee,entered:se,leave:Ve,leaveFrom:Un,leaveTo:qn,...ke}=e,dt={ref:r},ct={...ke,...y.value&&f.value&&Ie.isServer?{class:yt([t.class,ke.class,...h,...M])}:{}};return Z({theirProps:ct,ourProps:dt,slot:{},slots:l,attrs:t,features:rt,visible:C.value==="visible",name:"TransitionChild"})}}}),Tn=Rn,ut=j({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:i,attrs:t,slots:l}){let n=Ge(),a=w(()=>e.show===null&&n!==null?(n.value&B.Open)===B.Open:e.show);H(()=>{if(![!0,!1].includes(a.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let s=L(a.value?"visible":"hidden"),o=st(()=>{s.value="hidden"}),c=L(!0),u={show:a,appear:w(()=>e.appear||!c.value)};return G(()=>{H(()=>{c.value=!1,a.value?s.value="visible":Re(o)||(s.value="hidden")})}),be(Pe,o),be(De,u),()=>{let r=Ce(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),p={unmount:e.unmount};return Z({ourProps:{...p,as:"template"},theirProps:{},slot:{},slots:{...l,default:()=>[ce(Tn,{onBeforeEnter:()=>i("beforeEnter"),onAfterEnter:()=>i("afterEnter"),onBeforeLeave:()=>i("beforeLeave"),onAfterLeave:()=>i("afterLeave"),...t,...p,...r},l.default)]},attrs:{},features:rt,visible:s.value==="visible",name:"Transition"})}}});const J=e=>({url:J.url(e),method:"get"});J.definition={methods:["get","head"],url:"/admin/settings/sites/new"};J.url=e=>J.definition.url+Se(e);J.get=e=>({url:J.url(e),method:"get"});J.head=e=>({url:J.url(e),method:"head"});const ve=e=>({url:ve.url(e),method:"post"});ve.definition={methods:["post"],url:"/admin/settings/sites/reorder"};ve.url=e=>ve.definition.url+Se(e);ve.post=e=>({url:ve.url(e),method:"post"});const pe=e=>({url:pe.url(e),method:"post"});pe.definition={methods:["post"],url:"/admin/settings/sites"};pe.url=e=>pe.definition.url+Se(e);pe.post=e=>({url:pe.url(e),method:"post"});const ae=(e,i)=>({url:ae.url(e,i),method:"delete"});ae.definition={methods:["delete"],url:"/admin/settings/sites/{site}"};ae.url=(e,i)=>{(typeof e=="string"||typeof e=="number")&&(e={site:e}),Array.isArray(e)&&(e={site:e[0]}),e=Qe(e);const t={site:e.site};return ae.definition.url.replace("{site}",t.site.toString()).replace(/\/+$/,"")+Se(i)};ae.delete=(e,i)=>({url:ae.url(e,i),method:"delete"});const X=(e,i)=>({url:X.url(e,i),method:"get"});X.definition={methods:["get","head"],url:"/admin/settings/sites/{site}"};X.url=(e,i)=>{(typeof e=="string"||typeof e=="number")&&(e={site:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={site:e.id}),Array.isArray(e)&&(e={site:e[0]}),e=Qe(e);const t={site:typeof e.site=="object"?e.site.id:e.site};return X.definition.url.replace("{site}",t.site.toString()).replace(/\/+$/,"")+Se(i)};X.get=(e,i)=>({url:X.url(e,i),method:"get"});X.head=(e,i)=>({url:X.url(e,i),method:"head"});const Mn=["active","checked","hint"],An={key:0},Me=j({__name:"InputComboboxOption",props:{option:{}},setup(e){return(i,t)=>(V(),ue(E(xn),{value:e.option},{default:Y(({active:l,selected:n})=>[xt(i.$slots,"option",{option:e.option,active:l,selected:n},()=>[z("craft-option",{active:l,checked:n,hint:e.option.data?.hint},[e.option.label.startsWith("$")||e.option.label.startsWith("@")?(V(),W("code",An,de(e.option.label),1)):(V(),W(oe,{key:1},[St(de(e.option.label),1)],64))],8,Mn)])]),_:3},8,["value"]))}}),Fn={key:1},$n={class:"group-label"},Ln=j({__name:"InputCombobox",props:{options:{default:()=>[]},modelValue:{default:""},requireOptionMatch:{type:Boolean,default:!1},transformModelValue:{type:Function,default:e=>e?e.value:""}},emits:["update:modelValue"],setup(e,{emit:i}){const t=i,l=e,n=w({get(){let y=null;return l.modelValue&&l.modelValue!==""&&(l.options.forEach(x=>{x.type==="optgroup"?x.options.forEach(b=>{b.value===l.modelValue&&(y=b)}):x.value===l.modelValue&&(y=x)}),!y&&!l.requireOptionMatch&&(y={label:l.modelValue,value:l.modelValue})),y},set(y){t("update:modelValue",l.transformModelValue(y))}}),a=wt("reference"),s=L(l.modelValue??""),o=w(()=>{const y=a.value?.getBoundingClientRect();return console.log({coordinates:y}),y||new DOMRect});function c(y,x){const b=E(y).toLowerCase(),C=E(x);return C.label.toLowerCase().includes(b)||C.value.toLowerCase().includes(b)||(C.data?.keywords?.toLowerCase().includes(b)??!1)}function u(y,x){return E(x).map(b=>{if(b.type==="optgroup"){const C=b.options.filter(P=>c(y,P));return C.length>0?{...b,options:C}:null}return c(y,b)?b:null}).filter(b=>b!==null)}const r=w(()=>s.value!==""?u(s,l.options):l.options);function p(y){return y?y.label:""}const f=w(()=>["","@","$"].includes(s.value)?null:{value:s.value,label:s.value});return(y,x)=>(V(),W("div",{class:"relative",ref_key:"reference",ref:a},[me(E(mn),{modelValue:n.value,"onUpdate:modelValue":x[2]||(x[2]=b=>n.value=b)},{default:Y(()=>[me(E(gn),{onChange:x[0]||(x[0]=b=>s.value=b.target.value),class:"input",displayValue:p}),me(E(bn),{class:"absolute inset-y-1 right-1 flex items-center",type:"button",as:"craft-button",appearance:"plain",size:"small",icon:""},{default:Y(()=>[...x[3]||(x[3]=[z("craft-icon",{name:"chevron-down",style:{"font-size":"0.8em"}},null,-1)])]),_:1}),me(E(ut),{leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",onAfterLeave:x[1]||(x[1]=b=>s.value="")},{default:Y(()=>[me(E(yn),{class:"options",style:Ot({position:"fixed",insetInlineStart:`${o.value.left}px`,width:`${o.value.width}px`,insetBlockStart:`${o.value.bottom}px`})},{default:Y(()=>[!e.requireOptionMatch&&f.value?(V(),ue(Me,{key:0,option:f.value},null,8,["option"])):r.value.length===0&&s.value!==""?(V(),W("div",Fn," Nothing found. ")):Ae("",!0),(V(!0),W(oe,null,Fe(r.value,(b,C)=>(V(),W(oe,{key:C},[b.type==="optgroup"?(V(),W(oe,{key:0},[z("div",$n,de(b.label),1),(V(!0),W(oe,null,Fe(b.options,(P,g)=>(V(),ue(Me,{key:g,option:P},null,8,["option"]))),128))],64)):(V(),ue(Me,{key:1,option:b},null,8,["option"]))],64))),128))]),_:1},8,["style"])]),_:1})]),_:1},8,["modelValue"])],512))}}),Yn=Et(Ln,[["__scopeId","data-v-20c64df9"]]),Dn={class:"grid gap-3"},Pn=["label","help-text",".modelValue"],Vn=["label","checked"],kn=["label","checked"],_n=["label"],zn=["label",".modelValue"],Nn={slot:"input"},Bn={value:""},jn=["selected","value"],Wn={slot:"feedback"},Hn={key:0,class:"error-list"},Gn=j({__name:"DeleteSiteModal",props:{open:{type:Boolean,default:!1},site:{}},emits:["close"],setup(e,{emit:i}){const t=i,l=e,n=Tt(),a=w(()=>n.props.transferContentOptions?n.props.transferContentOptions.filter(r=>r.id!==l.site.id):[]),s=Ct({id:l.site.id,contentDestination:"transfer",transferContentTo:null});async function o(){c()}function c(){s.clearErrors().delete(ae(l.site.id).url,{onSuccess:()=>{t("close"),s.reset()}})}function u(){t("close"),s.clearErrors(),s.reset()}return(r,p)=>(V(),ue(Rt,{title:E(q)("Delete {site}",{site:e.site.name}),"is-active":e.open,onClose:u,onSubmit:o,loading:E(s).processing,"submit-label":E(q)("Delete")},{default:Y(()=>[z("div",Dn,[z("craft-radio-group",{name:"contentDestination",label:E(q)("Content Destination"),"help-text":E(q)("What do you want to do with any content that is only available in {siteName}?",{siteName:e.site.name}),".modelValue":E(s).contentDestination,onModelValueChanged:p[0]||(p[0]=f=>E(s).contentDestination=f.target.modelValue)},[z("craft-radio",{label:E(q)("Transfer it"),".choiceValue":"transfer",checked:E(s).contentDestination==="transfer"},null,40,Vn),z("craft-radio",{label:E(q)("Delete it"),".choiceValue":"delete",checked:E(s).contentDestination==="delete"},null,40,kn)],40,Pn),E(s).contentDestination==="transfer"?(V(),ue(E(It),{key:0,data:"transferContentOptions"},{fallback:Y(()=>[z("craft-input",{disabled:"",label:E(q)("Transfer content to")},null,8,_n)]),default:Y(()=>[z("craft-select",{label:E(q)("Transfer content to"),id:"transfer-to",name:"transferContentTo",".modelValue":E(s).transferContentTo,onModelValueChanged:p[1]||(p[1]=f=>E(s).transferContentTo=f.target.modelValue)},[z("select",Nn,[z("option",Bn,de(E(q)("Select site")),1),(V(!0),W(oe,null,Fe(a.value,f=>(V(),W("option",{key:f.id,selected:f.id===E(s).transferContentTo,value:f.id},de(f.name),9,jn))),128))]),z("div",Wn,[E(s).errors?.transferContentTo?(V(),W("ul",Hn,[z("li",null,de(E(s).errors.transferContentTo),1)])):Ae("",!0)])],40,zn)]),_:1})):Ae("",!0)])]),_:1},8,["title","is-active","loading","submit-label"]))}});export{Yn as I,Gn as _,J as c,X as e,ve as r,pe as s}; diff --git a/resources/build/IndexLayout.js b/resources/build/IndexLayout.js index 513421a9fb1..725efc122f8 100644 --- a/resources/build/IndexLayout.js +++ b/resources/build/IndexLayout.js @@ -1 +1 @@ -import{d as b,y as g,z as y,A as w,B as S,l as k,o as s,D as B,p as L,w as l,r as o,G as I,H as z,s as u,a,c,m as p,u as C,b as N,I as A,t as V,e as v,_ as $}from"./cp3.js";import{A as D}from"./AppLayout.js";const H={class:"index-grid"},P=["aria-expanded"],T=["name"],E={key:1,id:"nav-container"},G={class:"bg-white border border-border-subtle rounded-sm shadow-sm @container"},M=b({__name:"IndexLayout",props:{title:{},pageTitle:{},debug:{}},setup(n){const m=g(),d=y("(min-width: 768px)"),e=S("expanded"),x=u(()=>{const{default:t,...r}=m;return r}),f=u(()=>e.value==="expanded"?v("Hide sidebar"):v("Show sidebar"));function _(){e.value=e.value==="expanded"?"collapsed":"expanded"}return w(d,t=>{e.value=t?"expanded":"collapsed"},{immediate:!0}),(t,r)=>(s(),k(D,{"full-width":!0,title:n.title,debug:n.debug},B({default:l(()=>[a("div",H,[a("div",null,[C(d)?p("",!0):(s(),c("craft-button",{key:0,type:"button","aria-controls":"nav-container","aria-expanded":e.value==="expanded",onClick:_,align:"start",class:"text-sm py-0 min-h-0"},[a("craft-icon",{slot:"suffix",name:e.value==="expanded"?"chevron-up":"chevron-down",style:A({fontSize:"0.8em",position:"relative",insetBlockStart:e.value==="expanded"?"1px":0})},null,12,T),N(" "+V(f.value),1)],8,P)),e.value==="expanded"?(s(),c("div",E,[o(t.$slots,"interior-nav",{state:e.value},void 0,!0)])):p("",!0)]),a("div",G,[o(t.$slots,"default",{},void 0,!0)])])]),_:2},[L(x.value,(Q,i)=>({name:i,fn:l(h=>[o(t.$slots,i,I(z(h||{})),void 0,!0)])}))]),1032,["title","debug"]))}}),q=$(M,[["__scopeId","data-v-5488a593"]]);export{q as I}; +import{d as b,y as g,z as y,A as w,B as S,l as k,o as s,D as B,p as L,w as l,r as o,G as I,H as z,s as u,a,c,m as p,u as C,b as N,I as A,t as V,i as v,_ as $}from"./cp3.js";import{A as D}from"./AppLayout.js";const H={class:"index-grid"},P=["aria-expanded"],T=["name"],E={key:1,id:"nav-container"},G={class:"bg-white border border-border-subtle rounded-sm shadow-sm @container"},M=b({__name:"IndexLayout",props:{title:{},pageTitle:{},debug:{}},setup(n){const m=g(),d=y("(min-width: 768px)"),e=S("expanded"),x=u(()=>{const{default:t,...r}=m;return r}),f=u(()=>e.value==="expanded"?v("Hide sidebar"):v("Show sidebar"));function _(){e.value=e.value==="expanded"?"collapsed":"expanded"}return w(d,t=>{e.value=t?"expanded":"collapsed"},{immediate:!0}),(t,r)=>(s(),k(D,{"full-width":!0,title:n.title,debug:n.debug},B({default:l(()=>[a("div",H,[a("div",null,[C(d)?p("",!0):(s(),c("craft-button",{key:0,type:"button","aria-controls":"nav-container","aria-expanded":e.value==="expanded",onClick:_,align:"start",class:"text-sm py-0 min-h-0"},[a("craft-icon",{slot:"suffix",name:e.value==="expanded"?"chevron-up":"chevron-down",style:A({fontSize:"0.8em",position:"relative",insetBlockStart:e.value==="expanded"?"1px":0})},null,12,T),N(" "+V(f.value),1)],8,P)),e.value==="expanded"?(s(),c("div",E,[o(t.$slots,"interior-nav",{state:e.value},void 0,!0)])):p("",!0)]),a("div",G,[o(t.$slots,"default",{},void 0,!0)])])]),_:2},[L(x.value,(Q,i)=>({name:i,fn:l(h=>[o(t.$slots,i,I(z(h||{})),void 0,!0)])}))]),1032,["title","debug"]))}}),q=$(M,[["__scopeId","data-v-5488a593"]]);export{q as I}; diff --git a/resources/build/Install.js b/resources/build/Install.js index 60f36a1d43e..839ea61f953 100644 --- a/resources/build/Install.js +++ b/resources/build/Install.js @@ -1 +1 @@ -import{Y as G,A as Y,d as _,c as a,o as e,F as p,Z as x,m as b,$ as V,s as C,u as n,e as c,p as h,t as d,a as l,B as R,ae as Z,af as H,r as z,_ as D,l as S,w as y,a0 as J,ag as K,a5 as W,V as T,ab as X,ah as ee,ai as F,U,a6 as te,b as B,a8 as O,N as ae,aj as le,a4 as se}from"./cp3.js";const ne=""+new URL("assets/installer-bg.png",import.meta.url).href,P=t=>{const g=G(t);Y(g,async u=>{u?.tagName.includes("CRAFT-")&&(await customElements.whenDefined(u.tagName.toLowerCase()),await u?.updateComplete),u?.focus()})},re=["label","has-feedback-for"],oe={key:0,class:"error-list",slot:"feedback"},ie=["label","has-feedback-for"],ue={key:0,class:"error-list",slot:"feedback"},de=["label","has-feedback-for"],ce={key:0,class:"error-list",slot:"feedback"},me=_({__name:"AccountFields",props:{modelValue:{default:()=>({})},errors:{default:()=>({})},showUsername:{type:Boolean,default:!0}},emits:["success","click:back","update:modelValue"],setup(t,{emit:g}){const u=g,k=t,r=C({get(){return k.modelValue},set(v){u("update:modelValue",v)}});return P("username-input"),(v,m)=>(e(),a(p,null,[t.showUsername?x((e(),a("craft-input",{key:0,label:n(c)("Username"),id:"account-username",name:"username","onUpdate:modelValue":m[0]||(m[0]=o=>r.value.username=o),"has-feedback-for":t.errors?.username?"error":"",maxlength:"255",ref:"username-input"},[t.errors?.username?(e(),a("ul",oe,[(e(!0),a(p,null,h(t.errors?.username,o=>(e(),a("li",null,d(o),1))),256))])):b("",!0)],8,re)),[[V,r.value.username]]):b("",!0),x(l("craft-input",{label:n(c)("Email"),id:"account-email",name:"email","onUpdate:modelValue":m[1]||(m[1]=o=>r.value.email=o),maxlength:"255",autocomplete:"email","has-feedback-for":t.errors?.email?"error":"",type:"email"},[t.errors?.email?(e(),a("ul",ue,[(e(!0),a(p,null,h(t.errors?.email,o=>(e(),a("li",null,d(o),1))),256))])):b("",!0)],8,ie),[[V,r.value.email]]),x(l("craft-input-password",{label:n(c)("Password"),id:"account-password",name:"password","onUpdate:modelValue":m[2]||(m[2]=o=>r.value.password=o),"has-feedback-for":t.errors?.password?"error":"",autocomplete:"new-password"},[t.errors?.password?(e(),a("ul",ce,[(e(!0),a(p,null,h(t.errors?.password,o=>(e(),a("li",null,d(o),1))),256))])):b("",!0)],8,de),[[V,r.value.password]])],64))}}),fe=["label"],be=["label"],pe=["label",".modelValue"],ge={slot:"input"},ve=["selected","value"],he=_({__name:"SiteFields",props:{modelValue:{default:()=>({})},localeOptions:{default:()=>[]},errors:{default:()=>({})}},emits:["update:modelValue"],setup(t,{emit:g}){const u=g,k=t,r=C({get(){return k.modelValue},set(m){u("update:modelValue",m)}});function v(m){const o=m.target;u("update:modelValue",{...r.value,language:o?.modelValue})}return P("site-name"),(m,o)=>(e(),a(p,null,[x(l("craft-input",{name:"name",label:n(c)("System Name"),id:"site-name","onUpdate:modelValue":o[0]||(o[0]=i=>r.value.name=i),maxlength:"255",ref:"site-name"},null,8,fe),[[V,r.value.name]]),x(l("craft-input",{name:"baseUrl",label:n(c)("Base URL"),"onUpdate:modelValue":o[1]||(o[1]=i=>r.value.baseUrl=i)},null,8,be),[[V,r.value.baseUrl]]),l("craft-select",{label:n(c)("Language"),id:"site-language",name:"language",".modelValue":r.value.language,onModelValueChanged:v},[l("select",ge,[(e(!0),a(p,null,h(t.localeOptions,i=>(e(),a("option",{key:i.id,selected:i.id===r.value.language,value:i.id},d(i.id)+" ("+d(i.name)+") ",9,ve))),128))])],40,pe)],64))}}),ye=()=>{const t=R({start:{},license:{id:"license",label:"License"},account:{id:"account",label:"Account",action:"/admin/actions/install/validate-account",heading:c("Create your account")},db:{id:"db",label:"Database",action:"/admin/actions/install/validate-db",heading:c("Connect to your database")},site:{id:"site",label:"Site",action:"/admin/actions/install/validate-site",heading:c("Set up your site"),submitLabel:c("Finish up")},installing:{label:"Installing",id:"installing"}}),g=C(()=>Object.keys(t.value).reduce((v,m)=>{const o=t.value[m];return(o.hidden??!1)||(v[m]=o),v},{})),u=C(()=>Object.keys(g.value).reduce((v,m)=>{const o=g.value[m];return(o.label??!1)&&(v[m]=o),v},{})),k=Z(g),r=C(()=>k.stepNames.value[k.index.value]);return{...k,possibleSteps:t,currentId:r,dotSteps:u}},ke=""+new URL("assets/account.png",import.meta.url).href,we=""+new URL("assets/site.png",import.meta.url).href,xe=""+new URL("assets/db.png",import.meta.url).href,Ve=_({__name:"Callout",props:{variant:{default:"info"},appearance:{default:"default"}},setup(t){return(g,u)=>(e(),a("div",{class:H({callout:!0,"callout--danger":t.variant==="danger","callout--info":t.variant==="info","callout--success":t.variant==="success","callout--warning":t.variant==="warning","callout--emphasis":t.appearance==="emphasis","callout--default":t.appearance==="default","callout--outline":t.appearance==="outline","callout--plain":t.appearance==="plain"})},[z(g.$slots,"default",{},void 0,!0)],2))}}),$e=D(Ve,[["__scopeId","data-v-b7a3b948"]]),Se={class:"grid grid-cols-5 gap-2"},Ce={class:"col-span-2"},Ue=["label",".modelValue"],_e={slot:"input"},Le=["value"],Ie={key:0,class:"error-list",slot:"feedback"},Ne={class:"col-span-2"},Be=["label"],Me={key:0,class:"error-list",slot:"feedback"},Te=["label"],De={key:0,class:"error-list",slot:"feedback"},Pe={key:0,class:"error-list col-span-5"},je={class:"grid grid-cols-2 gap-2"},Fe=["label"],Oe={key:0,class:"error-list",slot:"feedback"},Re=["label"],He={key:0,class:"error-list",slot:"feedback"},ze={key:0,class:"error-list col-span-2"},Ae={class:"grid grid-cols-4 gap-2"},Ee={class:"col-span-2"},qe=["label"],Qe={key:0,class:"error-list",slot:"feedback"},Ge=["label"],Ye={key:0,class:"error-list",slot:"feedback"},Ze=_({__name:"DbFields",props:{modelValue:{default:()=>({})},errors:{default:()=>({})}},emits:["update:modelValue"],setup(t,{emit:g}){const u=g,k=t,r=C({get(){return k.modelValue},set(o){u("update:modelValue",o)}});function v(o){const i=o.target;i&&(r.value[i.name]=i.modelValue)}const m=[{value:"mysql",label:"MySQL"},{value:"pgsql",label:"PostgreSQL"}];return P("db-driver"),(o,i)=>(e(),a(p,null,[t.errors&&t.errors["*"]?(e(),S($e,{key:0,variant:"danger"},{default:y(()=>[l("ul",null,[(e(!0),a(p,null,h(t.errors["*"],s=>(e(),a("li",null,d(s),1))),256))])]),_:1})):b("",!0),l("div",Se,[l("div",Ce,[l("craft-select",{label:n(c)("Driver"),name:"driver",id:"db-driver",".modelValue":r.value.driver,onModelValueChanged:v,ref:"db-driver"},[l("select",_e,[(e(),a(p,null,h(m,s=>l("option",{key:s.value,value:s.value},d(s.label),9,Le)),64))]),t.errors?.driver?(e(),a("ul",Ie,[(e(!0),a(p,null,h(t.errors?.driver,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],40,Ue)]),l("div",Ne,[x(l("craft-input",{label:n(c)("Host"),name:"host",id:"db-host","onUpdate:modelValue":i[0]||(i[0]=s=>r.value.host=s),placeholder:"127.0.0.1"},[t.errors?.host?(e(),a("ul",Me,[(e(!0),a(p,null,h(t.errors?.host,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Be),[[V,r.value.host]])]),l("div",null,[x(l("craft-input",{label:n(c)("Port"),name:"port",id:"db-port","onUpdate:modelValue":i[1]||(i[1]=s=>r.value.port=s),size:"7"},[t.errors?.port?(e(),a("ul",De,[(e(!0),a(p,null,h(t.errors?.port,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Te),[[V,r.value.port]])]),t.errors?.server?(e(),a("ul",Pe,[(e(!0),a(p,null,h(t.errors.server,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)]),l("div",je,[l("div",null,[x(l("craft-input",{label:n(c)("Username"),name:"username",id:"db-username","onUpdate:modelValue":i[2]||(i[2]=s=>r.value.username=s),placeholder:"root"},[t.errors?.username?(e(),a("ul",Oe,[(e(!0),a(p,null,h(t.errors?.username,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Fe),[[V,r.value.username]])]),l("div",null,[x(l("craft-input-password",{label:n(c)("Password"),name:"password",id:"db-password","onUpdate:modelValue":i[3]||(i[3]=s=>r.value.password=s)},[t.errors?.password?(e(),a("ul",He,[(e(!0),a(p,null,h(t.errors?.password,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Re),[[V,r.value.password]])]),t.errors?.user?(e(),a("ul",ze,[(e(!0),a(p,null,h(t.errors.user,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)]),l("div",Ae,[l("div",Ee,[x(l("craft-input",{label:n(c)("Database Name"),name:"name",id:"db-database","onUpdate:modelValue":i[4]||(i[4]=s=>r.value.database=s)},[t.errors?.database?(e(),a("ul",Qe,[(e(!0),a(p,null,h(t.errors?.database,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,qe),[[V,r.value.database]])]),l("div",null,[x(l("craft-input",{label:n(c)("Prefix"),name:"prefix",id:"db-prefix","onUpdate:modelValue":i[5]||(i[5]=s=>r.value.prefix=s),maxlength:"5",size:"7"},[t.errors?.prefix?(e(),a("ul",Ye,[(e(!0),a(p,null,h(t.errors?.prefix,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Ge),[[V,r.value.prefix]])])])],64))}}),Je={key:0,class:"content"},Ke={key:1,class:"content"},We={key:2,class:"content"},Xe={class:"text-left border border-red-500 rounded p-4 text-red-800 bg-red-50 font-mono text-xs"},et=_({__name:"InstallingScreen",props:{data:{}},setup(t){const{props:g}=J(),u=t,{execute:k,error:r,isSuccess:v,isLoading:m,isError:o}=K("/admin/actions/install/install",{onSuccess:i=>{setTimeout(()=>{window.location.href=g.postCpLoginRedirect},1e3)}});return W(async()=>{await k(u.data)}),(i,s)=>(e(),S(T,{class:"max-w-[80ch] mx-auto"},{default:y(()=>[n(m)?(e(),a("div",Je,[l("h2",null,d(n(c)("Installing Craft CMS…")),1),s[0]||(s[0]=l("craft-spinner",null,null,-1))])):n(v)?(e(),a("div",Ke,[l("h2",null,d(n(c)("Craft is installed! 🎉")),1),s[1]||(s[1]=l("div",{class:"flex justify-center items-center"},[l("craft-icon",{name:"circle-check",variant:"regular",style:{color:"var(--c-color-success-bg-emphasis)","font-size":"2.5rem"}})],-1))])):b("",!0),n(o)?(e(),a("div",We,[l("h2",null,d(n(c)("Install failed 😞")),1),l("div",Xe,d(n(r).message),1)])):b("",!0)]),_:1}))}}),tt=D(et,[["__scopeId","data-v-d53a06fb"]]),at={class:"grid md:grid-cols-2 gap-4 items-center"},lt={class:"aspect-[352/455] w-1/2 md:w-3/4 mx-auto"},st=["src"],nt={class:"mb-4"},rt={class:"grid gap-3 pr-6"},M=_({__name:"StepScreen",props:{illustrationSrc:{default:""},heading:{default:""}},setup(t){return(g,u)=>(e(),a("div",at,[l("div",lt,[l("img",{loading:"lazy",src:t.illustrationSrc,alt:"",width:"368"},null,8,st)]),l("div",null,[l("h2",nt,d(t.heading),1),l("div",rt,[z(g.$slots,"default")])])]))}}),ot={class:"install"},it=["innerHTML"],ut={class:"flex justify-center w-full"},dt={key:2,class:"max-w-[80ch]"},ct={class:"grid grid-cols-3 items-center gap-2"},mt={class:"flex gap-2 justify-center"},ft={class:"sr-only"},bt=["loading"],pt=_({__name:"Install",props:{dbConfig:{},localeOptions:{},licenseHtml:{},defaultSystemName:{},defaultSiteUrl:{},defaultSiteLanguage:{},showDbScreen:{type:Boolean}},setup(t){X(N=>({ea40fc04:g.value}));const g=C(()=>`url(${ne})`),u=t,{dotSteps:k,current:r,currentId:v,goTo:m,goToNext:o,goToPrevious:i,isCurrent:s,possibleSteps:A}=ye(),L=R("idle");ee(()=>{A.value.db.hidden=u.showDbScreen});function E(){m("license")}const I=F({account:{},db:{},site:{}}),$=F({account:{username:"",email:"",password:""},db:{driver:u.dbConfig.driver,host:u.dbConfig.host,port:u.dbConfig.port,database:u.dbConfig.database,username:u.dbConfig.username,password:u.dbConfig.password,prefix:u.dbConfig.prefix},site:{name:u.defaultSystemName,baseUrl:u.defaultSiteUrl,language:u.defaultSiteLanguage}}),q=C(()=>!s("start"));async function Q(N){if(L.value==="loading")return;I[v.value]=null;const f=N.currentTarget;try{L.value="loading",await se.post(f.action,$[v.value]),o(),L.value="idle"}catch(w){I[v.value]=w.response.data.errors,L.value="error"}}return(N,f)=>(e(),a(p,null,[U(n(te),{title:n(c)("Install Craft CMS")},null,8,["title"]),l("div",ot,[n(s)("start")?(e(),a("craft-button",{key:0,type:"button",onClick:E,variant:"primary",class:"begin-button"},[B(d(n(c)("Install Craft CMS"))+" ",1),f[6]||(f[6]=l("craft-icon",{name:"arrow-right",slot:"suffix"},null,-1))])):b("",!0),U(le,{"is-active":q.value,overlay:!1},{default:y(()=>[n(s)("license")?(e(),S(T,{key:0,class:"max-w-[80ch] mx-auto"},{actions:y(()=>[l("div",ut,[l("craft-button",{type:"button",variant:"primary",onClick:f[0]||(f[0]=w=>n(m)("account"))},d(n(c)("Got it")),1)])]),default:y(()=>[U(n(O),{data:"licenseHtml"},{fallback:y(()=>[...f[7]||(f[7]=[l("div",{class:"flex justify-center"},[l("craft-spinner")],-1)])]),default:y(()=>[l("div",{class:"license",innerHTML:t.licenseHtml},null,8,it)]),_:1})]),_:1})):n(s)("installing")?(e(),S(tt,{key:1,data:$,onSuccess:f[1]||(f[1]=w=>n(o)())},null,8,["data"])):(e(),a("div",dt,[U(T,{as:"form",action:n(r).action,onSubmit:ae(Q,["prevent"])},{actions:y(()=>[l("div",ct,[l("craft-button",{type:"button",onClick:f[5]||(f[5]=(...w)=>n(i)&&n(i)(...w)),appearance:"plain",class:"justify-self-start"},[B(d(n(c)("Back"))+" ",1),f[9]||(f[9]=l("craft-icon",{name:"arrow-left",slot:"prefix"},null,-1))]),l("ul",mt,[(e(!0),a(p,null,h(n(k),(w,j)=>(e(),a("li",{key:j},[l("span",{class:H(["dot",{"dot--active":n(s)(j)}])},[l("span",ft,d(w.label),1)],2)]))),128))]),l("craft-button",{class:"justify-self-end",type:"submit",variant:"primary",loading:L.value==="loading"},[B(d(n(r).submitLabel??n(c)("Next"))+" ",1),f[10]||(f[10]=l("craft-icon",{name:"arrow-right",slot:"suffix"},null,-1))],8,bt)])]),default:y(()=>[n(s)("account")?(e(),S(M,{key:0,"illustration-src":n(ke),heading:n(r).heading,class:"screen"},{default:y(()=>[n(s)("account")?(e(),S(me,{key:0,modelValue:$.account,"onUpdate:modelValue":f[2]||(f[2]=w=>$.account=w),errors:I.account},null,8,["modelValue","errors"])):b("",!0)]),_:1},8,["illustration-src","heading"])):b("",!0),n(s)("db")?(e(),S(M,{key:1,"illustration-src":n(xe),heading:n(r).heading,class:"screen"},{default:y(()=>[U(Ze,{modelValue:$.db,"onUpdate:modelValue":f[3]||(f[3]=w=>$.db=w),errors:I.db},null,8,["modelValue","errors"])]),_:1},8,["illustration-src","heading"])):b("",!0),n(s)("site")?(e(),S(M,{key:2,"illustration-src":n(we),heading:n(r).heading,class:"screen"},{default:y(()=>[U(n(O),{data:"localeOptions"},{fallback:y(()=>[...f[8]||(f[8]=[l("craft-spinner",null,null,-1)])]),default:y(()=>[U(he,{modelValue:$.site,"onUpdate:modelValue":f[4]||(f[4]=w=>$.site=w),localeOptions:t.localeOptions,errors:I.site},null,8,["modelValue","localeOptions","errors"])]),_:1})]),_:1},8,["illustration-src","heading"])):b("",!0)]),_:1},8,["action"])]))]),_:1},8,["is-active"])])],64))}}),vt=D(pt,[["__scopeId","data-v-6b52fc11"]]);export{vt as default}; +import{Y as G,A as Y,d as _,c as a,o as e,F as p,Z as x,m as b,$ as V,s as C,u as n,i as c,p as h,t as d,a as l,B as R,ae as Z,af as H,r as z,_ as D,l as S,w as y,a0 as J,ag as K,a5 as W,V as T,ab as X,ah as ee,ai as F,U,a6 as te,b as B,a8 as O,N as ae,aj as le,a4 as se}from"./cp3.js";const ne=""+new URL("assets/installer-bg.png",import.meta.url).href,P=t=>{const g=G(t);Y(g,async u=>{u?.tagName.includes("CRAFT-")&&(await customElements.whenDefined(u.tagName.toLowerCase()),await u?.updateComplete),u?.focus()})},re=["label","has-feedback-for"],oe={key:0,class:"error-list",slot:"feedback"},ie=["label","has-feedback-for"],ue={key:0,class:"error-list",slot:"feedback"},de=["label","has-feedback-for"],ce={key:0,class:"error-list",slot:"feedback"},me=_({__name:"AccountFields",props:{modelValue:{default:()=>({})},errors:{default:()=>({})},showUsername:{type:Boolean,default:!0}},emits:["success","click:back","update:modelValue"],setup(t,{emit:g}){const u=g,k=t,r=C({get(){return k.modelValue},set(v){u("update:modelValue",v)}});return P("username-input"),(v,m)=>(e(),a(p,null,[t.showUsername?x((e(),a("craft-input",{key:0,label:n(c)("Username"),id:"account-username",name:"username","onUpdate:modelValue":m[0]||(m[0]=o=>r.value.username=o),"has-feedback-for":t.errors?.username?"error":"",maxlength:"255",ref:"username-input"},[t.errors?.username?(e(),a("ul",oe,[(e(!0),a(p,null,h(t.errors?.username,o=>(e(),a("li",null,d(o),1))),256))])):b("",!0)],8,re)),[[V,r.value.username]]):b("",!0),x(l("craft-input",{label:n(c)("Email"),id:"account-email",name:"email","onUpdate:modelValue":m[1]||(m[1]=o=>r.value.email=o),maxlength:"255",autocomplete:"email","has-feedback-for":t.errors?.email?"error":"",type:"email"},[t.errors?.email?(e(),a("ul",ue,[(e(!0),a(p,null,h(t.errors?.email,o=>(e(),a("li",null,d(o),1))),256))])):b("",!0)],8,ie),[[V,r.value.email]]),x(l("craft-input-password",{label:n(c)("Password"),id:"account-password",name:"password","onUpdate:modelValue":m[2]||(m[2]=o=>r.value.password=o),"has-feedback-for":t.errors?.password?"error":"",autocomplete:"new-password"},[t.errors?.password?(e(),a("ul",ce,[(e(!0),a(p,null,h(t.errors?.password,o=>(e(),a("li",null,d(o),1))),256))])):b("",!0)],8,de),[[V,r.value.password]])],64))}}),fe=["label"],be=["label"],pe=["label",".modelValue"],ge={slot:"input"},ve=["selected","value"],he=_({__name:"SiteFields",props:{modelValue:{default:()=>({})},localeOptions:{default:()=>[]},errors:{default:()=>({})}},emits:["update:modelValue"],setup(t,{emit:g}){const u=g,k=t,r=C({get(){return k.modelValue},set(m){u("update:modelValue",m)}});function v(m){const o=m.target;u("update:modelValue",{...r.value,language:o?.modelValue})}return P("site-name"),(m,o)=>(e(),a(p,null,[x(l("craft-input",{name:"name",label:n(c)("System Name"),id:"site-name","onUpdate:modelValue":o[0]||(o[0]=i=>r.value.name=i),maxlength:"255",ref:"site-name"},null,8,fe),[[V,r.value.name]]),x(l("craft-input",{name:"baseUrl",label:n(c)("Base URL"),"onUpdate:modelValue":o[1]||(o[1]=i=>r.value.baseUrl=i)},null,8,be),[[V,r.value.baseUrl]]),l("craft-select",{label:n(c)("Language"),id:"site-language",name:"language",".modelValue":r.value.language,onModelValueChanged:v},[l("select",ge,[(e(!0),a(p,null,h(t.localeOptions,i=>(e(),a("option",{key:i.id,selected:i.id===r.value.language,value:i.id},d(i.id)+" ("+d(i.name)+") ",9,ve))),128))])],40,pe)],64))}}),ye=()=>{const t=R({start:{},license:{id:"license",label:"License"},account:{id:"account",label:"Account",action:"/admin/actions/install/validate-account",heading:c("Create your account")},db:{id:"db",label:"Database",action:"/admin/actions/install/validate-db",heading:c("Connect to your database")},site:{id:"site",label:"Site",action:"/admin/actions/install/validate-site",heading:c("Set up your site"),submitLabel:c("Finish up")},installing:{label:"Installing",id:"installing"}}),g=C(()=>Object.keys(t.value).reduce((v,m)=>{const o=t.value[m];return(o.hidden??!1)||(v[m]=o),v},{})),u=C(()=>Object.keys(g.value).reduce((v,m)=>{const o=g.value[m];return(o.label??!1)&&(v[m]=o),v},{})),k=Z(g),r=C(()=>k.stepNames.value[k.index.value]);return{...k,possibleSteps:t,currentId:r,dotSteps:u}},ke=""+new URL("assets/account.png",import.meta.url).href,we=""+new URL("assets/site.png",import.meta.url).href,xe=""+new URL("assets/db.png",import.meta.url).href,Ve=_({__name:"Callout",props:{variant:{default:"info"},appearance:{default:"default"}},setup(t){return(g,u)=>(e(),a("div",{class:H({callout:!0,"callout--danger":t.variant==="danger","callout--info":t.variant==="info","callout--success":t.variant==="success","callout--warning":t.variant==="warning","callout--emphasis":t.appearance==="emphasis","callout--default":t.appearance==="default","callout--outline":t.appearance==="outline","callout--plain":t.appearance==="plain"})},[z(g.$slots,"default",{},void 0,!0)],2))}}),$e=D(Ve,[["__scopeId","data-v-b7a3b948"]]),Se={class:"grid grid-cols-5 gap-2"},Ce={class:"col-span-2"},Ue=["label",".modelValue"],_e={slot:"input"},Le=["value"],Ie={key:0,class:"error-list",slot:"feedback"},Ne={class:"col-span-2"},Be=["label"],Me={key:0,class:"error-list",slot:"feedback"},Te=["label"],De={key:0,class:"error-list",slot:"feedback"},Pe={key:0,class:"error-list col-span-5"},je={class:"grid grid-cols-2 gap-2"},Fe=["label"],Oe={key:0,class:"error-list",slot:"feedback"},Re=["label"],He={key:0,class:"error-list",slot:"feedback"},ze={key:0,class:"error-list col-span-2"},Ae={class:"grid grid-cols-4 gap-2"},Ee={class:"col-span-2"},qe=["label"],Qe={key:0,class:"error-list",slot:"feedback"},Ge=["label"],Ye={key:0,class:"error-list",slot:"feedback"},Ze=_({__name:"DbFields",props:{modelValue:{default:()=>({})},errors:{default:()=>({})}},emits:["update:modelValue"],setup(t,{emit:g}){const u=g,k=t,r=C({get(){return k.modelValue},set(o){u("update:modelValue",o)}});function v(o){const i=o.target;i&&(r.value[i.name]=i.modelValue)}const m=[{value:"mysql",label:"MySQL"},{value:"pgsql",label:"PostgreSQL"}];return P("db-driver"),(o,i)=>(e(),a(p,null,[t.errors&&t.errors["*"]?(e(),S($e,{key:0,variant:"danger"},{default:y(()=>[l("ul",null,[(e(!0),a(p,null,h(t.errors["*"],s=>(e(),a("li",null,d(s),1))),256))])]),_:1})):b("",!0),l("div",Se,[l("div",Ce,[l("craft-select",{label:n(c)("Driver"),name:"driver",id:"db-driver",".modelValue":r.value.driver,onModelValueChanged:v,ref:"db-driver"},[l("select",_e,[(e(),a(p,null,h(m,s=>l("option",{key:s.value,value:s.value},d(s.label),9,Le)),64))]),t.errors?.driver?(e(),a("ul",Ie,[(e(!0),a(p,null,h(t.errors?.driver,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],40,Ue)]),l("div",Ne,[x(l("craft-input",{label:n(c)("Host"),name:"host",id:"db-host","onUpdate:modelValue":i[0]||(i[0]=s=>r.value.host=s),placeholder:"127.0.0.1"},[t.errors?.host?(e(),a("ul",Me,[(e(!0),a(p,null,h(t.errors?.host,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Be),[[V,r.value.host]])]),l("div",null,[x(l("craft-input",{label:n(c)("Port"),name:"port",id:"db-port","onUpdate:modelValue":i[1]||(i[1]=s=>r.value.port=s),size:"7"},[t.errors?.port?(e(),a("ul",De,[(e(!0),a(p,null,h(t.errors?.port,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Te),[[V,r.value.port]])]),t.errors?.server?(e(),a("ul",Pe,[(e(!0),a(p,null,h(t.errors.server,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)]),l("div",je,[l("div",null,[x(l("craft-input",{label:n(c)("Username"),name:"username",id:"db-username","onUpdate:modelValue":i[2]||(i[2]=s=>r.value.username=s),placeholder:"root"},[t.errors?.username?(e(),a("ul",Oe,[(e(!0),a(p,null,h(t.errors?.username,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Fe),[[V,r.value.username]])]),l("div",null,[x(l("craft-input-password",{label:n(c)("Password"),name:"password",id:"db-password","onUpdate:modelValue":i[3]||(i[3]=s=>r.value.password=s)},[t.errors?.password?(e(),a("ul",He,[(e(!0),a(p,null,h(t.errors?.password,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Re),[[V,r.value.password]])]),t.errors?.user?(e(),a("ul",ze,[(e(!0),a(p,null,h(t.errors.user,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)]),l("div",Ae,[l("div",Ee,[x(l("craft-input",{label:n(c)("Database Name"),name:"name",id:"db-database","onUpdate:modelValue":i[4]||(i[4]=s=>r.value.database=s)},[t.errors?.database?(e(),a("ul",Qe,[(e(!0),a(p,null,h(t.errors?.database,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,qe),[[V,r.value.database]])]),l("div",null,[x(l("craft-input",{label:n(c)("Prefix"),name:"prefix",id:"db-prefix","onUpdate:modelValue":i[5]||(i[5]=s=>r.value.prefix=s),maxlength:"5",size:"7"},[t.errors?.prefix?(e(),a("ul",Ye,[(e(!0),a(p,null,h(t.errors?.prefix,s=>(e(),a("li",null,d(s),1))),256))])):b("",!0)],8,Ge),[[V,r.value.prefix]])])])],64))}}),Je={key:0,class:"content"},Ke={key:1,class:"content"},We={key:2,class:"content"},Xe={class:"text-left border border-red-500 rounded p-4 text-red-800 bg-red-50 font-mono text-xs"},et=_({__name:"InstallingScreen",props:{data:{}},setup(t){const{props:g}=J(),u=t,{execute:k,error:r,isSuccess:v,isLoading:m,isError:o}=K("/admin/actions/install/install",{onSuccess:i=>{setTimeout(()=>{window.location.href=g.postCpLoginRedirect},1e3)}});return W(async()=>{await k(u.data)}),(i,s)=>(e(),S(T,{class:"max-w-[80ch] mx-auto"},{default:y(()=>[n(m)?(e(),a("div",Je,[l("h2",null,d(n(c)("Installing Craft CMS…")),1),s[0]||(s[0]=l("craft-spinner",null,null,-1))])):n(v)?(e(),a("div",Ke,[l("h2",null,d(n(c)("Craft is installed! 🎉")),1),s[1]||(s[1]=l("div",{class:"flex justify-center items-center"},[l("craft-icon",{name:"circle-check",variant:"regular",style:{color:"var(--c-color-success-bg-emphasis)","font-size":"2.5rem"}})],-1))])):b("",!0),n(o)?(e(),a("div",We,[l("h2",null,d(n(c)("Install failed 😞")),1),l("div",Xe,d(n(r).message),1)])):b("",!0)]),_:1}))}}),tt=D(et,[["__scopeId","data-v-d53a06fb"]]),at={class:"grid md:grid-cols-2 gap-4 items-center"},lt={class:"aspect-[352/455] w-1/2 md:w-3/4 mx-auto"},st=["src"],nt={class:"mb-4"},rt={class:"grid gap-3 pr-6"},M=_({__name:"StepScreen",props:{illustrationSrc:{default:""},heading:{default:""}},setup(t){return(g,u)=>(e(),a("div",at,[l("div",lt,[l("img",{loading:"lazy",src:t.illustrationSrc,alt:"",width:"368"},null,8,st)]),l("div",null,[l("h2",nt,d(t.heading),1),l("div",rt,[z(g.$slots,"default")])])]))}}),ot={class:"install"},it=["innerHTML"],ut={class:"flex justify-center w-full"},dt={key:2,class:"max-w-[80ch]"},ct={class:"grid grid-cols-3 items-center gap-2"},mt={class:"flex gap-2 justify-center"},ft={class:"sr-only"},bt=["loading"],pt=_({__name:"Install",props:{dbConfig:{},localeOptions:{},licenseHtml:{},defaultSystemName:{},defaultSiteUrl:{},defaultSiteLanguage:{},showDbScreen:{type:Boolean}},setup(t){X(N=>({ea40fc04:g.value}));const g=C(()=>`url(${ne})`),u=t,{dotSteps:k,current:r,currentId:v,goTo:m,goToNext:o,goToPrevious:i,isCurrent:s,possibleSteps:A}=ye(),L=R("idle");ee(()=>{A.value.db.hidden=u.showDbScreen});function E(){m("license")}const I=F({account:{},db:{},site:{}}),$=F({account:{username:"",email:"",password:""},db:{driver:u.dbConfig.driver,host:u.dbConfig.host,port:u.dbConfig.port,database:u.dbConfig.database,username:u.dbConfig.username,password:u.dbConfig.password,prefix:u.dbConfig.prefix},site:{name:u.defaultSystemName,baseUrl:u.defaultSiteUrl,language:u.defaultSiteLanguage}}),q=C(()=>!s("start"));async function Q(N){if(L.value==="loading")return;I[v.value]=null;const f=N.currentTarget;try{L.value="loading",await se.post(f.action,$[v.value]),o(),L.value="idle"}catch(w){I[v.value]=w.response.data.errors,L.value="error"}}return(N,f)=>(e(),a(p,null,[U(n(te),{title:n(c)("Install Craft CMS")},null,8,["title"]),l("div",ot,[n(s)("start")?(e(),a("craft-button",{key:0,type:"button",onClick:E,variant:"primary",class:"begin-button"},[B(d(n(c)("Install Craft CMS"))+" ",1),f[6]||(f[6]=l("craft-icon",{name:"arrow-right",slot:"suffix"},null,-1))])):b("",!0),U(le,{"is-active":q.value,overlay:!1},{default:y(()=>[n(s)("license")?(e(),S(T,{key:0,class:"max-w-[80ch] mx-auto"},{actions:y(()=>[l("div",ut,[l("craft-button",{type:"button",variant:"primary",onClick:f[0]||(f[0]=w=>n(m)("account"))},d(n(c)("Got it")),1)])]),default:y(()=>[U(n(O),{data:"licenseHtml"},{fallback:y(()=>[...f[7]||(f[7]=[l("div",{class:"flex justify-center"},[l("craft-spinner")],-1)])]),default:y(()=>[l("div",{class:"license",innerHTML:t.licenseHtml},null,8,it)]),_:1})]),_:1})):n(s)("installing")?(e(),S(tt,{key:1,data:$,onSuccess:f[1]||(f[1]=w=>n(o)())},null,8,["data"])):(e(),a("div",dt,[U(T,{as:"form",action:n(r).action,onSubmit:ae(Q,["prevent"])},{actions:y(()=>[l("div",ct,[l("craft-button",{type:"button",onClick:f[5]||(f[5]=(...w)=>n(i)&&n(i)(...w)),appearance:"plain",class:"justify-self-start"},[B(d(n(c)("Back"))+" ",1),f[9]||(f[9]=l("craft-icon",{name:"arrow-left",slot:"prefix"},null,-1))]),l("ul",mt,[(e(!0),a(p,null,h(n(k),(w,j)=>(e(),a("li",{key:j},[l("span",{class:H(["dot",{"dot--active":n(s)(j)}])},[l("span",ft,d(w.label),1)],2)]))),128))]),l("craft-button",{class:"justify-self-end",type:"submit",variant:"primary",loading:L.value==="loading"},[B(d(n(r).submitLabel??n(c)("Next"))+" ",1),f[10]||(f[10]=l("craft-icon",{name:"arrow-right",slot:"suffix"},null,-1))],8,bt)])]),default:y(()=>[n(s)("account")?(e(),S(M,{key:0,"illustration-src":n(ke),heading:n(r).heading,class:"screen"},{default:y(()=>[n(s)("account")?(e(),S(me,{key:0,modelValue:$.account,"onUpdate:modelValue":f[2]||(f[2]=w=>$.account=w),errors:I.account},null,8,["modelValue","errors"])):b("",!0)]),_:1},8,["illustration-src","heading"])):b("",!0),n(s)("db")?(e(),S(M,{key:1,"illustration-src":n(xe),heading:n(r).heading,class:"screen"},{default:y(()=>[U(Ze,{modelValue:$.db,"onUpdate:modelValue":f[3]||(f[3]=w=>$.db=w),errors:I.db},null,8,["modelValue","errors"])]),_:1},8,["illustration-src","heading"])):b("",!0),n(s)("site")?(e(),S(M,{key:2,"illustration-src":n(we),heading:n(r).heading,class:"screen"},{default:y(()=>[U(n(O),{data:"localeOptions"},{fallback:y(()=>[...f[8]||(f[8]=[l("craft-spinner",null,null,-1)])]),default:y(()=>[U(he,{modelValue:$.site,"onUpdate:modelValue":f[4]||(f[4]=w=>$.site=w),localeOptions:t.localeOptions,errors:I.site},null,8,["modelValue","localeOptions","errors"])]),_:1})]),_:1},8,["illustration-src","heading"])):b("",!0)]),_:1},8,["action"])]))]),_:1},8,["is-active"])])],64))}}),vt=D(pt,[["__scopeId","data-v-6b52fc11"]]);export{vt as default}; diff --git a/resources/build/SettingsGeneralPage.js b/resources/build/SettingsGeneralPage.js index 1c8905a2e2d..ac1e58d100e 100644 --- a/resources/build/SettingsGeneralPage.js +++ b/resources/build/SettingsGeneralPage.js @@ -1 +1 @@ -import{L as D,d as C,aa as F,ab as M,s as x,ac as U,c as n,o,I as N,m as f,a as e,t as u,_ as I,ad as Z,M as B,a1 as E,U as V,w as _,l as P,Z as T,u as t,e as d,F as h,p as g,b as y,$ as z,a2 as R,N as $}from"./cp3.js";import{A}from"./AppLayout.js";import{_ as G}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";const v=a=>({url:v.url(a),method:"post"});v.definition={methods:["post"],url:"/admin/settings/general"};v.url=a=>v.definition.url+D(a);v.post=a=>({url:v.url(a),method:"post"});const H={Solo:0,Team:1,Pro:2,Enterprise:3},q=["label","name","button-label","help-text","disabled","multiple",".uploadResponse","has-feedback-for"],K={key:0,class:"error-list",slot:"feedback"},j=C({__name:"FileUpload",props:F({label:{},name:{},buttonLabel:{default:"Select file"},helpText:{},thumbnailSize:{default:120},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},error:{default:null}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(a){M(b=>({c33cc0a6:c.value}));const m=U(a,"modelValue"),p=a,c=x(()=>isNaN(Number(p.thumbnailSize))?p.thumbnailSize:`calc(${p.thumbnailSize}rem / 16)`);function S(b){m.value=p.multiple?b.detail?.newFiles:b.detail?.newFiles?.[0]||null}function r(b){m.value=null}const k=x(()=>m.value?(Array.isArray(m.value)?m.value:[m.value]).map(i=>({name:i.name,status:"SUCCESS",downloadUrl:i.url,errorMessage:"",id:i.name})):[]);return(b,i)=>(o(),n("craft-input-file",{label:a.label,name:a.name,"button-label":a.buttonLabel,"help-text":a.helpText,disabled:a.disabled,multiple:a.multiple,".uploadResponse":k.value,onFileRemoved:r,onFileListChanged:S,"has-feedback-for":a.error?"error":"",style:N({"--thumbnail-size":c.value})},[a.error?(o(),n("ul",K,[e("li",null,u(a.error),1)])):f("",!0)],44,q))}}),O=I(j,[["__scopeId","data-v-e8396b7f"]]),J={key:0,class:"flex gap-1 items-center text-sm"},Q={key:1,class:"tw:flex tw:gap-1 tw:items-center tw:text-sm"},W={key:0},X=["loading"],Y={slot:"content"},ee={class:"bg-white border border-border-subtle rounded-sm shadow-sm"},te={class:"grid gap-3 p-5"},ae={key:0,variant:"danger",icon:"triangle-exclamation"},le={slot:"title",class:"tw:font-bold"},oe=["label","has-feedback-for","disabled"],ne=[".choiceValue",".hint"],se={slot:"after"},ie={variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},re={href:"https://craftcms.com/docs/5.x/configure.html#control-panel-settings"},de={slot:"feedback"},ue={key:0,class:"error-list"},ce=["label",".modelValue","has-feedback-for","disabled"],me={class:"tw:flex tw:items-center tw:gap-1"},fe={class:"tw:flex tw:items-center tw:gap-1"},be=[".choiceValue"],he={class:"tw:flex tw:items-center tw:gap-1"},pe=["variant"],ve={class:"tw:font-mono"},ye=["innerHTML"],ge={slot:"feedback"},ke={key:0,class:"error-list"},we=["label","has-feedback-for","disabled"],Ve=["innerHTML"],xe={key:0,class:"error-list",slot:"feedback"},Se=["label",".modelValue","has-feedback-for","disabled"],_e=[".choiceValue"],Le={key:0,class:"error-list",slot:"feedback"},Te={class:"p-4 grid gap-3"},ze=C({__name:"SettingsGeneralPage",props:{readOnly:{type:Boolean},system:{},nameSuggestions:{},timezoneOptions:{},systemStatusOptions:{},siteIcon:{},siteLogo:{},saveUrl:{},flash:{},errors:{}},setup(a){const m=a,p=x(()=>m.flash),c=x(()=>m.errors),{app:S}=Z(),r=B({name:m.system.name,live:m.system.live,retryDuration:m.system.retryDuration,timeZone:m.system.timeZone,siteIcon:m.siteIcon,siteLogo:m.siteLogo});function k(i){const l=i.target;l&&(r[l.name]=l.modelValue)}E("keydown",i=>{(i.metaKey||i.ctrlKey)&&i.key==="s"&&(i.preventDefault(),b())});function b(){r.transform(i=>(i.siteIcon!==null&&!(i.siteIcon instanceof File)&&delete i.siteIcon,i.siteLogo!==null&&!(i.siteLogo instanceof File)&&delete i.siteLogo,i)).clearErrors().submit(v())}return(i,l)=>(o(),n("form",{onSubmit:$(b,["prevent"])},[V(A,{title:t(d)("General Settings")},{actions:_(()=>[V(R,null,{default:_(()=>[t(r).recentlySuccessful&&p.value?.success?(o(),n("div",J,[l[4]||(l[4]=e("craft-icon",{name:"circle-check",style:{color:"var(--c-color-success-bg-emphasis)"}},null,-1)),y(" "+u(p.value.success),1)])):f("",!0),t(r).hasErrors?(o(),n("div",Q,[l[5]||(l[5]=e("craft-icon",{name:"triangle-exclamation",style:{color:"var(--c-color-danger-bg-emphasis)"}},null,-1)),y(" "+u(t(d)("Could not save settings")),1)])):f("",!0)]),_:1}),a.readOnly?f("",!0):(o(),n("craft-button-group",W,[e("craft-button",{type:"submit",variant:"primary",loading:t(r).processing},u(t(d)("Save")),9,X),e("craft-action-menu",null,[l[7]||(l[7]=e("craft-button",{slot:"invoker",variant:"primary",type:"button",icon:""},[e("craft-icon",{name:"chevron-down"})],-1)),e("div",Y,[e("craft-action-item",{onClick:b},[y(u(t(d)("Save and continue editing"))+" ",1),l[6]||(l[6]=e("craft-shortcut",{slot:"suffix",class:"ml-2"},"S",-1))])])])]))]),default:_(()=>[e("div",ee,[a.readOnly?(o(),P(G,{key:0})):f("",!0),e("div",te,[t(r).hasErrors?(o(),n("craft-callout",ae,[e("div",le,u(t(d)("Could not save settings")),1),e("ul",null,[(o(!0),n(h,null,g(c.value,(s,L)=>(o(),n("li",null,u(s),1))),256))])])):f("",!0),T(e("craft-combobox",{label:t(d)("System Name"),id:"name",name:"name","onUpdate:modelValue":l[0]||(l[0]=s=>t(r).name=s),"has-feedback-for":c.value?.name?"error":"",disabled:a.readOnly,"require-option-match":!1,"show-all-on-empty":""},[(o(!0),n(h,null,g(a.nameSuggestions,(s,L)=>(o(),n(h,{key:L},[(o(!0),n(h,null,g(s.data,w=>(o(),n("craft-option",{key:w.name,".choiceValue":w.name,".hint":w.hint},u(w.name),41,ne))),128))],64))),128)),e("div",se,[e("craft-callout",ie,[y(u(t(d)("This can begin with an environment variable."))+" ",1),e("a",re,u(t(d)("Learn more")),1)])]),e("div",de,[c.value?.name?(o(),n("ul",ue,[e("li",null,u(c.value.name),1)])):f("",!0)])],8,oe),[[z,t(r).name]]),e("craft-combobox",{label:t(d)("System Status"),id:"live",name:"live",".modelValue":a.system.live?"1":"0","has-feedback-for":c.value?.live?"error":"",onModelValueChanged:k,disabled:a.readOnly,"show-all-on-empty":""},[e("craft-option",{".choiceValue":"1"},[e("div",me,[l[8]||(l[8]=e("craft-indicator",{variant:"success"},null,-1)),e("span",null,u(t(d)("Online")),1)])],32),e("craft-option",{".choiceValue":"0"},[e("div",fe,[l[9]||(l[9]=e("craft-indicator",{variant:"danger"},null,-1)),e("span",null,u(t(d)("Offline")),1)])],32),(o(!0),n(h,null,g(a.systemStatusOptions,s=>(o(),n(h,{key:s.label},[s.optgroup?(o(),n(h,{key:0},[],64)):(o(),n("craft-option",{key:1,".choiceValue":s.value},[e("div",he,[e("craft-indicator",{variant:s.value?"success":"error"},null,8,pe),e("span",ve,u(s.label),1)])],40,be))],64))),128)),e("craft-callout",{slot:"after",variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb",innerHTML:t(d)("This can be set to an environment variable with a boolean value ({examples})",{examples:"yes/no/true/false/on/off/0/1"})},null,8,ye),e("div",ge,[c.value.live?(o(),n("ul",ke,[e("li",null,u(c.value.live),1)])):f("",!0)])],40,ce),T(e("craft-input",{label:t(d)("Retry Duration"),id:"retry-duration",name:"retryDuration","onUpdate:modelValue":l[1]||(l[1]=s=>t(r).retryDuration=s),"has-feedback-for":c.value?.retryDuration?"error":"",inputmode:"numeric",size:"4",disabled:a.readOnly},[e("div",{slot:"help-text",innerHTML:t(d)("The number of seconds that the Retry-After HTTP header should be set to for 503 responses when the system is offline.")},null,8,Ve),c.value?.retryDuration?(o(),n("ul",xe,[e("li",null,u(c.value.retryDuration),1)])):f("",!0)],8,we),[[z,t(r).retryDuration]]),e("craft-combobox",{label:t(d)("Time Zone"),id:"time-zone",name:"timeZone",".modelValue":t(r).timeZone,onModelValueChanged:k,"has-feedback-for":c.value?.timeZone?"error":"",disabled:a.readOnly,"show-all-on-empty":""},[(o(!0),n(h,null,g(a.timezoneOptions,s=>(o(),n("craft-option",{key:s.value,".choiceValue":s.value},u(s.label)+u(s.data?.hint?` — ${s.data.hint}`:""),41,_e))),128)),l[10]||(l[10]=e("craft-callout",{slot:"after",variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},[y(" This can be set to an environment variable with a value of a "),e("a",{href:"https://www.php.net/manual/en/timezones.php",rel:"noopener",target:"_blank"},"supported time zone"),y(". ")],-1)),c.value?.timeZone?(o(),n("ul",Le,[e("li",null,u(c.value.timeZone),1)])):f("",!0)],40,Se)]),t(S).edition.value>=t(H).Pro?(o(),n(h,{key:1},[l[11]||(l[11]=e("hr",null,null,-1)),e("div",Te,[V(O,{label:t(d)("Site Icon"),name:"siteIcon",modelValue:t(r).siteIcon,"onUpdate:modelValue":l[2]||(l[2]=s=>t(r).siteIcon=s),"help-text":t(d)("Square SVG file recommended. The logo will be displayed at {size} by {size}.",{size:"32px"}),"thumbnail-size":32,disabled:a.readOnly,error:t(r).errors.siteIcon},null,8,["label","modelValue","help-text","disabled","error"]),V(O,{label:t(d)("Login Page Logo"),modelValue:t(r).siteLogo,"onUpdate:modelValue":l[3]||(l[3]=s=>t(r).siteLogo=s),name:"siteLogo","help-text":t(d)("SVG file recommended. The logo will be displayed at {size} wide.",{size:"288px"}),disabled:a.readOnly,"thumbnail-size":288,error:t(r).errors.siteLogo},null,8,["label","modelValue","help-text","disabled","error"])])],64)):f("",!0)])]),_:1},8,["title"])],32))}}),De=I(ze,[["__scopeId","data-v-5eec89a4"]]);export{De as default}; +import{L as M,d as C,aa as D,ab as F,s as x,ac as U,c as n,o,I as N,m as f,a as e,t as u,_ as I,ad as Z,M as B,a1 as E,U as V,w as S,l as P,Z as T,u as t,i as r,F as h,p as g,b as y,$ as z,a2 as R,N as $}from"./cp3.js";import{A}from"./AppLayout.js";import{_ as G}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";const v=a=>({url:v.url(a),method:"post"});v.definition={methods:["post"],url:"/admin/settings/general"};v.url=a=>v.definition.url+M(a);v.post=a=>({url:v.url(a),method:"post"});const H={Solo:0,Team:1,Pro:2,Enterprise:3},q=["label","name","button-label","help-text","disabled","multiple",".uploadResponse","has-feedback-for"],K={key:0,class:"error-list",slot:"feedback"},j=C({__name:"FileUpload",props:D({label:{},name:{},buttonLabel:{default:"Select file"},helpText:{},thumbnailSize:{default:120},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},error:{default:null}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(a){F(b=>({c33cc0a6:c.value}));const m=U(a,"modelValue"),p=a,c=x(()=>isNaN(Number(p.thumbnailSize))?p.thumbnailSize:`calc(${p.thumbnailSize}rem / 16)`);function _(b){m.value=p.multiple?b.detail?.newFiles:b.detail?.newFiles?.[0]||null}function d(b){m.value=null}const k=x(()=>m.value?(Array.isArray(m.value)?m.value:[m.value]).map(i=>({name:i.name,status:"SUCCESS",downloadUrl:i.url,errorMessage:"",id:i.name})):[]);return(b,i)=>(o(),n("craft-input-file",{label:a.label,name:a.name,"button-label":a.buttonLabel,"help-text":a.helpText,disabled:a.disabled,multiple:a.multiple,".uploadResponse":k.value,onFileRemoved:d,onFileListChanged:_,"has-feedback-for":a.error?"error":"",style:N({"--thumbnail-size":c.value})},[a.error?(o(),n("ul",K,[e("li",null,u(a.error),1)])):f("",!0)],44,q))}}),O=I(j,[["__scopeId","data-v-e8396b7f"]]),J={key:0,class:"flex gap-1 items-center text-sm"},Q={key:1,class:"tw:flex tw:gap-1 tw:items-center tw:text-sm"},W={key:0},X=["loading"],Y={slot:"invoker",variant:"primary",type:"button",icon:""},ee=["label"],te={slot:"content"},ae={class:"bg-white border border-border-subtle rounded-sm shadow-sm"},le={class:"grid gap-3 p-5"},oe={key:0,variant:"danger",icon:"triangle-exclamation"},ne={slot:"title",class:"tw:font-bold"},se=["label","has-feedback-for","disabled"],ie=[".choiceValue",".hint"],re={slot:"after"},de={variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},ue={href:"https://craftcms.com/docs/5.x/configure.html#control-panel-settings"},ce={slot:"feedback"},me={key:0,class:"error-list"},fe=["label",".modelValue","has-feedback-for","disabled"],be={class:"tw:flex tw:items-center tw:gap-1"},he={class:"tw:flex tw:items-center tw:gap-1"},pe=[".choiceValue"],ve={class:"tw:flex tw:items-center tw:gap-1"},ye=["variant"],ge={class:"tw:font-mono"},ke=["innerHTML"],we={slot:"feedback"},Ve={key:0,class:"error-list"},xe=["label","has-feedback-for","disabled"],_e=["innerHTML"],Se={key:0,class:"error-list",slot:"feedback"},Le=["label",".modelValue","has-feedback-for","disabled"],Te=[".choiceValue"],ze={key:0,class:"error-list",slot:"feedback"},Oe={class:"p-4 grid gap-3"},Ce=C({__name:"SettingsGeneralPage",props:{readOnly:{type:Boolean},system:{},nameSuggestions:{},timezoneOptions:{},systemStatusOptions:{},siteIcon:{},siteLogo:{},saveUrl:{},flash:{},errors:{}},setup(a){const m=a,p=x(()=>m.flash),c=x(()=>m.errors),{app:_}=Z(),d=B({name:m.system.name,live:m.system.live,retryDuration:m.system.retryDuration,timeZone:m.system.timeZone,siteIcon:m.siteIcon,siteLogo:m.siteLogo});function k(i){const l=i.target;l&&(d[l.name]=l.modelValue)}E("keydown",i=>{(i.metaKey||i.ctrlKey)&&i.key==="s"&&(i.preventDefault(),b())});function b(){d.transform(i=>(i.siteIcon!==null&&!(i.siteIcon instanceof File)&&delete i.siteIcon,i.siteLogo!==null&&!(i.siteLogo instanceof File)&&delete i.siteLogo,i)).clearErrors().submit(v())}return(i,l)=>(o(),n("form",{onSubmit:$(b,["prevent"])},[V(A,{title:t(r)("General Settings")},{actions:S(()=>[V(R,null,{default:S(()=>[t(d).recentlySuccessful&&p.value?.success?(o(),n("div",J,[l[4]||(l[4]=e("craft-icon",{name:"circle-check",style:{color:"var(--c-color-success-bg-emphasis)"}},null,-1)),y(" "+u(p.value.success),1)])):f("",!0),t(d).hasErrors?(o(),n("div",Q,[l[5]||(l[5]=e("craft-icon",{name:"triangle-exclamation",style:{color:"var(--c-color-danger-bg-emphasis)"}},null,-1)),y(" "+u(t(r)("Could not save settings")),1)])):f("",!0)]),_:1}),a.readOnly?f("",!0):(o(),n("craft-button-group",W,[e("craft-button",{type:"submit",variant:"primary",loading:t(d).processing},u(t(r)("Save")),9,X),e("craft-action-menu",null,[e("craft-button",Y,[e("craft-icon",{name:"chevron-down",label:t(r)("More actions")},null,8,ee)]),e("div",te,[e("craft-action-item",{onClick:b},[y(u(t(r)("Save and continue editing"))+" ",1),l[6]||(l[6]=e("craft-shortcut",{slot:"suffix",class:"ml-2"},"S",-1))])])])]))]),default:S(()=>[e("div",ae,[a.readOnly?(o(),P(G,{key:0})):f("",!0),e("div",le,[t(d).hasErrors?(o(),n("craft-callout",oe,[e("div",ne,u(t(r)("Could not save settings")),1),e("ul",null,[(o(!0),n(h,null,g(c.value,(s,L)=>(o(),n("li",null,u(s),1))),256))])])):f("",!0),T(e("craft-combobox",{label:t(r)("System Name"),id:"name",name:"name","onUpdate:modelValue":l[0]||(l[0]=s=>t(d).name=s),"has-feedback-for":c.value?.name?"error":"",disabled:a.readOnly,"require-option-match":!1,"show-all-on-empty":""},[(o(!0),n(h,null,g(a.nameSuggestions,(s,L)=>(o(),n(h,{key:L},[(o(!0),n(h,null,g(s.data,w=>(o(),n("craft-option",{key:w.name,".choiceValue":w.name,".hint":w.hint},u(w.name),41,ie))),128))],64))),128)),e("div",re,[e("craft-callout",de,[y(u(t(r)("This can begin with an environment variable."))+" ",1),e("a",ue,u(t(r)("Learn more")),1)])]),e("div",ce,[c.value?.name?(o(),n("ul",me,[e("li",null,u(c.value.name),1)])):f("",!0)])],8,se),[[z,t(d).name]]),e("craft-combobox",{label:t(r)("System Status"),id:"live",name:"live",".modelValue":a.system.live?"1":"0","has-feedback-for":c.value?.live?"error":"",onModelValueChanged:k,disabled:a.readOnly,"show-all-on-empty":""},[e("craft-option",{".choiceValue":"1"},[e("div",be,[l[7]||(l[7]=e("craft-indicator",{variant:"success"},null,-1)),e("span",null,u(t(r)("Online")),1)])],32),e("craft-option",{".choiceValue":"0"},[e("div",he,[l[8]||(l[8]=e("craft-indicator",{variant:"danger"},null,-1)),e("span",null,u(t(r)("Offline")),1)])],32),(o(!0),n(h,null,g(a.systemStatusOptions,s=>(o(),n(h,{key:s.label},[s.optgroup?(o(),n(h,{key:0},[],64)):(o(),n("craft-option",{key:1,".choiceValue":s.value},[e("div",ve,[e("craft-indicator",{variant:s.value?"success":"error"},null,8,ye),e("span",ge,u(s.label),1)])],40,pe))],64))),128)),e("craft-callout",{slot:"after",variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb",innerHTML:t(r)("This can be set to an environment variable with a boolean value ({examples})",{examples:"yes/no/true/false/on/off/0/1"})},null,8,ke),e("div",we,[c.value.live?(o(),n("ul",Ve,[e("li",null,u(c.value.live),1)])):f("",!0)])],40,fe),T(e("craft-input",{label:t(r)("Retry Duration"),id:"retry-duration",name:"retryDuration","onUpdate:modelValue":l[1]||(l[1]=s=>t(d).retryDuration=s),"has-feedback-for":c.value?.retryDuration?"error":"",inputmode:"numeric",size:"4",disabled:a.readOnly},[e("div",{slot:"help-text",innerHTML:t(r)("The number of seconds that the Retry-After HTTP header should be set to for 503 responses when the system is offline.")},null,8,_e),c.value?.retryDuration?(o(),n("ul",Se,[e("li",null,u(c.value.retryDuration),1)])):f("",!0)],8,xe),[[z,t(d).retryDuration]]),e("craft-combobox",{label:t(r)("Time Zone"),id:"time-zone",name:"timeZone",".modelValue":t(d).timeZone,onModelValueChanged:k,"has-feedback-for":c.value?.timeZone?"error":"",disabled:a.readOnly,"show-all-on-empty":""},[(o(!0),n(h,null,g(a.timezoneOptions,s=>(o(),n("craft-option",{key:s.value,".choiceValue":s.value},u(s.label)+u(s.data?.hint?` — ${s.data.hint}`:""),41,Te))),128)),l[9]||(l[9]=e("craft-callout",{slot:"after",variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},[y(" This can be set to an environment variable with a value of a "),e("a",{href:"https://www.php.net/manual/en/timezones.php",rel:"noopener",target:"_blank"},"supported time zone"),y(". ")],-1)),c.value?.timeZone?(o(),n("ul",ze,[e("li",null,u(c.value.timeZone),1)])):f("",!0)],40,Le)]),t(_).edition.value>=t(H).Pro?(o(),n(h,{key:1},[l[10]||(l[10]=e("hr",null,null,-1)),e("div",Oe,[V(O,{label:t(r)("Site Icon"),name:"siteIcon",modelValue:t(d).siteIcon,"onUpdate:modelValue":l[2]||(l[2]=s=>t(d).siteIcon=s),"help-text":t(r)("Square SVG file recommended. The logo will be displayed at {size} by {size}.",{size:"32px"}),"thumbnail-size":32,disabled:a.readOnly,error:t(d).errors.siteIcon},null,8,["label","modelValue","help-text","disabled","error"]),V(O,{label:t(r)("Login Page Logo"),modelValue:t(d).siteLogo,"onUpdate:modelValue":l[3]||(l[3]=s=>t(d).siteLogo=s),name:"siteLogo","help-text":t(r)("SVG file recommended. The logo will be displayed at {size} wide.",{size:"288px"}),disabled:a.readOnly,"thumbnail-size":288,error:t(d).errors.siteLogo},null,8,["label","modelValue","help-text","disabled","error"])])],64)):f("",!0)])]),_:1},8,["title"])],32))}}),Fe=I(Ce,[["__scopeId","data-v-24796a08"]]);export{Fe as default}; diff --git a/resources/build/SettingsIndexPage.js b/resources/build/SettingsIndexPage.js index 322669a2a7e..9698ae77cd4 100644 --- a/resources/build/SettingsIndexPage.js +++ b/resources/build/SettingsIndexPage.js @@ -1 +1 @@ -import{d as m,l,o as t,w as p,a as e,m as f,c as a,F as c,p as r,t as d,b as y,u as _,e as g,_ as b}from"./cp3.js";import{A as v}from"./AppLayout.js";import{_ as x}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";const $={class:"py-3"},k={class:"grid gap-6"},B=["id"],S=["aria-labelledby"],C={class:"settings-grid"},I=["href"],N={class:"settings-content"},V={class:"settings-icon"},w=["name","label"],A=m({__name:"SettingsIndexPage",props:{readOnly:{type:Boolean},settings:{}},setup(n){return(F,L)=>(t(),l(v,{title:_(g)("Settings")},{default:p(()=>[e("div",$,[n.readOnly?(t(),l(x,{key:0})):f("",!0),e("div",k,[(t(!0),a(c,null,r(n.settings,(u,o,i)=>(t(),a("div",{key:o},[e("h2",{id:`category-heading-${i}`,class:"mb-2 text-lg leading-tight"},d(o),9,B),e("nav",{"aria-labelledby":`category-heading-${i}`},[e("ul",C,[(t(!0),a(c,null,r(u,(s,h)=>(t(),a("li",null,[e("a",{href:s.url||`settings/${h}`,class:"settings-item"},[e("div",N,[e("div",V,[e("craft-icon",{name:s.icon,style:{"font-size":"calc(40rem / 16)"},label:`${s.label} - ${_(g)("Settings")}`},null,8,w)]),y(" "+d(s.label),1)])],8,I)]))),256))])],8,S)]))),128))])])]),_:1},8,["title"]))}}),D=b(A,[["__scopeId","data-v-2699be55"]]);export{D as default}; +import{d as m,l,o as t,w as p,a as e,m as f,c as a,F as c,p as r,t as d,b as y,u as _,i as g,_ as b}from"./cp3.js";import{A as v}from"./AppLayout.js";import{_ as x}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";const $={class:"py-3"},k={class:"grid gap-6"},B=["id"],S=["aria-labelledby"],C={class:"settings-grid"},I=["href"],N={class:"settings-content"},V={class:"settings-icon"},w=["name","label"],A=m({__name:"SettingsIndexPage",props:{readOnly:{type:Boolean},settings:{}},setup(n){return(F,L)=>(t(),l(v,{title:_(g)("Settings")},{default:p(()=>[e("div",$,[n.readOnly?(t(),l(x,{key:0})):f("",!0),e("div",k,[(t(!0),a(c,null,r(n.settings,(u,i,o)=>(t(),a("div",{key:i},[e("h2",{id:`category-heading-${o}`,class:"mb-2 text-lg leading-tight"},d(i),9,B),e("nav",{"aria-labelledby":`category-heading-${o}`},[e("ul",C,[(t(!0),a(c,null,r(u,(s,h)=>(t(),a("li",null,[e("a",{href:s.url||`settings/${h}`,class:"settings-item"},[e("div",N,[e("div",V,[e("craft-icon",{name:s.icon,style:{"font-size":"calc(40rem / 16)"},label:`${s.label} - ${_(g)("Settings")}`},null,8,w)]),y(" "+d(s.label),1)])],8,I)]))),256))])],8,S)]))),128))])])]),_:1},8,["title"]))}}),D=b(A,[["__scopeId","data-v-2699be55"]]);export{D as default}; diff --git a/resources/build/SettingsSectionsIndexPage.js b/resources/build/SettingsSectionsIndexPage.js index d5a3c4036d9..ce25298933f 100644 --- a/resources/build/SettingsSectionsIndexPage.js +++ b/resources/build/SettingsSectionsIndexPage.js @@ -1 +1 @@ -import{K as T,L as h,d as B,M as D,c as $,o as C,a as u,u as a,e as d,N as z,B as _,O as I,P as g,s as L,R as O,S as U,T as P,l as V,w as f,U as S,V as k,W as q,X as E,t as j,b as H}from"./cp3.js";import{A as Q}from"./AppLayout.js";const r=(e,t)=>({url:r.url(e,t),method:"get"});r.definition={methods:["get","head"],url:"/admin/actions/sections/edit/{section}"};r.url=(e,t)=>{(typeof e=="string"||typeof e=="number")&&(e={section:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={section:e.id}),Array.isArray(e)&&(e={section:e[0]}),e=T(e);const o={section:typeof e.section=="object"?e.section.id:e.section};return r.definition.url.replace("{section}",o.section.toString()).replace(/\/+$/,"")+h(t)};r.get=(e,t)=>({url:r.url(e,t),method:"get"});r.head=(e,t)=>({url:r.url(e,t),method:"head"});const s=(e,t)=>({url:s.url(e,t),method:"get"});s.definition={methods:["get","head"],url:"/admin/settings/sections/{section}"};s.url=(e,t)=>{(typeof e=="string"||typeof e=="number")&&(e={section:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={section:e.id}),Array.isArray(e)&&(e={section:e[0]}),e=T(e);const o={section:typeof e.section=="object"?e.section.id:e.section};return s.definition.url.replace("{section}",o.section.toString()).replace(/\/+$/,"")+h(t)};s.get=(e,t)=>({url:s.url(e,t),method:"get"});s.head=(e,t)=>({url:s.url(e,t),method:"head"});const F={"/admin/actions/sections/edit/{section}":r,"/admin/settings/sections/{section}":s},m=e=>({url:m.url(e),method:"post"});m.definition={methods:["post"],url:"/admin/actions/sections/delete-section"};m.url=e=>m.definition.url+h(e);m.post=e=>({url:m.url(e),method:"post"});const i=e=>({url:i.url(e),method:"get"});i.definition={methods:["get","head"],url:"/admin/settings/sections"};i.url=e=>i.definition.url+h(e);i.get=e=>({url:i.url(e),method:"get"});i.head=e=>({url:i.url(e),method:"head"});const c=e=>({url:c.url(e),method:"get"});c.definition={methods:["get","head"],url:"/admin/settings/sections/new"};c.url=e=>c.definition.url+h(e);c.get=e=>({url:c.url(e),method:"get"});c.head=e=>({url:c.url(e),method:"head"});const K=["loading"],W=["label"],X=B({__name:"DeleteSectionButton",props:{section:{}},setup(e){const t=e,o=D({id:t.section.id});function y(){confirm(d("Are you sure you want to delete “{name}” and all its entries?",{name:t.section.name}))&&o.submit(m())}return(v,b)=>(C(),$("form",{onSubmit:z(y,["prevent"]),method:"post"},[u("craft-button",{variant:"danger",type:"submit",size:"small",icon:"",appearance:"plain",loading:a(o).processing},[u("craft-icon",{label:a(d)("Delete section"),name:"x"},null,8,W)],8,K)],32))}}),G=["href"],J={class:"flex gap-1 items-center"},Y=["label","value"],Z=["loading"],ne=B({__name:"SettingsSectionsIndexPage",props:{title:{},data:{},pagination:{},sort:{},searchTerm:{},emptyMessage:{},readOnly:{type:Boolean}},setup(e){const t=e,o=I(),y=_([o.accessor("name",{header:d("Name"),cell:({row:n,getValue:l})=>g("a",{class:"font-bold",href:F["/admin/settings/sections/{section}"](n.original.id).url},l())}),o.accessor("handle",{header:d("Handle"),cell:({getValue:n})=>g("craft-copy-attribute",{value:n()},n())}),o.accessor("type",{header:d("Type")}),o.display({id:"actions",cell:({row:n})=>g("div",{class:"flex justify-end items-center gap-2"},g(X,{section:n.original}))})]),v=L(()=>t.pagination.current_page?t.pagination.current_page-1:0),b=_({pageIndex:v.value,pageSize:t.pagination.per_page}),x=_(t.sort?t.sort.map(n=>({id:n.field,desc:n.direction==="desc"})):[]),M=O({get data(){return t.data},get columns(){return y.value},getCoreRowModel:U(),manualPagination:!0,manualSorting:!0,rowCount:t.pagination.total,enableMultiSort:!0,enableSortingRemoval:!1,state:{get pagination(){return b.value},get sorting(){return x.value}},onSortingChange:n=>{const p=(typeof n=="function"?n(x.value):n).reduce((w,A,R)=>(w[R]={field:A.id,direction:A.desc?"desc":"asc"},w),{}),N=new URLSearchParams(window.location.search);P.visit(i({query:{...Object.fromEntries(N),sort:p,page:1}}),{only:["data","sort"],preserveScroll:!0})},onPaginationChange:n=>{const l=typeof n=="function"?n(b.value):n,p=new URLSearchParams(window.location.search);P.visit(i({query:{...Object.fromEntries(p),page:l.pageIndex+1,per_page:l.pageSize}}),{only:["data","pagination"],preserveScroll:!0})}});return(n,l)=>(C(),V(Q,{title:e.title},{actions:f(()=>[u("a",{href:a(c)().url},[l[0]||(l[0]=u("craft-icon",{name:"plus",slot:"prefix"},null,-1)),H(" "+j(a(d)("New section")),1)],8,G)]),default:f(()=>[S(k,{padding:0,appearance:"raised"},{default:f(()=>[S(q,{spacing:"relaxed",table:a(M),reorderable:!1,from:e.pagination.from,to:e.pagination.to,total:e.pagination.total,"enable-adjust-page-size":!0},{"search-form":f(()=>[S(a(E),{action:a(i)()},{default:f(({processing:p})=>[u("div",J,[u("craft-input",{name:"search",label:a(d)("Search term"),value:e.searchTerm,"label-sr-only":""},null,8,Y),u("craft-button",{type:"submit",loading:p},j(a(d)("Search")),9,Z)])]),_:1},8,["action"])]),_:1},8,["table","from","to","total"])]),_:1})]),_:1},8,["title"]))}});export{ne as default}; +import{K as T,L as h,d as B,M as D,c as $,o as C,a as u,u as a,i as d,N as z,B as _,O as I,P as g,s as L,R as O,S as U,T as P,l as V,w as f,U as S,V as k,W as q,X as E,t as j,b as H}from"./cp3.js";import{A as Q}from"./AppLayout.js";const r=(e,t)=>({url:r.url(e,t),method:"get"});r.definition={methods:["get","head"],url:"/admin/actions/sections/edit/{section}"};r.url=(e,t)=>{(typeof e=="string"||typeof e=="number")&&(e={section:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={section:e.id}),Array.isArray(e)&&(e={section:e[0]}),e=T(e);const o={section:typeof e.section=="object"?e.section.id:e.section};return r.definition.url.replace("{section}",o.section.toString()).replace(/\/+$/,"")+h(t)};r.get=(e,t)=>({url:r.url(e,t),method:"get"});r.head=(e,t)=>({url:r.url(e,t),method:"head"});const s=(e,t)=>({url:s.url(e,t),method:"get"});s.definition={methods:["get","head"],url:"/admin/settings/sections/{section}"};s.url=(e,t)=>{(typeof e=="string"||typeof e=="number")&&(e={section:e}),typeof e=="object"&&!Array.isArray(e)&&"id"in e&&(e={section:e.id}),Array.isArray(e)&&(e={section:e[0]}),e=T(e);const o={section:typeof e.section=="object"?e.section.id:e.section};return s.definition.url.replace("{section}",o.section.toString()).replace(/\/+$/,"")+h(t)};s.get=(e,t)=>({url:s.url(e,t),method:"get"});s.head=(e,t)=>({url:s.url(e,t),method:"head"});const F={"/admin/actions/sections/edit/{section}":r,"/admin/settings/sections/{section}":s},m=e=>({url:m.url(e),method:"post"});m.definition={methods:["post"],url:"/admin/actions/sections/delete-section"};m.url=e=>m.definition.url+h(e);m.post=e=>({url:m.url(e),method:"post"});const i=e=>({url:i.url(e),method:"get"});i.definition={methods:["get","head"],url:"/admin/settings/sections"};i.url=e=>i.definition.url+h(e);i.get=e=>({url:i.url(e),method:"get"});i.head=e=>({url:i.url(e),method:"head"});const c=e=>({url:c.url(e),method:"get"});c.definition={methods:["get","head"],url:"/admin/settings/sections/new"};c.url=e=>c.definition.url+h(e);c.get=e=>({url:c.url(e),method:"get"});c.head=e=>({url:c.url(e),method:"head"});const K=["loading"],W=["label"],X=B({__name:"DeleteSectionButton",props:{section:{}},setup(e){const t=e,o=D({id:t.section.id});function y(){confirm(d("Are you sure you want to delete “{name}” and all its entries?",{name:t.section.name}))&&o.submit(m())}return(v,b)=>(C(),$("form",{onSubmit:z(y,["prevent"]),method:"post"},[u("craft-button",{variant:"danger",type:"submit",size:"small",icon:"",appearance:"plain",loading:a(o).processing},[u("craft-icon",{label:a(d)("Delete section"),name:"x"},null,8,W)],8,K)],32))}}),G=["href"],J={class:"flex gap-1 items-center"},Y=["label","value"],Z=["loading"],ne=B({__name:"SettingsSectionsIndexPage",props:{title:{},data:{},pagination:{},sort:{},searchTerm:{},emptyMessage:{},readOnly:{type:Boolean}},setup(e){const t=e,o=I(),y=_([o.accessor("name",{header:d("Name"),cell:({row:n,getValue:l})=>g("a",{class:"font-bold",href:F["/admin/settings/sections/{section}"](n.original.id).url},l())}),o.accessor("handle",{header:d("Handle"),cell:({getValue:n})=>g("craft-copy-attribute",{value:n()},n())}),o.accessor("type",{header:d("Type")}),o.display({id:"actions",cell:({row:n})=>g("div",{class:"flex justify-end items-center gap-2"},g(X,{section:n.original}))})]),v=L(()=>t.pagination.current_page?t.pagination.current_page-1:0),b=_({pageIndex:v.value,pageSize:t.pagination.per_page}),x=_(t.sort?t.sort.map(n=>({id:n.field,desc:n.direction==="desc"})):[]),M=O({get data(){return t.data},get columns(){return y.value},getCoreRowModel:U(),manualPagination:!0,manualSorting:!0,rowCount:t.pagination.total,enableMultiSort:!0,enableSortingRemoval:!1,state:{get pagination(){return b.value},get sorting(){return x.value}},onSortingChange:n=>{const p=(typeof n=="function"?n(x.value):n).reduce((w,A,R)=>(w[R]={field:A.id,direction:A.desc?"desc":"asc"},w),{}),N=new URLSearchParams(window.location.search);P.visit(i({query:{...Object.fromEntries(N),sort:p,page:1}}),{only:["data","sort"],preserveScroll:!0})},onPaginationChange:n=>{const l=typeof n=="function"?n(b.value):n,p=new URLSearchParams(window.location.search);P.visit(i({query:{...Object.fromEntries(p),page:l.pageIndex+1,per_page:l.pageSize}}),{only:["data","pagination"],preserveScroll:!0})}});return(n,l)=>(C(),V(Q,{title:e.title},{actions:f(()=>[u("a",{href:a(c)().url},[l[0]||(l[0]=u("craft-icon",{name:"plus",slot:"prefix"},null,-1)),H(" "+j(a(d)("New section")),1)],8,G)]),default:f(()=>[S(k,{padding:0,appearance:"raised"},{default:f(()=>[S(q,{spacing:"relaxed",table:a(M),reorderable:!1,from:e.pagination.from,to:e.pagination.to,total:e.pagination.total,"enable-adjust-page-size":!0},{"search-form":f(()=>[S(a(E),{action:a(i)()},{default:f(({processing:p})=>[u("div",J,[u("craft-input",{name:"search",label:a(d)("Search term"),value:e.searchTerm,"label-sr-only":""},null,8,Y),u("craft-button",{type:"submit",loading:p},j(a(d)("Search")),9,Z)])]),_:1},8,["action"])]),_:1},8,["table","from","to","total"])]),_:1})]),_:1},8,["title"]))}});export{ne as default}; diff --git a/resources/build/SettingsSitesEdit.js b/resources/build/SettingsSitesEdit.js index fef43adc050..9fff938aee2 100644 --- a/resources/build/SettingsSitesEdit.js +++ b/resources/build/SettingsSitesEdit.js @@ -1 +1 @@ -import{d as z,Y as E,A as R,s as b,c as o,o as n,F as y,m as h,Z as L,a,t as u,u as t,e as l,p as j,$ as _,b as k,U as v,w as A,a0 as Y,M as Z,a1 as G,l as w,a2 as V,B as $,a3 as B,N as H}from"./cp3.js";import{A as M}from"./AppLayout.js";import{_ as F}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";import{I as O,s as K,_ as P}from"./DeleteSiteModal.vue_vue_type_script_setup_true_lang.js";const W={Á:"A",á:"a",Ä:"A",ä:"a",À:"A",à:"a",Â:"A",â:"a",É:"E",é:"e",Ë:"E",ë:"e",È:"E",è:"e",Ê:"E",ê:"e",Í:"I",í:"i",Ï:"I",ï:"i",Ì:"I",ì:"i",Î:"I",î:"i",Ó:"O",ó:"o",Ö:"O",ö:"o",Ò:"O",ò:"o",Ô:"O",ô:"o",Ú:"U",ú:"u",Ü:"U",ü:"u",Ù:"U",ù:"u",Û:"U",û:"u",Ý:"Y",ý:"y",Ÿ:"Y",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Ѓ:"Gj",Е:"E",Ж:"Z",З:"Z",Ѕ:"Dz",И:"I",Ј:"j",К:"K",Л:"L",Љ:"Lj",М:"M",Н:"N",Њ:"Nj",О:"O",П:"P",Р:"R",С:"S",Т:"T",Ќ:"Kj",У:"U",Ф:"F",Х:"X",Ц:"C",Ч:"C",Џ:"Dz",Ш:"S",а:"a",б:"b",в:"v",г:"g",д:"d",ѓ:"gj",е:"e",ж:"z",з:"z",ѕ:"dz",и:"i",ј:"j",к:"k",л:"l",љ:"lj",м:"m",н:"n",њ:"nj",о:"o",п:"p",р:"r",с:"s",т:"t",ќ:"kj",у:"u",ф:"f",х:"x",ц:"c",ч:"c",џ:"dz",ш:"s",æ:"ae",ǽ:"ae",Ã:"A",Å:"A",Ǻ:"A",Ă:"A",Ǎ:"A",Æ:"AE",Ǽ:"AE",ã:"a",å:"a",ǻ:"a",ă:"a",ǎ:"a",ª:"a",Ĉ:"C",Ċ:"C",Ç:"C",ç:"c",ĉ:"c",ċ:"c",Ð:"D",Đ:"D",ð:"d",đ:"d",Ĕ:"E",Ė:"E",ĕ:"e",ė:"e",ƒ:"f",Ĝ:"G",Ġ:"G",ĝ:"g",ġ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ĭ:"I",Ǐ:"I",Į:"I",IJ:"IJ",ĩ:"i",ĭ:"i",ǐ:"i",į:"i",ij:"ij",Ĵ:"J",ĵ:"j",Ĺ:"L",Ľ:"L",Ŀ:"L",ĺ:"l",ľ:"l",ŀ:"l",Ñ:"N",ñ:"n",ʼn:"n",Õ:"O",Ō:"O",Ŏ:"O",Ǒ:"O",Ő:"O",Ơ:"O",Ø:"O",Ǿ:"O",Œ:"OE",õ:"o",ō:"o",ŏ:"o",ǒ:"o",ő:"o",ơ:"o",ø:"o",ǿ:"o",º:"o",œ:"oe",Ŕ:"R",Ŗ:"R",ŕ:"r",ŗ:"r",Ŝ:"S",Ș:"S",ŝ:"s",ș:"s",ſ:"s",Ţ:"T",Ț:"T",Ŧ:"T",Þ:"TH",ţ:"t",ț:"t",ŧ:"t",þ:"th",Ũ:"U",Ŭ:"U",Ű:"U",Ų:"U",Ư:"U",Ǔ:"U",Ǖ:"U",Ǘ:"U",Ǚ:"U",Ǜ:"U",ũ:"u",ŭ:"u",ű:"u",ų:"u",ư:"u",ǔ:"u",ǖ:"u",ǘ:"u",ǚ:"u",ǜ:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ÿ:"y",ŷ:"y",ΑΥ:"AU",ΑΎ:"AU",Αυ:"Au",Αύ:"Au",ΕΊ:"I",ΕΙ:"I",Ει:"Ei",ΕΥ:"EF",ΕΎ:"EU",Εί:"I",Ευ:"Ef",Εύ:"Eu",ΟΙ:"I",ΟΊ:"I",ΟΥ:"U",ΟΎ:"OU",Οι:"Oi",Οί:"I",Ου:"Oy",Ού:"Ou",ΥΙ:"I",ΎΙ:"I",Υι:"Yi",Ύι:"I",ΥΊ:"I",Υί:"I",αυ:"au",αύ:"au",εί:"i",ει:"ei",ευ:"ef",εύ:"eu",οι:"oi",οί:"i",ου:"oy",ού:"ou",υι:"yi",ύι:"i",υί:"i",Α:"A",Ά:"A",Β:"B",Δ:"D",Ε:"E",Έ:"E",Φ:"F",Γ:"G",Η:"H",Ή:"I",Ι:"I",Ί:"I",Ϊ:"I",Κ:"K",Ξ:"Ks",Λ:"L",Μ:"M",Ν:"N",Π:"P",Ο:"O",Ό:"O",Ψ:"Ps",Ρ:"R",Σ:"S",Τ:"T",Θ:"Th",Ω:"O",Ώ:"W",Χ:"X",ϒ:"Y",Υ:"Y",Ύ:"Y",Ϋ:"Y",Ζ:"Z",α:"a",ά:"a",β:"v",δ:"d",ε:"e",έ:"e",φ:"f",γ:"gh",η:"i",ή:"i",ι:"i",ί:"i",ϊ:"i",ΐ:"i",κ:"k",ξ:"ks",λ:"l",μ:"m",ν:"n",ο:"o",ό:"o",π:"p",ψ:"ps",ρ:"r",σ:"s",ς:"s",τ:"t",ϑ:"th",θ:"th",ϐ:"v",ω:"o",ώ:"w",χ:"kh",υ:"i",ύ:"y",ΰ:"y",ϋ:"y",ζ:"z",अ:"a",आ:"aa",ए:"e",ई:"ii",ऍ:"ei",ऎ:"ae",ऐ:"ai",इ:"i",ओ:"o",ऑ:"oi",ऒ:"oii",ऊ:"uu",औ:"ou",उ:"u",ब:"B",भ:"Bha",च:"Ca",छ:"Chha",ड:"Da",ढ:"Dha",फ:"Fa",फ़:"Fi",ग:"Ga",घ:"Gha",ग़:"Ghi",ह:"Ha",ज:"Ja",झ:"Jha",क:"Ka",ख:"Kha",ख़:"Khi",ल:"L",ळ:"Li",ऌ:"Li",ऴ:"Lii",ॡ:"Lii",म:"Ma",न:"Na",ङ:"Na",ञ:"Nia",ण:"Nae",ऩ:"Ni",ॐ:"oms",प:"Pa",क़:"Qi",र:"Ra",ऋ:"Ri",ॠ:"Ri",ऱ:"Ri",स:"Sa",श:"Sha",ष:"Shha",ट:"Ta",त:"Ta",ठ:"Tha",द:"Tha",थ:"Tha",ध:"Thha",ड़:"ugDha",ढ़:"ugDhha",व:"Va",य:"Ya",य़:"Yi",ज़:"Za",Ա:"A",Բ:"B",Գ:"G",Դ:"D",Ե:"E",Զ:"Z",Է:"E",Ը:"Y",Թ:"Th",Ժ:"Zh",Ի:"I",Լ:"L",Խ:"Kh",Ծ:"Ts",Կ:"K",Հ:"H",Ձ:"Dz",Ղ:"Gh",Ճ:"Tch",Մ:"M",Յ:"Y",Ն:"N",Շ:"Sh",Ո:"Vo",Չ:"Ch",Պ:"P",Ջ:"J",Ռ:"R",Ս:"S",Վ:"V",Տ:"T",Ր:"R",Ց:"C",Ւ:"u",Փ:"Ph",Ք:"Q",և:"ev",Օ:"O",Ֆ:"F",ա:"a",բ:"b",գ:"g",դ:"d",ե:"e",զ:"z",է:"e",ը:"y",թ:"th",ժ:"zh",ի:"i",լ:"l",խ:"kh",ծ:"ts",կ:"k",հ:"h",ձ:"dz",ղ:"gh",ճ:"tch",մ:"m",յ:"y",ն:"n",շ:"sh",ո:"vo",չ:"ch",պ:"p",ջ:"j",ռ:"r",ս:"s",վ:"v",տ:"t",ր:"r",ց:"c",ւ:"u",փ:"ph",ք:"q",օ:"o",ֆ:"f",Ž:"Z",Ň:"N",Ş:"S",ž:"z",ň:"n",ş:"s",ı:"i",İ:"I",ğ:"g",Ğ:"G",ьо:"yo",Й:"i",Щ:"Shh",Ъ:"Ie",Ь:"",Ю:"Iu",Я:"Ia",й:"i",щ:"shh",ъ:"ie",ь:"",ю:"iu",я:"ia",Ē:"E",ē:"e","န်ုပ်":"nub","ောင်":"aung","ိုက်":"aik","ိုဒ်":"ok","ိုင်":"aing","ိုလ်":"ol","ေါင်":"aung","သြော":"aw","ောက်":"auk","ိတ်":"eik","ုတ်":"ok","ုန်":"on","ေတ်":"it","ုဒ်":"ait","ာန်":"an","ိန်":"ein","ွတ်":"ut","ေါ်":"aw","ွန်":"un","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","ိမ်":"ein","ုမ်":"on","ော်":"aw","ွမ်":"un","က်":"et","ေါ":"aw","ော":"aw","ျွ":"ywa","ြွ":"yw","ို":"o","ုံ":"on","တ်":"at","င်":"in","ည်":"i","ဒ်":"d","န်":"an","ပ်":"at","မ်":"an","စျ":"za","ယ်":"e","ဉ်":"in","စ်":"it","ိံ":"ein","ဲ":"e","း":"","ာ":"a","ါ":"a","ေ":"e","ံ":"an","ိ":"i","ီ":"i","ု":"u","ူ":"u","်":"at","္":"","့":"",က:"k","၉":"9",တ:"t",ရ:"ya",ယ:"y",မ:"m",ဘ:"ba",ဗ:"b",ဖ:"pa",ပ:"p",န:"n",ဓ:"da",ဒ:"d",ထ:"ta",ဏ:"na",ဝ:"w",ဎ:"da",ဍ:"d",ဌ:"ta",ဋ:"t",ည:"ny",ဇ:"z",ဆ:"sa",စ:"s",င:"ng",ဃ:"ga",ဂ:"g",လ:"l",သ:"th","၈":"8",ဩ:"aw",ခ:"kh","၆":"6","၅":"5","၄":"4","၃":"3","၂":"2","၁":"1","၀":"0","၌":"hnaik","၍":"ywae",ဪ:"aw",ဦ:"-u",ဟ:"h",ဉ:"u",ဤ:"-i",ဣ:"i","၏":"-e",ဧ:"e","ှ":"h","ွ":"w","ျ":"ya","ြ":"y",အ:"a",ဠ:"la","၇":"7",DŽ:"DZ",Dž:"Dz",dž:"dz",DZ:"DZ",Dz:"Dz",dz:"dz",LJ:"LJ",Lj:"Lj",lj:"lj",NJ:"NJ",Nj:"Nj",nj:"nj",č:"c",Č:"C",ć:"c",Ć:"C",š:"s",Š:"S",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"f",ქ:"q",ღ:"gh",ყ:"y",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",Ё:"E",ё:"e",Ы:"Y",ы:"y",Э:"E",э:"e",І:"I",і:"i",Ѳ:"F",ѳ:"f",Ѣ:"E",ѣ:"e",Ѵ:"I",ѵ:"i",Є:"Je",є:"je",Ѥ:"Je",ѥ:"je","Ꙋ":"U","ꙋ":"u",Ѡ:"O",ѡ:"o",Ѿ:"Ot",ѿ:"ot",Ѫ:"U",ѫ:"u",Ѧ:"Ja",ѧ:"ja",Ѭ:"Ju",ѭ:"ju",Ѩ:"Ja",ѩ:"Ja",Ѯ:"Ks",ѯ:"ks",Ѱ:"Ps",ѱ:"ps",Ґ:"G",ґ:"g",Ї:"Yi",ї:"yi",Ә:"A",Ғ:"G",Қ:"Q",Ң:"N",Ө:"O",Ұ:"U",Ү:"U",Һ:"H",ә:"a",ғ:"g",қ:"q",ң:"n",ө:"o",ұ:"u",ү:"u",һ:"h",ď:"d",Ď:"D",ě:"e",Ě:"E",ř:"r",Ř:"R",ť:"t",Ť:"T",ů:"u",Ů:"U",ą:"a",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ả:"A",Ạ:"A",Ắ:"A",Ằ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Ấ:"A",Ầ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",ả:"a",ạ:"a",ắ:"a",ằ:"a",ẳ:"a",ẵ:"a",ặ:"a",ấ:"a",ầ:"a",ẩ:"a",ẫ:"a",ậ:"a",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ế:"E",Ề:"E",Ể:"E",Ễ:"E",Ệ:"E",ẻ:"e",ẽ:"e",ẹ:"e",ế:"e",ề:"e",ể:"e",ễ:"e",ệ:"e",Ỉ:"I",Ị:"I",ỉ:"i",ị:"i",Ỏ:"O",Ọ:"O",Ố:"O",Ồ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ớ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ợ:"O",ỏ:"o",ọ:"o",ố:"o",ồ:"o",ổ:"o",ỗ:"o",ộ:"o",ớ:"o",ờ:"o",ở:"o",ỡ:"o",ợ:"o",Ủ:"U",Ụ:"U",Ứ:"U",Ừ:"U",Ử:"U",Ữ:"U",Ự:"U",ủ:"u",ụ:"u",ứ:"u",ừ:"u",ử:"u",ữ:"u",ự:"u",Ỳ:"Y",Ỷ:"Y",Ỹ:"Y",Ỵ:"Y",ỳ:"y",ỷ:"y",ỹ:"y",ỵ:"y",ا:"a",ب:"b",پ:"p",ت:"t",ث:"th",ج:"g",چ:"ch",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"d",ط:"t",ظ:"th",ع:"aa",غ:"gh",ف:"f",ق:"k",ک:"k",گ:"g",ل:"l",ژ:"zh",ك:"k",م:"m",ن:"n",ه:"h",و:"o",ی:"y",آ:"a","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9",أ:"a",ي:"y",إ:"a",ؤ:"o",ئ:"y",ء:"aa",ђ:"dj",ћ:"c",Ђ:"Dj",Ћ:"C",ə:"e",Ə:"E",ß:"ss","ẞ":"SS",ভ্ল:"vl",পশ:"psh",ব্ধ:"bdh",ব্জ:"bj",ব্দ:"bd",ব্ব:"bb",ব্ল:"bl",ভ:"v",ব:"b",চ্ঞ:"cNG",চ্ছ:"cch",চ্চ:"cc",ছ:"ch",চ:"c",ধ্ন:"dhn",ধ্ম:"dhm",দ্ঘ:"dgh",দ্ধ:"ddh",দ্ভ:"dv",দ্ম:"dm",ড্ড:"DD",ঢ:"Dh",ধ:"dh",দ্গ:"dg",দ্দ:"dd",ড:"D",দ:"d","।":".",ঘ্ন:"Ghn",গ্ধ:"Gdh",গ্ণ:"GN",গ্ন:"Gn",গ্ম:"Gm",গ্ল:"Gl",জ্ঞ:"jNG",ঘ:"Gh",গ:"g",হ্ণ:"hN",হ্ন:"hn",হ্ম:"hm",হ্ল:"hl",হ:"h",জ্ঝ:"jjh",ঝ:"jh",জ্জ:"jj",জ:"j",ক্ষ্ণ:"kxN",ক্ষ্ম:"kxm",ক্ষ:"ksh",কশ:"ksh",ক্ক:"kk",ক্ট:"kT",ক্ত:"kt",ক্ল:"kl",ক্স:"ks",খ:"kh",ক:"k",ল্ভ:"lv",ল্ধ:"ldh",লখ:"lkh",লঘ:"lgh",লফ:"lph",ল্ক:"lk",ল্গ:"lg",ল্ট:"lT",ল্ড:"lD",ল্প:"lp",ল্ম:"lm",ল্ল:"ll",ল্ব:"lb",ল:"l",ম্থ:"mth",ম্ফ:"mf",ম্ভ:"mv",মপ্ল:"mpl",ম্ন:"mn",ম্প:"mp",ম্ম:"mm",ম্ল:"ml",ম্ব:"mb",ম:"m","০":"0","১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9",ঙ্ক্ষ:"Ngkx",ঞ্ছ:"nch",ঙ্ঘ:"ngh",ঙ্খ:"nkh",ঞ্ঝ:"njh",ঙ্গৌ:"ngOU",ঙ্গৈ:"ngOI",ঞ্চ:"nc",ঙ্ক:"nk",ঙ্ষ:"Ngx",ঙ্গ:"ngo",ঙ্ম:"Ngm",ঞ্জ:"nj",ন্ধ:"ndh",ন্ঠ:"nTh",ণ্ঠ:"NTh",ন্থ:"nth",ঙ্গা:"nga",ঙ্গি:"ngi",ঙ্গী:"ngI",ঙ্গু:"ngu",ঙ্গূ:"ngU",ঙ্গে:"nge",ঙ্গো:"ngO",ণ্ঢ:"NDh",নশ:"nsh",ঙর:"Ngr",ঞর:"NGr","ংর":"ngr",ঙ:"Ng",ঞ:"NG","ং":"ng",ন্ন:"nn",ণ্ণ:"NN",ণ্ন:"Nn",ন্ম:"nm",ণ্ম:"Nm",ন্দ:"nd",ন্ট:"nT",ণ্ট:"NT",ন্ড:"nD",ণ্ড:"ND",ন্ত:"nt",ন্স:"ns",ন:"n",ণ:"N","ৈ":"OI","ৌ":"OU","ো":"O",ঐ:"OI",ঔ:"OU",অ:"o",ও:"oo",ফ্ল:"fl",প্ট:"pT",প্ত:"pt",প্ন:"pn",প্প:"pp",প্ল:"pl",প্স:"ps",ফ:"f",প:"p","ৃ":"rri",ঋ:"rri",রর‍্য:"rry","্র্য":"ry","্রর":"rr",ড়্গ:"Rg",ঢ়:"Rh",ড়:"R",র:"r","্র":"r",শ্ছ:"Sch",ষ্ঠ:"ShTh",ষ্ফ:"Shf",স্ক্ল:"skl",স্খ:"skh",স্থ:"sth",স্ফ:"sf",শ্চ:"Sc",শ্ত:"St",শ্ন:"Sn",শ্ম:"Sm",শ্ল:"Sl",ষ্ক:"Shk",ষ্ট:"ShT",ষ্ণ:"ShN",ষ্প:"Shp",ষ্ম:"Shm",স্প্ল:"spl",স্ক:"sk",স্ট:"sT",স্ত:"st",স্ন:"sn",স্প:"sp",স্ম:"sm",স্ল:"sl",শ:"S",ষ:"Sh",স:"s","ু":"u",উ:"u",অ্য:"oZ",ত্থ:"tth","ৎ":"tt",ট্ট:"TT",ট্ম:"Tm",ঠ:"Th",ত্ন:"tn",ত্ম:"tm",থ:"th",ত্ত:"tt",ট:"T",ত:"t",অ্যা:"AZ","া":"a",আ:"a",য়া:"ya",য়:"y","ি":"i",ই:"i","ী":"ee",ঈ:"ee","ূ":"uu",ঊ:"uu","ে":"e",এ:"e",য:"z","্য":"Z",ইয়:"y",ওয়:"w","্ব":"w",এক্স:"x","ঃ":":","ঁ":"nn","্‌":"","˚":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","௦":"0","௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௰":"10","௱":"100","௲":"1000","Ꜳ":"AA","ꜳ":"aa","Ꜵ":"AO","ꜵ":"ao","Ꜷ":"AU","ꜷ":"au","Ꜹ":"AV","ꜹ":"av","Ꜻ":"av","ꜻ":"av","Ꜽ":"AY","ꜽ":"ay","ȸ":"db",ʣ:"dz",ʥ:"dz",ʤ:"dezh","🙰":"et",ff:"ff",ffi:"ffi",ffl:"ffl",fi:"fi",fl:"fl",ʩ:"feng",ʪ:"ls",ʫ:"lz",ɮ:"lezh","ȹ":"qp",ʨ:"tc",ʦ:"ts",ʧ:"tesh","Ꝏ":"OO","ꝏ":"oo",st:"st",ſt:"st","Ꜩ":"TZ","ꜩ":"tz","ᵫ":"ue",Aι:"Ai",αι:"ai",ἀ:"a",ἁ:"a",ἂ:"a",ἃ:"a",ἄ:"a",ἅ:"a",ἆ:"a",ἇ:"a",Ἀ:"A",Ἁ:"A",Ἂ:"A",Ἃ:"A",Ἄ:"A",Ἅ:"A",Ἆ:"A",Ἇ:"A",ᾰ:"a",ᾱ:"a",ᾲ:"a",ᾳ:"a",ᾴ:"a",ᾶ:"a",ᾷ:"a",Ᾰ:"A",Ᾱ:"A",Ὰ:"A",Ά:"A",ᾼ:"A",A̧:"A",a̧:"a","Ⱥ":"A","ⱥ":"a",Ȧ:"A",ȧ:"a",Ɓ:"B",C̈:"C",c̈:"c",C̨:"C",c̨:"c","Ȼ":"C","ȼ":"c",C̀:"C",c̀:"c",C̣:"C",c̣:"c",C̄:"C",c̄:"c",C̃:"C",c̃:"c",Ȩ:"E",ȩ:"e","Ɇ":"E","ɇ":"e",I̧:"I",i̧:"i",Ɨ:"I",ɨ:"i",i:"i",J́́:"J",j́:"j",J̀̀:"J",j̀:"j",J̈:"J",j̈:"j",J̧:"J",j̧:"j",J̨:"J",j̨:"j","Ɉ":"J","ɉ":"j",J̌:"J",ǰ:"j",J̇:"J",j:"j",J̣:"J",j̣:"j",J̄:"J",j̄:"j",J̃:"J",j̃:"j",ĸ:"k",L̀:"L",l̀:"l",L̂:"L",l̂:"l",L̈:"L",l̈:"l",L̨:"L",l̨:"l","Ƚ":"L",ƚ:"l",L̇:"L",l̇:"l",Ḷ:"L",ḷ:"l",L̄:"L",l̄:"l",L̃:"L",l̃:"l",Ŋ:"N",ŋ:"n",Ǹ:"N",ǹ:"n",N̂:"N",n̂:"n",N̈:"N",n̈:"n",N̨:"N",n̨:"n","Ꞥ":"N","ꞥ":"n",Ṅ:"N",ṅ:"n",Ṇ:"N",ṇ:"n",N̄:"N",n̄:"n",O̧:"O",o̧:"o",Ǫ:"O",ǫ:"o",Ɵ:"O",ɵ:"o",Ȯ:"O",ȯ:"o",S̀:"S",s̀:"s",Ŝ̀:"S",S̈:"S",s̈:"s",S̨:"S",s̨:"s","Ꞩ":"S","ꞩ":"s",Ṡ:"S",ṡ:"s",Ṣ:"S",ṣ:"s",S̄:"S",s̄:"s",S̃:"S",s̃:"s",T́:"T",t́:"t",T̀:"T",t̀:"t",T̂:"T",t̂:"t",T̈:"T",ẗ:"t",T̨:"T",t̨:"t","Ⱦ":"T","ⱦ":"t",Ṫ:"T",ṫ:"t",Ṭ:"T",ṭ:"t",T̄:"T",t̄:"t",T̃:"T",t̃:"t",U̧:"U",u̧:"u","Ʉ":"U",ʉ:"u",U̇:"U",u̇:"u",Ʊ:"U",ʊ:"u",Ẁ:"W",ẁ:"w",Ẃ:"W",ẃ:"w",Ẅ:"W",ẅ:"w","Ꙗ":"Ja","ꙗ":"ja",Y̧:"Y",y̧:"y",Y̨:"Y",y̨:"y","Ɏ":"Y","ɏ":"y",Y̌:"Y",y̌:"y",Ẏ:"Y",ẏ:"y",Ȳ:"Y",ȳ:"y",Z̀:"Z",z̀:"z",Ẑ:"Z",ẑ:"z",Z̈:"Z",z̈:"z",Z̧:"Z",z̧:"z",Z̨:"Z",z̨:"z",Ƶ:"Z",ƶ:"z",Ẓ:"Z",ẓ:"z",Z̄:"Z",z̄:"z",Z̃:"Z",z̃:"z"," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" ","\u2028":" ","\u2029":" ","​":" "," ":" "," ":" "," ":" ",ᅠ:" ","«":"<<","»":">>","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"‹":"'","›":"'","–":"-","—":"-","…":"...","€":"EUR",$:"$","₢":"Cr","₣":"Fr.","£":"PS","₤":"L.",ℳ:"M","₥":"mil","₦":"N","₧":"Pts","₨":"Rs",රු:"LKR",ரூ:"LKR","௹":"Rs",रू:"NPR","₹":"Rs","૱":"Rs","₩":"W","₪":"NS","₸":"KZT","₫":"D","֏":"AMD","₭":"K","₺":"TL","₼":"AZN","₮":"T","₯":"Dr","₲":"PYG","₾":"GEL","₳":"ARA","₴":"UAH","₽":"RUB","₵":"GHS","₡":"CL","¢":"c","¥":"YEN",円:"JPY","৳":"BDT",元:"CNY","﷼":"SAR","៛":"KR","₠":"ECU","¤":"$?","฿":"THB","؋":"AFN"};function q(s,c=W){s=s.normalize("NFC");let d="",i;for(let e=0;e/g,"");i=i.replace(/['"‘’“”ʻ\[\]\(\)\{\}:]/g,""),i=i.toLowerCase(),i=q(i),d.allowNonAlphaStart||(i=i.replace(/^[^a-z]+/,""));let e=i.split(/[^a-z0-9]+/).filter(Boolean);if(i="",d.handleCasing==="snake")return e.join("_");for(let p=0;pc.inertiaForm),p=b(()=>d.props.isMultisite),f=b(()=>d.props.groupOptions),N=b(()=>d.props.nameSuggestions),x=b(()=>d.props.languageOptions),D=b(()=>d.props.booleanEnvOptions.map(g=>g.type==="optgroup"?{...g,options:g.options.map(i)}:i(g))),J=b(()=>d.props.baseUrlSuggestions),T=b(()=>d.props.site);E("handle"),E("baseUrl");const C=b({get(){return e.value.enabled?"1":"0"},set(g){e.value.enabled=g}});return R(()=>e.value?.name,g=>{e.value?.handle===""&&(e.value.handle=I(g)),e.value?.baseUrl===""&&(e.value.baseUrl=Q(g,{prefix:"$",suffix:"_URL"}))}),(g,m)=>(n(),o(y,null,[e.value?.hasErrors?(n(),o("craft-callout",X,[a("div",ee,u(t(l)("Could not save settings")),1),a("ul",null,[(n(!0),o(y,null,j(e.value.errors,(r,S)=>(n(),o("li",{key:S},u(r),1))),128))])])):h("",!0),e.value.id?L((n(),o("input",{key:1,name:"id","onUpdate:modelValue":m[0]||(m[0]=r=>e.value.id=r),type:"hidden"},null,512)),[[_,e.value.id]]):h("",!0),a("craft-select",{label:t(l)("Group"),"help-text":t(l)("Which group should this site belong to?"),name:"group",id:"group",".modelValue":e.value.group,onModelValueChanged:m[1]||(m[1]=r=>e.value.group=r.target?.modelValue)},[a("select",te,[(n(!0),o(y,null,j(f.value,r=>(n(),o("option",{key:r.value,value:r.value},u(r.label),9,le))),128))]),e.value.errors?.group?(n(),o("ul",se,[(n(!0),o(y,null,j(e.value.errors?.group,r=>(n(),o("li",null,u(r),1))),256))])):h("",!0),e.value?.id&&p.value?(n(),o("div",ne,[a("craft-callout",ie,[a("span",oe,u(t(l)("Warning:")),1),k(" "+u(t(l)("Changing this may result in data loss.")),1)])])):h("",!0)],40,ae),a("craft-input",{label:t(l)("Name"),id:"name",name:"name",disabled:s.readOnly},[v(O,{slot:"input",modelValue:e.value.name,"onUpdate:modelValue":m[2]||(m[2]=r=>e.value.name=r),options:N.value},null,8,["modelValue","options"]),a("div",ue,[a("craft-callout",de,[k(u(t(l)("This can begin with an environment variable."))+" ",1),a("a",he,u(t(l)("Learn more")),1)])]),a("div",ce,[e.value.errors?.name?(n(),o("ul",me,[a("li",null,u(e.value.errors.name),1)])):h("",!0)])],8,re),L(a("craft-input-handle",{label:t(l)("Handle"),"help-text":t(l)("How you’ll refer to this site in the templates."),ref:"handle",id:"handle",name:"handle","has-feedback-for":e.value.errors?.handle?"error":"","onUpdate:modelValue":m[3]||(m[3]=r=>e.value.handle=r)},[a("div",ge,[e.value.errors?.handle?(n(),o("ul",fe,[a("li",null,u(e.value.errors.handle),1)])):h("",!0)])],8,pe),[[_,e.value.handle]]),a("craft-input",{label:t(l)("Language"),name:"language",id:"site-language","help-text":t(l)("The language content in this site will use."),disabled:s.readOnly,"has-feedback-for":e.value.errors?.language?"error":""},[v(O,{slot:"input",modelValue:e.value.language,"onUpdate:modelValue":m[4]||(m[4]=r=>e.value.language=r),options:x.value,"require-option-match":!0},null,8,["modelValue","options"]),a("div",ve,[a("craft-callout",{variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb",innerHTML:t(l)("This can be set to an environment variable with a valid language ID ({examples}).",{examples:"en/en-GB"})},null,8,ye)]),a("div",ke,[e.value.errors?.language?(n(),o("ul",Ue,[a("li",null,u(e.value.errors.language),1)])):h("",!0)])],8,be),p.value||!T.value.id?(n(),o("craft-input",{key:2,label:t(l)("Status"),name:"enabled",id:"enabled",disabled:s.readOnly,"has-feedback-for":e.value.errors?.enabled?"error":""},[v(O,{slot:"input",modelValue:C.value,"onUpdate:modelValue":m[5]||(m[5]=r=>C.value=r),options:D.value,"require-option-match":!0},{option:A(({active:r,selected:S,option:U})=>[a("craft-option",{active:r,checked:S,hint:U.data?.hint},[a("div",Oe,[a("craft-indicator",{variant:U.data?.boolean==="1"?"success":"empty"},null,8,Ne),U.label.startsWith("$")||U.label.startsWith("@")?(n(),o("code",Se,u(U.label),1)):(n(),o("span",je,u(U.label),1))])],8,Te)]),_:1},8,["modelValue","options"]),a("div",Ce,[T.value.primary?(n(),o("craft-callout",Ee,u(t(l)("The primary site cannot be disabled.")),1)):h("",!0),a("craft-callout",{variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb",innerHTML:t(l)("This can be set to an environment variable with a boolean value ({examples})",{examples:"yes/no/true/false/on/off/0/1"})},null,8,Le)]),a("div",_e,[e.value.errors?.enabled?(n(),o("ul",we,[a("li",null,u(e.value.errors.enabled),1)])):h("",!0)])],8,Ae)):h("",!0),(p.value||!T.value.id)&&!T.value.primary?(n(),o(y,{key:3},[T.value.primary?h("",!0):(n(),o("craft-switch",{key:0,label:t(l)("Make this the primary site"),"help-text":t(l)("The primary site will be loaded by default on the front end."),disabled:s.readOnly,checked:e.value.primary,onCheckedChanged:m[6]||(m[6]=r=>e.value.primary=r.target?.checked)},null,40,ze))],64)):h("",!0),a("craft-switch",{label:t(l)("This site has its own base URL"),id:"has-urls",name:"hasUrls",disabled:s.readOnly,checked:e.value.hasUrls,onCheckedChanged:m[7]||(m[7]=r=>e.value.hasUrls=r.target?.checked)},null,40,Ie),e.value.hasUrls?(n(),o("craft-input",{key:4,label:t(l)("Base URL"),"help-text":t(l)("The base URL for the site."),id:"base-url",name:"baseUrl",error:e.value.errors?.baseUrl,disabled:s.readOnly},[v(O,{slot:"input",modelValue:e.value.baseUrl,"onUpdate:modelValue":m[8]||(m[8]=r=>e.value.baseUrl=r),options:J.value},null,8,["modelValue","options"]),a("div",De,[a("craft-callout",Je,[k(u(t(l)("This can begin with an environment variable or alias."))+" ",1),a("a",Re,u(t(l)("Learn more")),1)])])],8,xe)):h("",!0)],64))}}),Ze={key:0,size:"small",inline:""},Ge={key:0,class:"flex gap-1 items-center text-sm"},Ve={key:1,class:"tw:flex tw:gap-1 tw:items-center tw:text-sm"},$e={key:0},Be=["loading"],He={slot:"content"},Me={class:"bg-white border border-border-subtle rounded-sm shadow-sm"},Fe={class:"grid gap-3 p-5"},Qe=z({__name:"SettingsSitesEdit",props:{title:{},crumbs:{},readOnly:{type:Boolean},site:{},groupId:{},flash:{},errors:{},isMultisite:{type:Boolean}},setup(s){const c=s,d=Z({siteId:c.site.id??null,group:c.groupId,name:c.site.nameRaw,handle:c.site.handle,language:c.site.languageRaw,enabled:c.site.enabledRaw,hasUrls:c.site.hasUrls,primary:c.site.primary,baseUrl:c.site.baseUrlRaw??""});G("keydown",p=>{(p.metaKey||p.ctrlKey)&&p.key==="s"&&(p.preventDefault(),i())});function i(){d.clearErrors().submit(K())}const e=$(!1);return(p,f)=>(n(),o(y,null,[a("form",{onSubmit:H(i,["prevent"])},[v(M,{title:s.title,debug:p.$props},{"title-badge":A(()=>[v(B,{variant:s.site.enabled?"success":"default"},{default:A(()=>[k(u(s.site.enabled?t(l)("Enabled"):t(l)("Disabled")),1)]),_:1},8,["variant"]),s.site.primary?(n(),o("craft-callout",Ze,[a("span",null,u(t(l)("Primary")),1)])):h("",!0)]),actions:A(()=>[v(V,null,{default:A(()=>[t(d).recentlySuccessful&&s.flash?.success?(n(),o("div",Ge,[f[2]||(f[2]=a("craft-icon",{name:"circle-check",style:{color:"var(--c-color-success-bg-emphasis)"}},null,-1)),k(" "+u(s.flash.success),1)])):h("",!0),t(d).hasErrors?(n(),o("div",Ve,[f[3]||(f[3]=a("craft-icon",{name:"triangle-exclamation",style:{color:"var(--c-color-danger-bg-emphasis)"}},null,-1)),k(" "+u(t(l)("Could not save settings")),1)])):h("",!0)]),_:1}),s.readOnly?h("",!0):(n(),o("craft-button-group",$e,[a("craft-button",{type:"submit",variant:"primary",loading:t(d).processing},u(t(l)("Save")),9,Be),a("craft-action-menu",null,[f[6]||(f[6]=a("craft-button",{slot:"invoker",variant:"primary",type:"button",icon:""},[a("craft-icon",{name:"chevron-down"})],-1)),a("div",He,[a("craft-action-item",{onClick:i},[k(u(t(l)("Save and continue editing"))+" ",1),f[4]||(f[4]=a("craft-shortcut",{slot:"suffix",class:"ml-2"},"S",-1))]),s.site.id&&!s.site.primary?(n(),o(y,{key:0},[f[5]||(f[5]=a("hr",null,null,-1)),a("craft-action-item",{onClick:f[0]||(f[0]=N=>e.value=!0),variant:"danger"},u(t(l)("Delete site")),1)],64)):h("",!0)])])]))]),default:A(()=>[a("div",Me,[s.readOnly?(n(),w(F,{key:0})):h("",!0),a("div",Fe,[v(Ye,{"inertia-form":t(d),"read-only":s.readOnly},null,8,["inertia-form","read-only"])])])]),_:1},8,["title","debug"])],32),s.site.primary?h("",!0):(n(),w(P,{key:0,onClose:f[1]||(f[1]=N=>e.value=!1),open:e.value,site:c.site},null,8,["open","site"]))],64))}});export{Qe as default}; +import{d as w,Y as _,A as R,s as b,c as o,o as n,F as y,m as h,Z as C,a,t as u,u as t,i as l,p as j,$ as E,b as k,U as v,w as A,a0 as Y,M as Z,a1 as G,l as z,a2 as V,B as $,a3 as B,N as M}from"./cp3.js";import{A as F}from"./AppLayout.js";import{_ as H}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";import{I as O,s as K,_ as P}from"./DeleteSiteModal.vue_vue_type_script_setup_true_lang.js";const W={Á:"A",á:"a",Ä:"A",ä:"a",À:"A",à:"a",Â:"A",â:"a",É:"E",é:"e",Ë:"E",ë:"e",È:"E",è:"e",Ê:"E",ê:"e",Í:"I",í:"i",Ï:"I",ï:"i",Ì:"I",ì:"i",Î:"I",î:"i",Ó:"O",ó:"o",Ö:"O",ö:"o",Ò:"O",ò:"o",Ô:"O",ô:"o",Ú:"U",ú:"u",Ü:"U",ü:"u",Ù:"U",ù:"u",Û:"U",û:"u",Ý:"Y",ý:"y",Ÿ:"Y",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Ѓ:"Gj",Е:"E",Ж:"Z",З:"Z",Ѕ:"Dz",И:"I",Ј:"j",К:"K",Л:"L",Љ:"Lj",М:"M",Н:"N",Њ:"Nj",О:"O",П:"P",Р:"R",С:"S",Т:"T",Ќ:"Kj",У:"U",Ф:"F",Х:"X",Ц:"C",Ч:"C",Џ:"Dz",Ш:"S",а:"a",б:"b",в:"v",г:"g",д:"d",ѓ:"gj",е:"e",ж:"z",з:"z",ѕ:"dz",и:"i",ј:"j",к:"k",л:"l",љ:"lj",м:"m",н:"n",њ:"nj",о:"o",п:"p",р:"r",с:"s",т:"t",ќ:"kj",у:"u",ф:"f",х:"x",ц:"c",ч:"c",џ:"dz",ш:"s",æ:"ae",ǽ:"ae",Ã:"A",Å:"A",Ǻ:"A",Ă:"A",Ǎ:"A",Æ:"AE",Ǽ:"AE",ã:"a",å:"a",ǻ:"a",ă:"a",ǎ:"a",ª:"a",Ĉ:"C",Ċ:"C",Ç:"C",ç:"c",ĉ:"c",ċ:"c",Ð:"D",Đ:"D",ð:"d",đ:"d",Ĕ:"E",Ė:"E",ĕ:"e",ė:"e",ƒ:"f",Ĝ:"G",Ġ:"G",ĝ:"g",ġ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ĭ:"I",Ǐ:"I",Į:"I",IJ:"IJ",ĩ:"i",ĭ:"i",ǐ:"i",į:"i",ij:"ij",Ĵ:"J",ĵ:"j",Ĺ:"L",Ľ:"L",Ŀ:"L",ĺ:"l",ľ:"l",ŀ:"l",Ñ:"N",ñ:"n",ʼn:"n",Õ:"O",Ō:"O",Ŏ:"O",Ǒ:"O",Ő:"O",Ơ:"O",Ø:"O",Ǿ:"O",Œ:"OE",õ:"o",ō:"o",ŏ:"o",ǒ:"o",ő:"o",ơ:"o",ø:"o",ǿ:"o",º:"o",œ:"oe",Ŕ:"R",Ŗ:"R",ŕ:"r",ŗ:"r",Ŝ:"S",Ș:"S",ŝ:"s",ș:"s",ſ:"s",Ţ:"T",Ț:"T",Ŧ:"T",Þ:"TH",ţ:"t",ț:"t",ŧ:"t",þ:"th",Ũ:"U",Ŭ:"U",Ű:"U",Ų:"U",Ư:"U",Ǔ:"U",Ǖ:"U",Ǘ:"U",Ǚ:"U",Ǜ:"U",ũ:"u",ŭ:"u",ű:"u",ų:"u",ư:"u",ǔ:"u",ǖ:"u",ǘ:"u",ǚ:"u",ǜ:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ÿ:"y",ŷ:"y",ΑΥ:"AU",ΑΎ:"AU",Αυ:"Au",Αύ:"Au",ΕΊ:"I",ΕΙ:"I",Ει:"Ei",ΕΥ:"EF",ΕΎ:"EU",Εί:"I",Ευ:"Ef",Εύ:"Eu",ΟΙ:"I",ΟΊ:"I",ΟΥ:"U",ΟΎ:"OU",Οι:"Oi",Οί:"I",Ου:"Oy",Ού:"Ou",ΥΙ:"I",ΎΙ:"I",Υι:"Yi",Ύι:"I",ΥΊ:"I",Υί:"I",αυ:"au",αύ:"au",εί:"i",ει:"ei",ευ:"ef",εύ:"eu",οι:"oi",οί:"i",ου:"oy",ού:"ou",υι:"yi",ύι:"i",υί:"i",Α:"A",Ά:"A",Β:"B",Δ:"D",Ε:"E",Έ:"E",Φ:"F",Γ:"G",Η:"H",Ή:"I",Ι:"I",Ί:"I",Ϊ:"I",Κ:"K",Ξ:"Ks",Λ:"L",Μ:"M",Ν:"N",Π:"P",Ο:"O",Ό:"O",Ψ:"Ps",Ρ:"R",Σ:"S",Τ:"T",Θ:"Th",Ω:"O",Ώ:"W",Χ:"X",ϒ:"Y",Υ:"Y",Ύ:"Y",Ϋ:"Y",Ζ:"Z",α:"a",ά:"a",β:"v",δ:"d",ε:"e",έ:"e",φ:"f",γ:"gh",η:"i",ή:"i",ι:"i",ί:"i",ϊ:"i",ΐ:"i",κ:"k",ξ:"ks",λ:"l",μ:"m",ν:"n",ο:"o",ό:"o",π:"p",ψ:"ps",ρ:"r",σ:"s",ς:"s",τ:"t",ϑ:"th",θ:"th",ϐ:"v",ω:"o",ώ:"w",χ:"kh",υ:"i",ύ:"y",ΰ:"y",ϋ:"y",ζ:"z",अ:"a",आ:"aa",ए:"e",ई:"ii",ऍ:"ei",ऎ:"ae",ऐ:"ai",इ:"i",ओ:"o",ऑ:"oi",ऒ:"oii",ऊ:"uu",औ:"ou",उ:"u",ब:"B",भ:"Bha",च:"Ca",छ:"Chha",ड:"Da",ढ:"Dha",फ:"Fa",फ़:"Fi",ग:"Ga",घ:"Gha",ग़:"Ghi",ह:"Ha",ज:"Ja",झ:"Jha",क:"Ka",ख:"Kha",ख़:"Khi",ल:"L",ळ:"Li",ऌ:"Li",ऴ:"Lii",ॡ:"Lii",म:"Ma",न:"Na",ङ:"Na",ञ:"Nia",ण:"Nae",ऩ:"Ni",ॐ:"oms",प:"Pa",क़:"Qi",र:"Ra",ऋ:"Ri",ॠ:"Ri",ऱ:"Ri",स:"Sa",श:"Sha",ष:"Shha",ट:"Ta",त:"Ta",ठ:"Tha",द:"Tha",थ:"Tha",ध:"Thha",ड़:"ugDha",ढ़:"ugDhha",व:"Va",य:"Ya",य़:"Yi",ज़:"Za",Ա:"A",Բ:"B",Գ:"G",Դ:"D",Ե:"E",Զ:"Z",Է:"E",Ը:"Y",Թ:"Th",Ժ:"Zh",Ի:"I",Լ:"L",Խ:"Kh",Ծ:"Ts",Կ:"K",Հ:"H",Ձ:"Dz",Ղ:"Gh",Ճ:"Tch",Մ:"M",Յ:"Y",Ն:"N",Շ:"Sh",Ո:"Vo",Չ:"Ch",Պ:"P",Ջ:"J",Ռ:"R",Ս:"S",Վ:"V",Տ:"T",Ր:"R",Ց:"C",Ւ:"u",Փ:"Ph",Ք:"Q",և:"ev",Օ:"O",Ֆ:"F",ա:"a",բ:"b",գ:"g",դ:"d",ե:"e",զ:"z",է:"e",ը:"y",թ:"th",ժ:"zh",ի:"i",լ:"l",խ:"kh",ծ:"ts",կ:"k",հ:"h",ձ:"dz",ղ:"gh",ճ:"tch",մ:"m",յ:"y",ն:"n",շ:"sh",ո:"vo",չ:"ch",պ:"p",ջ:"j",ռ:"r",ս:"s",վ:"v",տ:"t",ր:"r",ց:"c",ւ:"u",փ:"ph",ք:"q",օ:"o",ֆ:"f",Ž:"Z",Ň:"N",Ş:"S",ž:"z",ň:"n",ş:"s",ı:"i",İ:"I",ğ:"g",Ğ:"G",ьо:"yo",Й:"i",Щ:"Shh",Ъ:"Ie",Ь:"",Ю:"Iu",Я:"Ia",й:"i",щ:"shh",ъ:"ie",ь:"",ю:"iu",я:"ia",Ē:"E",ē:"e","န်ုပ်":"nub","ောင်":"aung","ိုက်":"aik","ိုဒ်":"ok","ိုင်":"aing","ိုလ်":"ol","ေါင်":"aung","သြော":"aw","ောက်":"auk","ိတ်":"eik","ုတ်":"ok","ုန်":"on","ေတ်":"it","ုဒ်":"ait","ာန်":"an","ိန်":"ein","ွတ်":"ut","ေါ်":"aw","ွန်":"un","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","ိမ်":"ein","ုမ်":"on","ော်":"aw","ွမ်":"un","က်":"et","ေါ":"aw","ော":"aw","ျွ":"ywa","ြွ":"yw","ို":"o","ုံ":"on","တ်":"at","င်":"in","ည်":"i","ဒ်":"d","န်":"an","ပ်":"at","မ်":"an","စျ":"za","ယ်":"e","ဉ်":"in","စ်":"it","ိံ":"ein","ဲ":"e","း":"","ာ":"a","ါ":"a","ေ":"e","ံ":"an","ိ":"i","ီ":"i","ု":"u","ူ":"u","်":"at","္":"","့":"",က:"k","၉":"9",တ:"t",ရ:"ya",ယ:"y",မ:"m",ဘ:"ba",ဗ:"b",ဖ:"pa",ပ:"p",န:"n",ဓ:"da",ဒ:"d",ထ:"ta",ဏ:"na",ဝ:"w",ဎ:"da",ဍ:"d",ဌ:"ta",ဋ:"t",ည:"ny",ဇ:"z",ဆ:"sa",စ:"s",င:"ng",ဃ:"ga",ဂ:"g",လ:"l",သ:"th","၈":"8",ဩ:"aw",ခ:"kh","၆":"6","၅":"5","၄":"4","၃":"3","၂":"2","၁":"1","၀":"0","၌":"hnaik","၍":"ywae",ဪ:"aw",ဦ:"-u",ဟ:"h",ဉ:"u",ဤ:"-i",ဣ:"i","၏":"-e",ဧ:"e","ှ":"h","ွ":"w","ျ":"ya","ြ":"y",အ:"a",ဠ:"la","၇":"7",DŽ:"DZ",Dž:"Dz",dž:"dz",DZ:"DZ",Dz:"Dz",dz:"dz",LJ:"LJ",Lj:"Lj",lj:"lj",NJ:"NJ",Nj:"Nj",nj:"nj",č:"c",Č:"C",ć:"c",Ć:"C",š:"s",Š:"S",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"f",ქ:"q",ღ:"gh",ყ:"y",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",Ё:"E",ё:"e",Ы:"Y",ы:"y",Э:"E",э:"e",І:"I",і:"i",Ѳ:"F",ѳ:"f",Ѣ:"E",ѣ:"e",Ѵ:"I",ѵ:"i",Є:"Je",є:"je",Ѥ:"Je",ѥ:"je","Ꙋ":"U","ꙋ":"u",Ѡ:"O",ѡ:"o",Ѿ:"Ot",ѿ:"ot",Ѫ:"U",ѫ:"u",Ѧ:"Ja",ѧ:"ja",Ѭ:"Ju",ѭ:"ju",Ѩ:"Ja",ѩ:"Ja",Ѯ:"Ks",ѯ:"ks",Ѱ:"Ps",ѱ:"ps",Ґ:"G",ґ:"g",Ї:"Yi",ї:"yi",Ә:"A",Ғ:"G",Қ:"Q",Ң:"N",Ө:"O",Ұ:"U",Ү:"U",Һ:"H",ә:"a",ғ:"g",қ:"q",ң:"n",ө:"o",ұ:"u",ү:"u",һ:"h",ď:"d",Ď:"D",ě:"e",Ě:"E",ř:"r",Ř:"R",ť:"t",Ť:"T",ů:"u",Ů:"U",ą:"a",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",ā:"a",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ả:"A",Ạ:"A",Ắ:"A",Ằ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Ấ:"A",Ầ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",ả:"a",ạ:"a",ắ:"a",ằ:"a",ẳ:"a",ẵ:"a",ặ:"a",ấ:"a",ầ:"a",ẩ:"a",ẫ:"a",ậ:"a",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ế:"E",Ề:"E",Ể:"E",Ễ:"E",Ệ:"E",ẻ:"e",ẽ:"e",ẹ:"e",ế:"e",ề:"e",ể:"e",ễ:"e",ệ:"e",Ỉ:"I",Ị:"I",ỉ:"i",ị:"i",Ỏ:"O",Ọ:"O",Ố:"O",Ồ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ớ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ợ:"O",ỏ:"o",ọ:"o",ố:"o",ồ:"o",ổ:"o",ỗ:"o",ộ:"o",ớ:"o",ờ:"o",ở:"o",ỡ:"o",ợ:"o",Ủ:"U",Ụ:"U",Ứ:"U",Ừ:"U",Ử:"U",Ữ:"U",Ự:"U",ủ:"u",ụ:"u",ứ:"u",ừ:"u",ử:"u",ữ:"u",ự:"u",Ỳ:"Y",Ỷ:"Y",Ỹ:"Y",Ỵ:"Y",ỳ:"y",ỷ:"y",ỹ:"y",ỵ:"y",ا:"a",ب:"b",پ:"p",ت:"t",ث:"th",ج:"g",چ:"ch",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"d",ط:"t",ظ:"th",ع:"aa",غ:"gh",ف:"f",ق:"k",ک:"k",گ:"g",ل:"l",ژ:"zh",ك:"k",م:"m",ن:"n",ه:"h",و:"o",ی:"y",آ:"a","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9",أ:"a",ي:"y",إ:"a",ؤ:"o",ئ:"y",ء:"aa",ђ:"dj",ћ:"c",Ђ:"Dj",Ћ:"C",ə:"e",Ə:"E",ß:"ss","ẞ":"SS",ভ্ল:"vl",পশ:"psh",ব্ধ:"bdh",ব্জ:"bj",ব্দ:"bd",ব্ব:"bb",ব্ল:"bl",ভ:"v",ব:"b",চ্ঞ:"cNG",চ্ছ:"cch",চ্চ:"cc",ছ:"ch",চ:"c",ধ্ন:"dhn",ধ্ম:"dhm",দ্ঘ:"dgh",দ্ধ:"ddh",দ্ভ:"dv",দ্ম:"dm",ড্ড:"DD",ঢ:"Dh",ধ:"dh",দ্গ:"dg",দ্দ:"dd",ড:"D",দ:"d","।":".",ঘ্ন:"Ghn",গ্ধ:"Gdh",গ্ণ:"GN",গ্ন:"Gn",গ্ম:"Gm",গ্ল:"Gl",জ্ঞ:"jNG",ঘ:"Gh",গ:"g",হ্ণ:"hN",হ্ন:"hn",হ্ম:"hm",হ্ল:"hl",হ:"h",জ্ঝ:"jjh",ঝ:"jh",জ্জ:"jj",জ:"j",ক্ষ্ণ:"kxN",ক্ষ্ম:"kxm",ক্ষ:"ksh",কশ:"ksh",ক্ক:"kk",ক্ট:"kT",ক্ত:"kt",ক্ল:"kl",ক্স:"ks",খ:"kh",ক:"k",ল্ভ:"lv",ল্ধ:"ldh",লখ:"lkh",লঘ:"lgh",লফ:"lph",ল্ক:"lk",ল্গ:"lg",ল্ট:"lT",ল্ড:"lD",ল্প:"lp",ল্ম:"lm",ল্ল:"ll",ল্ব:"lb",ল:"l",ম্থ:"mth",ম্ফ:"mf",ম্ভ:"mv",মপ্ল:"mpl",ম্ন:"mn",ম্প:"mp",ম্ম:"mm",ম্ল:"ml",ম্ব:"mb",ম:"m","০":"0","১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9",ঙ্ক্ষ:"Ngkx",ঞ্ছ:"nch",ঙ্ঘ:"ngh",ঙ্খ:"nkh",ঞ্ঝ:"njh",ঙ্গৌ:"ngOU",ঙ্গৈ:"ngOI",ঞ্চ:"nc",ঙ্ক:"nk",ঙ্ষ:"Ngx",ঙ্গ:"ngo",ঙ্ম:"Ngm",ঞ্জ:"nj",ন্ধ:"ndh",ন্ঠ:"nTh",ণ্ঠ:"NTh",ন্থ:"nth",ঙ্গা:"nga",ঙ্গি:"ngi",ঙ্গী:"ngI",ঙ্গু:"ngu",ঙ্গূ:"ngU",ঙ্গে:"nge",ঙ্গো:"ngO",ণ্ঢ:"NDh",নশ:"nsh",ঙর:"Ngr",ঞর:"NGr","ংর":"ngr",ঙ:"Ng",ঞ:"NG","ং":"ng",ন্ন:"nn",ণ্ণ:"NN",ণ্ন:"Nn",ন্ম:"nm",ণ্ম:"Nm",ন্দ:"nd",ন্ট:"nT",ণ্ট:"NT",ন্ড:"nD",ণ্ড:"ND",ন্ত:"nt",ন্স:"ns",ন:"n",ণ:"N","ৈ":"OI","ৌ":"OU","ো":"O",ঐ:"OI",ঔ:"OU",অ:"o",ও:"oo",ফ্ল:"fl",প্ট:"pT",প্ত:"pt",প্ন:"pn",প্প:"pp",প্ল:"pl",প্স:"ps",ফ:"f",প:"p","ৃ":"rri",ঋ:"rri",রর‍্য:"rry","্র্য":"ry","্রর":"rr",ড়্গ:"Rg",ঢ়:"Rh",ড়:"R",র:"r","্র":"r",শ্ছ:"Sch",ষ্ঠ:"ShTh",ষ্ফ:"Shf",স্ক্ল:"skl",স্খ:"skh",স্থ:"sth",স্ফ:"sf",শ্চ:"Sc",শ্ত:"St",শ্ন:"Sn",শ্ম:"Sm",শ্ল:"Sl",ষ্ক:"Shk",ষ্ট:"ShT",ষ্ণ:"ShN",ষ্প:"Shp",ষ্ম:"Shm",স্প্ল:"spl",স্ক:"sk",স্ট:"sT",স্ত:"st",স্ন:"sn",স্প:"sp",স্ম:"sm",স্ল:"sl",শ:"S",ষ:"Sh",স:"s","ু":"u",উ:"u",অ্য:"oZ",ত্থ:"tth","ৎ":"tt",ট্ট:"TT",ট্ম:"Tm",ঠ:"Th",ত্ন:"tn",ত্ম:"tm",থ:"th",ত্ত:"tt",ট:"T",ত:"t",অ্যা:"AZ","া":"a",আ:"a",য়া:"ya",য়:"y","ি":"i",ই:"i","ী":"ee",ঈ:"ee","ূ":"uu",ঊ:"uu","ে":"e",এ:"e",য:"z","্য":"Z",ইয়:"y",ওয়:"w","্ব":"w",এক্স:"x","ঃ":":","ঁ":"nn","্‌":"","˚":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","௦":"0","௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௰":"10","௱":"100","௲":"1000","Ꜳ":"AA","ꜳ":"aa","Ꜵ":"AO","ꜵ":"ao","Ꜷ":"AU","ꜷ":"au","Ꜹ":"AV","ꜹ":"av","Ꜻ":"av","ꜻ":"av","Ꜽ":"AY","ꜽ":"ay","ȸ":"db",ʣ:"dz",ʥ:"dz",ʤ:"dezh","🙰":"et",ff:"ff",ffi:"ffi",ffl:"ffl",fi:"fi",fl:"fl",ʩ:"feng",ʪ:"ls",ʫ:"lz",ɮ:"lezh","ȹ":"qp",ʨ:"tc",ʦ:"ts",ʧ:"tesh","Ꝏ":"OO","ꝏ":"oo",st:"st",ſt:"st","Ꜩ":"TZ","ꜩ":"tz","ᵫ":"ue",Aι:"Ai",αι:"ai",ἀ:"a",ἁ:"a",ἂ:"a",ἃ:"a",ἄ:"a",ἅ:"a",ἆ:"a",ἇ:"a",Ἀ:"A",Ἁ:"A",Ἂ:"A",Ἃ:"A",Ἄ:"A",Ἅ:"A",Ἆ:"A",Ἇ:"A",ᾰ:"a",ᾱ:"a",ᾲ:"a",ᾳ:"a",ᾴ:"a",ᾶ:"a",ᾷ:"a",Ᾰ:"A",Ᾱ:"A",Ὰ:"A",Ά:"A",ᾼ:"A",A̧:"A",a̧:"a","Ⱥ":"A","ⱥ":"a",Ȧ:"A",ȧ:"a",Ɓ:"B",C̈:"C",c̈:"c",C̨:"C",c̨:"c","Ȼ":"C","ȼ":"c",C̀:"C",c̀:"c",C̣:"C",c̣:"c",C̄:"C",c̄:"c",C̃:"C",c̃:"c",Ȩ:"E",ȩ:"e","Ɇ":"E","ɇ":"e",I̧:"I",i̧:"i",Ɨ:"I",ɨ:"i",i:"i",J́́:"J",j́:"j",J̀̀:"J",j̀:"j",J̈:"J",j̈:"j",J̧:"J",j̧:"j",J̨:"J",j̨:"j","Ɉ":"J","ɉ":"j",J̌:"J",ǰ:"j",J̇:"J",j:"j",J̣:"J",j̣:"j",J̄:"J",j̄:"j",J̃:"J",j̃:"j",ĸ:"k",L̀:"L",l̀:"l",L̂:"L",l̂:"l",L̈:"L",l̈:"l",L̨:"L",l̨:"l","Ƚ":"L",ƚ:"l",L̇:"L",l̇:"l",Ḷ:"L",ḷ:"l",L̄:"L",l̄:"l",L̃:"L",l̃:"l",Ŋ:"N",ŋ:"n",Ǹ:"N",ǹ:"n",N̂:"N",n̂:"n",N̈:"N",n̈:"n",N̨:"N",n̨:"n","Ꞥ":"N","ꞥ":"n",Ṅ:"N",ṅ:"n",Ṇ:"N",ṇ:"n",N̄:"N",n̄:"n",O̧:"O",o̧:"o",Ǫ:"O",ǫ:"o",Ɵ:"O",ɵ:"o",Ȯ:"O",ȯ:"o",S̀:"S",s̀:"s",Ŝ̀:"S",S̈:"S",s̈:"s",S̨:"S",s̨:"s","Ꞩ":"S","ꞩ":"s",Ṡ:"S",ṡ:"s",Ṣ:"S",ṣ:"s",S̄:"S",s̄:"s",S̃:"S",s̃:"s",T́:"T",t́:"t",T̀:"T",t̀:"t",T̂:"T",t̂:"t",T̈:"T",ẗ:"t",T̨:"T",t̨:"t","Ⱦ":"T","ⱦ":"t",Ṫ:"T",ṫ:"t",Ṭ:"T",ṭ:"t",T̄:"T",t̄:"t",T̃:"T",t̃:"t",U̧:"U",u̧:"u","Ʉ":"U",ʉ:"u",U̇:"U",u̇:"u",Ʊ:"U",ʊ:"u",Ẁ:"W",ẁ:"w",Ẃ:"W",ẃ:"w",Ẅ:"W",ẅ:"w","Ꙗ":"Ja","ꙗ":"ja",Y̧:"Y",y̧:"y",Y̨:"Y",y̨:"y","Ɏ":"Y","ɏ":"y",Y̌:"Y",y̌:"y",Ẏ:"Y",ẏ:"y",Ȳ:"Y",ȳ:"y",Z̀:"Z",z̀:"z",Ẑ:"Z",ẑ:"z",Z̈:"Z",z̈:"z",Z̧:"Z",z̧:"z",Z̨:"Z",z̨:"z",Ƶ:"Z",ƶ:"z",Ẓ:"Z",ẓ:"z",Z̄:"Z",z̄:"z",Z̃:"Z",z̃:"z"," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" "," ":" ","\u2028":" ","\u2029":" ","​":" "," ":" "," ":" "," ":" ",ᅠ:" ","«":"<<","»":">>","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"‹":"'","›":"'","–":"-","—":"-","…":"...","€":"EUR",$:"$","₢":"Cr","₣":"Fr.","£":"PS","₤":"L.",ℳ:"M","₥":"mil","₦":"N","₧":"Pts","₨":"Rs",රු:"LKR",ரூ:"LKR","௹":"Rs",रू:"NPR","₹":"Rs","૱":"Rs","₩":"W","₪":"NS","₸":"KZT","₫":"D","֏":"AMD","₭":"K","₺":"TL","₼":"AZN","₮":"T","₯":"Dr","₲":"PYG","₾":"GEL","₳":"ARA","₴":"UAH","₽":"RUB","₵":"GHS","₡":"CL","¢":"c","¥":"YEN",円:"JPY","৳":"BDT",元:"CNY","﷼":"SAR","៛":"KR","₠":"ECU","¤":"$?","฿":"THB","؋":"AFN"};function q(s,c=W){s=s.normalize("NFC");let d="",i;for(let e=0;e/g,"");i=i.replace(/['"‘’“”ʻ\[\]\(\)\{\}:]/g,""),i=i.toLowerCase(),i=q(i),d.allowNonAlphaStart||(i=i.replace(/^[^a-z]+/,""));let e=i.split(/[^a-z0-9]+/).filter(Boolean);if(i="",d.handleCasing==="snake")return e.join("_");for(let p=0;pc.inertiaForm),p=b(()=>d.props.isMultisite),f=b(()=>d.props.groupOptions),N=b(()=>d.props.nameSuggestions),x=b(()=>d.props.languageOptions),D=b(()=>d.props.booleanEnvOptions.map(g=>g.type==="optgroup"?{...g,options:g.options.map(i)}:i(g))),J=b(()=>d.props.baseUrlSuggestions),T=b(()=>d.props.site);_("handle"),_("baseUrl");const L=b({get(){return e.value.enabled?"1":"0"},set(g){e.value.enabled=g}});return R(()=>e.value?.name,g=>{e.value?.handle===""&&(e.value.handle=I(g)),e.value?.baseUrl===""&&(e.value.baseUrl=Q(g,{prefix:"$",suffix:"_URL"}))}),(g,m)=>(n(),o(y,null,[e.value?.hasErrors?(n(),o("craft-callout",X,[a("div",ee,u(t(l)("Could not save settings")),1),a("ul",null,[(n(!0),o(y,null,j(e.value.errors,(r,S)=>(n(),o("li",{key:S},u(r),1))),128))])])):h("",!0),e.value.id?C((n(),o("input",{key:1,name:"id","onUpdate:modelValue":m[0]||(m[0]=r=>e.value.id=r),type:"hidden"},null,512)),[[E,e.value.id]]):h("",!0),a("craft-select",{label:t(l)("Group"),"help-text":t(l)("Which group should this site belong to?"),name:"group",id:"group",".modelValue":e.value.group,onModelValueChanged:m[1]||(m[1]=r=>e.value.group=r.target?.modelValue)},[a("select",te,[(n(!0),o(y,null,j(f.value,r=>(n(),o("option",{key:r.value,value:r.value},u(r.label),9,le))),128))]),e.value.errors?.group?(n(),o("ul",se,[(n(!0),o(y,null,j(e.value.errors?.group,r=>(n(),o("li",null,u(r),1))),256))])):h("",!0),e.value?.id&&p.value?(n(),o("div",ne,[a("craft-callout",ie,[a("span",oe,u(t(l)("Warning:")),1),k(" "+u(t(l)("Changing this may result in data loss.")),1)])])):h("",!0)],40,ae),a("craft-input",{label:t(l)("Name"),id:"name",name:"name",disabled:s.readOnly},[v(O,{slot:"input",modelValue:e.value.name,"onUpdate:modelValue":m[2]||(m[2]=r=>e.value.name=r),options:N.value},null,8,["modelValue","options"]),a("div",ue,[a("craft-callout",de,[k(u(t(l)("This can begin with an environment variable."))+" ",1),a("a",he,u(t(l)("Learn more")),1)])]),a("div",ce,[e.value.errors?.name?(n(),o("ul",me,[a("li",null,u(e.value.errors.name),1)])):h("",!0)])],8,re),C(a("craft-input-handle",{label:t(l)("Handle"),"help-text":t(l)("How you’ll refer to this site in the templates."),ref:"handle",id:"handle",name:"handle","has-feedback-for":e.value.errors?.handle?"error":"","onUpdate:modelValue":m[3]||(m[3]=r=>e.value.handle=r)},[a("div",ge,[e.value.errors?.handle?(n(),o("ul",fe,[a("li",null,u(e.value.errors.handle),1)])):h("",!0)])],8,pe),[[E,e.value.handle]]),a("craft-input",{label:t(l)("Language"),name:"language",id:"site-language","help-text":t(l)("The language content in this site will use."),disabled:s.readOnly,"has-feedback-for":e.value.errors?.language?"error":""},[v(O,{slot:"input",modelValue:e.value.language,"onUpdate:modelValue":m[4]||(m[4]=r=>e.value.language=r),options:x.value,"require-option-match":!0},null,8,["modelValue","options"]),a("div",ve,[a("craft-callout",{variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb",innerHTML:t(l)("This can be set to an environment variable with a valid language ID ({examples}).",{examples:"en/en-GB"})},null,8,ye)]),a("div",ke,[e.value.errors?.language?(n(),o("ul",Ue,[a("li",null,u(e.value.errors.language),1)])):h("",!0)])],8,be),p.value||!T.value.id?(n(),o("craft-input",{key:2,label:t(l)("Status"),name:"enabled",id:"enabled",disabled:s.readOnly,"has-feedback-for":e.value.errors?.enabled?"error":""},[v(O,{slot:"input",modelValue:L.value,"onUpdate:modelValue":m[5]||(m[5]=r=>L.value=r),options:D.value,"require-option-match":!0},{option:A(({active:r,selected:S,option:U})=>[a("craft-option",{active:r,checked:S,hint:U.data?.hint},[a("div",Oe,[a("craft-indicator",{variant:U.data?.boolean==="1"?"success":"empty"},null,8,Ne),U.label.startsWith("$")||U.label.startsWith("@")?(n(),o("code",Se,u(U.label),1)):(n(),o("span",je,u(U.label),1))])],8,Te)]),_:1},8,["modelValue","options"]),a("div",Le,[T.value.primary?(n(),o("craft-callout",_e,u(t(l)("The primary site cannot be disabled.")),1)):h("",!0),a("craft-callout",{variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb",innerHTML:t(l)("This can be set to an environment variable with a boolean value ({examples})",{examples:"yes/no/true/false/on/off/0/1"})},null,8,Ce)]),a("div",Ee,[e.value.errors?.enabled?(n(),o("ul",ze,[a("li",null,u(e.value.errors.enabled),1)])):h("",!0)])],8,Ae)):h("",!0),(p.value||!T.value.id)&&!T.value.primary?(n(),o(y,{key:3},[T.value.primary?h("",!0):(n(),o("craft-switch",{key:0,label:t(l)("Make this the primary site"),"help-text":t(l)("The primary site will be loaded by default on the front end."),disabled:s.readOnly,checked:e.value.primary,onCheckedChanged:m[6]||(m[6]=r=>e.value.primary=r.target?.checked)},null,40,we))],64)):h("",!0),a("craft-switch",{label:t(l)("This site has its own base URL"),id:"has-urls",name:"hasUrls",disabled:s.readOnly,checked:e.value.hasUrls,onCheckedChanged:m[7]||(m[7]=r=>e.value.hasUrls=r.target?.checked)},null,40,Ie),e.value.hasUrls?(n(),o("craft-input",{key:4,label:t(l)("Base URL"),"help-text":t(l)("The base URL for the site."),id:"base-url",name:"baseUrl",error:e.value.errors?.baseUrl,disabled:s.readOnly},[v(O,{slot:"input",modelValue:e.value.baseUrl,"onUpdate:modelValue":m[8]||(m[8]=r=>e.value.baseUrl=r),options:J.value},null,8,["modelValue","options"]),a("div",De,[a("craft-callout",Je,[k(u(t(l)("This can begin with an environment variable or alias."))+" ",1),a("a",Re,u(t(l)("Learn more")),1)])])],8,xe)):h("",!0)],64))}}),Ze={key:0,size:"small",inline:""},Ge={key:0,class:"flex gap-1 items-center text-sm"},Ve={key:1,class:"tw:flex tw:gap-1 tw:items-center tw:text-sm"},$e={key:0},Be=["loading"],Me={slot:"content"},Fe={class:"bg-white border border-border-subtle rounded-sm shadow-sm"},He={class:"grid gap-3 p-5"},Qe=w({__name:"SettingsSitesEdit",props:{title:{},crumbs:{},readOnly:{type:Boolean},site:{},groupId:{},flash:{},errors:{},isMultisite:{type:Boolean}},setup(s){const c=s,d=Z({siteId:c.site.id??null,group:c.groupId,name:c.site.nameRaw,handle:c.site.handle,language:c.site.languageRaw,enabled:c.site.enabledRaw,hasUrls:c.site.hasUrls,primary:c.site.primary,baseUrl:c.site.baseUrlRaw??""});G("keydown",p=>{(p.metaKey||p.ctrlKey)&&p.key==="s"&&(p.preventDefault(),i())});function i(){d.clearErrors().submit(K())}const e=$(!1);return(p,f)=>(n(),o(y,null,[a("form",{onSubmit:M(i,["prevent"])},[v(F,{title:s.title,debug:p.$props},{"title-badge":A(()=>[v(B,{variant:s.site.enabled?"success":"default"},{default:A(()=>[k(u(s.site.enabled?t(l)("Enabled"):t(l)("Disabled")),1)]),_:1},8,["variant"]),s.site.primary?(n(),o("craft-callout",Ze,[a("span",null,u(t(l)("Primary")),1)])):h("",!0)]),actions:A(()=>[v(V,null,{default:A(()=>[t(d).recentlySuccessful&&s.flash?.success?(n(),o("div",Ge,[f[2]||(f[2]=a("craft-icon",{name:"circle-check",style:{color:"var(--c-color-success-bg-emphasis)"}},null,-1)),k(" "+u(s.flash.success),1)])):h("",!0),t(d).hasErrors?(n(),o("div",Ve,[f[3]||(f[3]=a("craft-icon",{name:"triangle-exclamation",style:{color:"var(--c-color-danger-bg-emphasis)"}},null,-1)),k(" "+u(t(l)("Could not save settings")),1)])):h("",!0)]),_:1}),s.readOnly?h("",!0):(n(),o("craft-button-group",$e,[a("craft-button",{type:"submit",variant:"primary",loading:t(d).processing},u(t(l)("Save")),9,Be),a("craft-action-menu",null,[f[6]||(f[6]=a("craft-button",{slot:"invoker",variant:"primary",type:"button",icon:""},[a("craft-icon",{name:"chevron-down"})],-1)),a("div",Me,[a("craft-action-item",{onClick:i},[k(u(t(l)("Save and continue editing"))+" ",1),f[4]||(f[4]=a("craft-shortcut",{slot:"suffix",class:"ml-2"},"S",-1))]),s.site.id&&!s.site.primary?(n(),o(y,{key:0},[f[5]||(f[5]=a("hr",null,null,-1)),a("craft-action-item",{onClick:f[0]||(f[0]=N=>e.value=!0),variant:"danger"},u(t(l)("Delete site")),1)],64)):h("",!0)])])]))]),default:A(()=>[a("div",Fe,[s.readOnly?(n(),z(H,{key:0})):h("",!0),a("div",He,[v(Ye,{"inertia-form":t(d),"read-only":s.readOnly},null,8,["inertia-form","read-only"])])])]),_:1},8,["title","debug"])],32),s.site.primary?h("",!0):(n(),z(P,{key:0,onClose:f[1]||(f[1]=N=>e.value=!1),open:e.value,site:c.site},null,8,["open","site"]))],64))}});export{Qe as default}; diff --git a/resources/build/SettingsSitesIndex.js b/resources/build/SettingsSitesIndex.js index cf902f9ad9f..a9296f09ff1 100644 --- a/resources/build/SettingsSitesIndex.js +++ b/resources/build/SettingsSitesIndex.js @@ -1 +1 @@ -import{L as $,K as E,d as z,c as _,o as f,a as t,U as v,B as w,M as j,A as F,a7 as H,T,O as P,P as p,e as n,v as k,a3 as W,R as K,S as Z,s as B,w as m,l as C,m as V,W as J,u as a,t as u,b as x,F as D,p as Q,N as L,Z as X,$ as Y,a8 as ee,a9 as te,_ as ae}from"./cp3.js";import{_ as re}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";import{_ as ne,r as oe,e as se,c as R,I as le}from"./DeleteSiteModal.vue_vue_type_script_setup_true_lang.js";import{I as ie}from"./IndexLayout.js";import"./AppLayout.js";const b=e=>({url:b.url(e),method:"post"});b.definition={methods:["post"],url:"/admin/settings/site-groups"};b.url=e=>b.definition.url+$(e);b.post=e=>({url:b.url(e),method:"post"});const y=(e,s)=>({url:y.url(e,s),method:"delete"});y.definition={methods:["delete"],url:"/admin/settings/site-groups/{groupId}"};y.url=(e,s)=>{(typeof e=="string"||typeof e=="number")&&(e={groupId:e}),Array.isArray(e)&&(e={groupId:e[0]}),e=E(e);const g={groupId:e.groupId};return y.definition.url.replace("{groupId}",g.groupId.toString()).replace(/\/+$/,"")+$(s)};y.delete=(e,s)=>({url:y.url(e,s),method:"delete"});const ue=["disabled"],de=z({__name:"DeleteSiteButton",props:{site:{}},setup(e){const s=w(!1);return(g,i)=>(f(),_("div",null,[t("craft-button",{size:"small",icon:"",type:"button",variant:"danger",appearance:"plain",disabled:e.site.primary,onClick:i[0]||(i[0]=l=>s.value=!0)},[...i[2]||(i[2]=[t("craft-icon",{name:"x",label:"t('Delete site'"},null,-1)])],8,ue),v(ne,{site:e.site,open:s.value,onClose:i[1]||(i[1]=l=>s.value=!1)},null,8,["site","open"])]))}}),c=e=>({url:c.url(e),method:"get"});c.definition={methods:["get","head"],url:"/admin/settings/sites"};c.url=e=>c.definition.url+$(e);c.get=e=>({url:c.url(e),method:"get"});c.head=e=>({url:c.url(e),method:"head"});Object.assign(c,c);const ce={class:"flex gap-2 items-center"},pe={class:"title text-xl"},me={key:0},fe={type:"button",icon:"",size:"small",slot:"invoker"},ge=["label"],he={slot:"content"},ve=["disabled"],be={class:"-mx-2"},ye=["href","active"],xe={class:"mt-4 flex gap-2"},_e={class:"border-border-subtle rounded p-2 bg-white"},Se={key:2,class:"py-20"},ke={class:"w-[60ch] mx-auto text-center grid gap-3 justify-items-center text-gray-500"},we=["label","help-text"],Ie={slot:"after"},Ce={variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},Ve={href:"https://craftcms.com/docs/5.x/configure.html#control-panel-settings"},$e=["label","help-text","has-feedback-for"],Ne={slot:"after"},Ae={variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},Te={href:"https://craftcms.com/docs/5.x/configure.html#control-panel-settings"},Be={slot:"feedback"},De={key:0,class:"error-list"},Le=z({__name:"SettingsSitesIndex",props:{readOnly:{type:Boolean},group:{},groups:{},sites:{},nameSuggestions:{},flash:{}},setup(e){const s=e,g=w(!1),i=P(),l=j({id:s.group?.id??null,name:s.group?.name??""});function G(){l.clearErrors().submit(b(),{onSuccess:()=>{g.value=!1,l.reset()}})}function N(r){r==="create"?(l.name="",l.id=null):r==="update"&&(l.name=s.group?.rawName??s.group?.name??"",l.id=s.group?.id??null),g.value=!0}const S=w(s.sites.map(r=>r.id)),I=B(()=>S.value.map(r=>s.sites.find(o=>o.id===r)).filter(Boolean));F(S,(r,o)=>{H(()=>{T.post(oe(),{ids:[...r]},{preserveScroll:!0,preserveState:!0,onError:()=>{S.value=o}})})});function M(r,o){const d=[...S.value],[h]=d.splice(r,1);d.splice(o,0,h),S.value=d}const U=w([i.accessor("name",{header:()=>n("Name"),cell:({row:r,getValue:o})=>p(k,{href:se.url(r.original.id)},()=>p("div",{class:"flex gap-2"},[p("craft-indicator",{variant:r.original.enabled?"success":"empty"}),p("span",o())]))}),i.accessor("handle",{header:()=>n("Handle"),cell:r=>p("code",r.getValue())}),i.accessor("enabled",{header:()=>n("Status"),cell:r=>p(W,{variant:r.getValue()?"success":"default"},()=>r.getValue()?n("Enabled"):n("Disabled"))}),i.accessor("language",{header:()=>n("Language"),cell:r=>p("code",r.getValue())}),i.accessor("primary",{header:()=>n("Primary"),cell:r=>r.getValue()?p("craft-icon",{name:"check"}):""}),i.accessor("baseUrl",{header:()=>n("Base URL"),cell:r=>p("code",r.getValue())}),i.accessor("group.name",{header:()=>n("Group")}),i.display({id:"actions",cell:({row:r})=>p("div",{class:"flex justify-end"},[p(de,{site:r.original,disabled:r.original.primary,class:"whitespace-normal"})]),meta:{wrap:!0}})]),q=K({get data(){return I.value},get columns(){return U.value},getCoreRowModel:Z(),getRowId:r=>r.id.toString(),enableSorting:!1,defaultColumn:{size:"auto",minSize:50,maxSize:200}});function O(){s.group?.id&&confirm(n("Are you sure you want to delete this group?"))&&T.delete(y({groupId:s.group.id}))}const A=B(()=>s.group?.name?s.group.name:n("Sites"));return(r,o)=>(f(),_(D,null,[v(ie,{debug:{form:a(l),$props:r.$props},"full-width":!0,title:A.value},{title:m(()=>[t("div",ce,[t("h1",pe,u(A.value),1),e.group?.id?(f(),_("craft-action-menu",me,[t("craft-button",fe,[t("craft-icon",{name:"gear",label:a(n)("Site group Actions")},null,8,ge)]),t("div",he,[t("craft-action-item",{onClick:o[0]||(o[0]=L(d=>N("update"),["prevent"]))},u(a(n)("Rename Group")),1),t("craft-action-item",{variant:"danger",disabled:I.value.length>0,onClick:L(O,["prevent"])},u(a(n)("Delete Group")),9,ve)])])):V("",!0)])]),actions:m(()=>[v(k,{as:"craft-button",href:a(R)({query:{groupId:e.group?.id}}).url,variant:"primary",appearance:"button"},{default:m(()=>[o[5]||(o[5]=t("craft-icon",{name:"plus",slot:"prefix"},null,-1)),x(" "+u(a(n)("New Site")),1)]),_:1},8,["href"])]),"interior-nav":m(({state:d})=>[t("nav",null,[t("craft-nav-list",be,[t("craft-nav-item",{href:a(c).url(),active:!e.group},u(a(n)("All Sites")),9,ye),(f(!0),_(D,null,Q(e.groups,h=>(f(),C(k,{as:"craft-nav-item",key:h.id,href:a(c).url({query:{groupId:h.id}}),active:e.group&&h.id===e.group.id,block:""},{default:m(()=>[x(u(h.name),1)]),_:2},1032,["href","active"]))),128))])]),t("div",xe,[t("craft-button",{type:"button",onClick:o[1]||(o[1]=h=>N("create")),size:"small"},[o[6]||(o[6]=t("craft-icon",{name:"plus",slot:"prefix"},null,-1)),x(" "+u(a(n)("New Group")),1)])])]),default:m(()=>[t("div",null,[e.readOnly?(f(),C(re,{key:0})):V("",!0),I.value.length?(f(),C(J,{key:1,table:a(q),"read-only":e.readOnly,reorderable:!!e.group?.id,onReorder:M},{"drag-preview":m(({row:d})=>[t("div",_e,u(d.original.name),1)]),_:1},8,["table","read-only","reorderable"])):(f(),_("div",Se,[t("div",ke,[o[8]||(o[8]=t("craft-icon",{name:"light/earth-americas",style:{"font-size":"calc(48rem / 16)"}},null,-1)),t("p",null,u(a(n)("No sites exist for this group yet.")),1),v(k,{as:"craft-button",href:a(R)({query:{groupId:e.group?.id}}).url,appearance:"button"},{default:m(()=>[o[7]||(o[7]=t("craft-icon",{name:"plus",slot:"prefix"},null,-1)),x(" "+u(a(n)("New Site")),1)]),_:1},8,["href"])])]))])]),_:1},8,["debug","title"]),v(te,{"is-active":g.value,onClose:o[4]||(o[4]=d=>{g.value=!1,a(l).reset()}),onSubmit:G,loading:a(l).processing},{default:m(()=>[X(t("craft-input",{name:"id",id:"id","onUpdate:modelValue":o[2]||(o[2]=d=>a(l).id=d),type:"hidden"},null,512),[[Y,a(l).id]]),v(a(ee),{data:"nameSuggestions"},{fallback:m(()=>[t("craft-input",{readonly:"",name:"readonly-name",label:a(n)("Group Name"),"help-text":a(n)("What this group will be called in the control panel.")},[t("div",Ie,[t("craft-callout",Ce,[x(u(a(n)("This can begin with an environment variable."))+" ",1),t("a",Ve,u(a(n)("Learn more")),1)])])],8,we)]),default:m(()=>[t("craft-input",{label:a(n)("Group Name"),id:"name",name:"name",required:"","help-text":a(n)("What this group will be called in the control panel."),"has-feedback-for":a(l).errors?.name?"error":""},[v(le,{options:e.nameSuggestions,modelValue:a(l).name,"onUpdate:modelValue":o[3]||(o[3]=d=>a(l).name=d),slot:"input"},null,8,["options","modelValue"]),t("div",Ne,[t("craft-callout",Ae,[x(u(a(n)("This can begin with an environment variable."))+" ",1),t("a",Te,u(a(n)("Learn more")),1)])]),t("div",Be,[a(l).errors?.name?(f(),_("ul",De,[t("li",null,u(a(l).errors.name),1)])):V("",!0)])],8,$e)]),_:1})]),_:1},8,["is-active","loading"])],64))}}),qe=ae(Le,[["__scopeId","data-v-5e31d72b"]]);export{qe as default}; +import{L as $,K as E,d as z,c as _,o as f,a as t,U as v,B as w,M as j,A as F,a7 as H,T,O as P,P as p,i as n,v as k,a3 as W,R as K,S as Z,s as B,w as m,l as C,m as V,W as J,u as a,t as u,b as x,F as D,p as Q,N as L,Z as X,$ as Y,a8 as ee,a9 as te,_ as ae}from"./cp3.js";import{_ as re}from"./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js";import{_ as ne,r as oe,e as le,c as R,I as se}from"./DeleteSiteModal.vue_vue_type_script_setup_true_lang.js";import{I as ie}from"./IndexLayout.js";import"./AppLayout.js";const b=e=>({url:b.url(e),method:"post"});b.definition={methods:["post"],url:"/admin/settings/site-groups"};b.url=e=>b.definition.url+$(e);b.post=e=>({url:b.url(e),method:"post"});const y=(e,l)=>({url:y.url(e,l),method:"delete"});y.definition={methods:["delete"],url:"/admin/settings/site-groups/{groupId}"};y.url=(e,l)=>{(typeof e=="string"||typeof e=="number")&&(e={groupId:e}),Array.isArray(e)&&(e={groupId:e[0]}),e=E(e);const g={groupId:e.groupId};return y.definition.url.replace("{groupId}",g.groupId.toString()).replace(/\/+$/,"")+$(l)};y.delete=(e,l)=>({url:y.url(e,l),method:"delete"});const ue=["disabled"],de=z({__name:"DeleteSiteButton",props:{site:{}},setup(e){const l=w(!1);return(g,i)=>(f(),_("div",null,[t("craft-button",{size:"small",icon:"",type:"button",variant:"danger",appearance:"plain",disabled:e.site.primary,onClick:i[0]||(i[0]=s=>l.value=!0)},[...i[2]||(i[2]=[t("craft-icon",{name:"x",label:"t('Delete site'"},null,-1)])],8,ue),v(ne,{site:e.site,open:l.value,onClose:i[1]||(i[1]=s=>l.value=!1)},null,8,["site","open"])]))}}),c=e=>({url:c.url(e),method:"get"});c.definition={methods:["get","head"],url:"/admin/settings/sites"};c.url=e=>c.definition.url+$(e);c.get=e=>({url:c.url(e),method:"get"});c.head=e=>({url:c.url(e),method:"head"});Object.assign(c,c);const ce={class:"flex gap-2 items-center"},pe={class:"title text-xl"},me={key:0},fe={type:"button",icon:"",size:"small",slot:"invoker"},ge=["label"],he={slot:"content"},ve=["disabled"],be={class:"-mx-2"},ye=["href","active"],xe={class:"mt-4 flex gap-2"},_e={class:"border-border-subtle rounded p-2 bg-white"},Se={key:2,class:"py-20"},ke={class:"w-[60ch] mx-auto text-center grid gap-3 justify-items-center text-gray-500"},we=["label","help-text"],Ie={slot:"after"},Ce={variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},Ve={href:"https://craftcms.com/docs/5.x/configure.html#control-panel-settings"},$e=["label","help-text","has-feedback-for"],Ne={slot:"after"},Ae={variant:"info",appearance:"plain",class:"p-0",icon:"lightbulb"},Te={href:"https://craftcms.com/docs/5.x/configure.html#control-panel-settings"},Be={slot:"feedback"},De={key:0,class:"error-list"},Le=z({__name:"SettingsSitesIndex",props:{readOnly:{type:Boolean},group:{},groups:{},sites:{},nameSuggestions:{},flash:{}},setup(e){const l=e,g=w(!1),i=P(),s=j({id:l.group?.id??null,name:l.group?.name??""});function G(){s.clearErrors().submit(b(),{onSuccess:()=>{g.value=!1,s.reset()}})}function N(r){r==="create"?(s.name="",s.id=null):r==="update"&&(s.name=l.group?.rawName??l.group?.name??"",s.id=l.group?.id??null),g.value=!0}const S=w(l.sites.map(r=>r.id)),I=B(()=>S.value.map(r=>l.sites.find(o=>o.id===r)).filter(Boolean));F(S,(r,o)=>{H(()=>{T.post(oe(),{ids:[...r]},{preserveScroll:!0,preserveState:!0,onError:()=>{S.value=o}})})});function M(r,o){const d=[...S.value],[h]=d.splice(r,1);d.splice(o,0,h),S.value=d}const U=w([i.accessor("name",{header:()=>n("Name"),cell:({row:r,getValue:o})=>p(k,{href:le.url(r.original.id)},()=>p("div",{class:"flex gap-2"},[p("craft-indicator",{variant:r.original.enabled?"success":"empty"}),p("span",o())]))}),i.accessor("handle",{header:()=>n("Handle"),cell:r=>p("code",r.getValue())}),i.accessor("enabled",{header:()=>n("Status"),cell:r=>p(W,{variant:r.getValue()?"success":"default"},()=>r.getValue()?n("Enabled"):n("Disabled"))}),i.accessor("language",{header:()=>n("Language"),cell:r=>p("code",r.getValue())}),i.accessor("primary",{header:()=>n("Primary"),cell:r=>r.getValue()?p("craft-icon",{name:"check"}):""}),i.accessor("baseUrl",{header:()=>n("Base URL"),cell:r=>p("code",r.getValue())}),i.accessor("group.name",{header:()=>n("Group")}),i.display({id:"actions",cell:({row:r})=>p("div",{class:"flex justify-end"},[p(de,{site:r.original,disabled:r.original.primary,class:"whitespace-normal"})]),meta:{wrap:!0}})]),q=K({get data(){return I.value},get columns(){return U.value},getCoreRowModel:Z(),getRowId:r=>r.id.toString(),enableSorting:!1,defaultColumn:{size:"auto",minSize:50,maxSize:200}});function O(){l.group?.id&&confirm(n("Are you sure you want to delete this group?"))&&T.delete(y({groupId:l.group.id}))}const A=B(()=>l.group?.name?l.group.name:n("Sites"));return(r,o)=>(f(),_(D,null,[v(ie,{debug:{form:a(s),$props:r.$props},"full-width":!0,title:A.value},{title:m(()=>[t("div",ce,[t("h1",pe,u(A.value),1),e.group?.id?(f(),_("craft-action-menu",me,[t("craft-button",fe,[t("craft-icon",{name:"gear",label:a(n)("Site group Actions")},null,8,ge)]),t("div",he,[t("craft-action-item",{onClick:o[0]||(o[0]=L(d=>N("update"),["prevent"]))},u(a(n)("Rename Group")),1),t("craft-action-item",{variant:"danger",disabled:I.value.length>0,onClick:L(O,["prevent"])},u(a(n)("Delete Group")),9,ve)])])):V("",!0)])]),actions:m(()=>[v(k,{as:"craft-button",href:a(R)({query:{groupId:e.group?.id}}).url,variant:"primary",appearance:"button"},{default:m(()=>[o[5]||(o[5]=t("craft-icon",{name:"plus",slot:"prefix"},null,-1)),x(" "+u(a(n)("New Site")),1)]),_:1},8,["href"])]),"interior-nav":m(({state:d})=>[t("nav",null,[t("craft-nav-list",be,[t("craft-nav-item",{href:a(c).url(),active:!e.group},u(a(n)("All Sites")),9,ye),(f(!0),_(D,null,Q(e.groups,h=>(f(),C(k,{as:"craft-nav-item",key:h.id,href:a(c).url({query:{groupId:h.id}}),active:e.group&&h.id===e.group.id,block:""},{default:m(()=>[x(u(h.name),1)]),_:2},1032,["href","active"]))),128))])]),t("div",xe,[t("craft-button",{type:"button",onClick:o[1]||(o[1]=h=>N("create")),size:"small"},[o[6]||(o[6]=t("craft-icon",{name:"plus",slot:"prefix"},null,-1)),x(" "+u(a(n)("New Group")),1)])])]),default:m(()=>[t("div",null,[e.readOnly?(f(),C(re,{key:0})):V("",!0),I.value.length?(f(),C(J,{key:1,table:a(q),"read-only":e.readOnly,reorderable:!!e.group?.id,onReorder:M},{"drag-preview":m(({row:d})=>[t("div",_e,u(d.original.name),1)]),_:1},8,["table","read-only","reorderable"])):(f(),_("div",Se,[t("div",ke,[o[8]||(o[8]=t("craft-icon",{name:"light/earth-americas",style:{"font-size":"calc(48rem / 16)"}},null,-1)),t("p",null,u(a(n)("No sites exist for this group yet.")),1),v(k,{as:"craft-button",href:a(R)({query:{groupId:e.group?.id}}).url,appearance:"button"},{default:m(()=>[o[7]||(o[7]=t("craft-icon",{name:"plus",slot:"prefix"},null,-1)),x(" "+u(a(n)("New Site")),1)]),_:1},8,["href"])])]))])]),_:1},8,["debug","title"]),v(te,{"is-active":g.value,onClose:o[4]||(o[4]=d=>{g.value=!1,a(s).reset()}),onSubmit:G,loading:a(s).processing},{default:m(()=>[X(t("craft-input",{name:"id",id:"id","onUpdate:modelValue":o[2]||(o[2]=d=>a(s).id=d),type:"hidden"},null,512),[[Y,a(s).id]]),v(a(ee),{data:"nameSuggestions"},{fallback:m(()=>[t("craft-input",{readonly:"",name:"readonly-name",label:a(n)("Group Name"),"help-text":a(n)("What this group will be called in the control panel.")},[t("div",Ie,[t("craft-callout",Ce,[x(u(a(n)("This can begin with an environment variable."))+" ",1),t("a",Ve,u(a(n)("Learn more")),1)])])],8,we)]),default:m(()=>[t("craft-input",{label:a(n)("Group Name"),id:"name",name:"name",required:"","help-text":a(n)("What this group will be called in the control panel."),"has-feedback-for":a(s).errors?.name?"error":""},[v(se,{options:e.nameSuggestions,modelValue:a(s).name,"onUpdate:modelValue":o[3]||(o[3]=d=>a(s).name=d),slot:"input"},null,8,["options","modelValue"]),t("div",Ne,[t("craft-callout",Ae,[x(u(a(n)("This can begin with an environment variable."))+" ",1),t("a",Te,u(a(n)("Learn more")),1)])]),t("div",Be,[a(s).errors?.name?(f(),_("ul",De,[t("li",null,u(a(s).errors.name),1)])):V("",!0)])],8,$e)]),_:1})]),_:1},8,["is-active","loading"])],64))}}),qe=ae(Le,[["__scopeId","data-v-5e31d72b"]]);export{qe as default}; diff --git a/resources/build/Updater.js b/resources/build/Updater.js index c525a154426..fb5b49fdbcb 100644 --- a/resources/build/Updater.js +++ b/resources/build/Updater.js @@ -1,4 +1,4 @@ -import{B as y,s as A,a4 as U,e as f,d as $,a5 as C,A as L,c as s,o as n,U as D,a as h,u as r,a6 as E,m as v,F as b,p as M,t as T,_ as j}from"./cp3.js";function H(u,c){const e=y({...c}),l=y(!1),_=A(()=>!!e.value.error),m=A(()=>!!e.value.finished);async function d(t){l.value=!0;try{const i=await U.post(`/admin/actions/${u}/${t}`,{data:e.value.data},{headers:{"Content-Type":"application/json",Accept:"application/json"}});k(i.data)}catch(i){p(i)}l.value=!1}function k(t){t.data&&(e.value.data=t.data),e.value={...e.value,status:t.status,error:t.error,errorDetails:t.errorDetails,options:t.options,finished:t.finished,returnUrl:t.returnUrl??e.value.returnUrl,nextAction:t.nextAction},t.nextAction&&d(t.nextAction)}function g(t){t.nextAction&&(e.value.error=void 0,e.value.errorDetails=void 0,e.value.options=void 0,t.status&&(e.value.status=t.status),t.data&&(e.value.data=t.data),d(t.nextAction))}function p(t){const i=t.response?.data?.message||t.message||"Unknown error",a=t.response?.statusText||"Error";e.value.error=f("A fatal error has occurred:"),e.value.errorDetails=`${f("Status:")} ${a} +import{B as y,s as A,a4 as U,i as f,d as $,a5 as C,A as L,c as s,o as n,U as D,a as h,u as r,a6 as E,m as v,F as b,p as M,t as T,_ as j}from"./cp3.js";function H(u,c){const e=y({...c}),l=y(!1),_=A(()=>!!e.value.error),m=A(()=>!!e.value.finished);async function d(t){l.value=!0;try{const i=await U.post(`/admin/actions/${u}/${t}`,{data:e.value.data},{headers:{"Content-Type":"application/json",Accept:"application/json"}});k(i.data)}catch(i){p(i)}l.value=!1}function k(t){t.data&&(e.value.data=t.data),e.value={...e.value,status:t.status,error:t.error,errorDetails:t.errorDetails,options:t.options,finished:t.finished,returnUrl:t.returnUrl??e.value.returnUrl,nextAction:t.nextAction},t.nextAction&&d(t.nextAction)}function g(t){t.nextAction&&(e.value.error=void 0,e.value.errorDetails=void 0,e.value.options=void 0,t.status&&(e.value.status=t.status),t.data&&(e.value.data=t.data),d(t.nextAction))}function p(t){const i=t.response?.data?.message||t.message||"Unknown error",a=t.response?.statusText||"Error";e.value.error=f("A fatal error has occurred:"),e.value.errorDetails=`${f("Status:")} ${a} ${f("Response:")} ${i}`,e.value.options=[{label:f("Troubleshoot"),url:"https://craftcms.com/knowledge-base/failed-updates"},{label:f("Send for help"),email:"support@craftcms.com"}],U.post(`/admin/actions/${u}/finish`,{data:e.value.data},{headers:{"Content-Type":"application/json",Accept:"application/json"}}).catch(()=>{})}function x(t){const i=encodeURIComponent(t.subject||"Craft update failure");let a="Describe what happened here.";return e.value.errorDetails&&(a+=` diff --git a/resources/build/assets/AppLayout.css b/resources/build/assets/AppLayout.css index d5eff695683..08ccc54a17d 100644 --- a/resources/build/assets/AppLayout.css +++ b/resources/build/assets/AppLayout.css @@ -1 +1 @@ -.system-info[data-v-f4725d04]{display:grid;grid-template-columns:2rem auto;gap:var(--c-spacing-md);align-items:center;color:currentColor}.system-info__icon[data-v-f4725d04]{aspect-ratio:1}[data-v-f4725d04] svg{fill:currentColor;max-width:100%;height:auto}.nav-indicator[data-v-2115cac3]{--nav-item-indicator-size: .25rem ;display:inline-flex;width:var(--nav-item-indicator-size);border-radius:var(--c-radius-full);aspect-ratio:1;background-color:currentcolor}.nav-indicator[active][data-v-2115cac3]{--nav-item-indicator-size: .375rem }.edition-logo[data-v-f8b4ece7]{-webkit-user-select:none;user-select:none;border:1px solid currentColor;border-radius:3px;display:inline-flex;box-sizing:content-box;font-size:11px;padding-block:6px;padding-inline:7px 5px;line-height:8px;font-weight:600;letter-spacing:1.7px;text-transform:uppercase}.dev-mode[data-v-52fa7a33]{padding:calc(var(--spacing) * 2);text-align:center;background-image:repeating-linear-gradient(-45deg,transparent,transparent 12px,var(--color-yellow-400) 12px,var(--color-yellow-400) 20px);background-color:var(--color-slate-900)}.cp-sidebar[data-v-22a18951]{height:100%;width:var(--global-sidebar-width);background-color:var(--c-bg-overlay);display:grid;grid-template-rows:minmax(0,auto) 1fr minmax(0,auto)}.cp-sidebar[data-mode=docked][data-v-22a18951]{position:relative;transform:0}.cp-sidebar[data-mode=floating][data-v-22a18951]{position:fixed;inset-block-start:0;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;border-radius:0 var(--c-radius-md) var(--c-radius-md) 0;box-shadow:var(--c-shadow-lg);transform:translate(0);max-width:90%;z-index:100;transition:transform .2s cubic-bezier(0,.55,.45,1)}.cp-sidebar[data-visibility=hidden][data-v-22a18951]{transform:translate(-100%)}.cp-sidebar__body[data-v-22a18951]{padding-block:var(--c-spacing-md);padding-inline:var(--c-spacing-md)}.sidebar-header[data-v-22a18951]{padding-block:var(--c-spacing-md);padding-inline:var(--c-spacing-md);display:flex;justify-content:space-between;align-items:center}.cp-sidebar__body[data-v-22a18951]{overflow-y:scroll;background:linear-gradient(#fff 30%,#fff0) center top,linear-gradient(#fff0,#fff 70%) center bottom,linear-gradient(to bottom,#0000001a,#0000) center top,linear-gradient(to top,#0000001a,#0000) center bottom;background-repeat:no-repeat;background-size:100% 2.5rem,100% 2.5rem,100% .5rem,100% .5rem;background-attachment:local,local,scroll,scroll}.breadcrumbs[data-v-4d21c399]{display:flex}.breadcrumb-item--active[data-v-4d21c399]{font-weight:700;color:currentColor}.separator[data-v-4d21c399]{padding:0 var(--c-spacing-md)}.cp[data-v-aa1ed59c]{display:grid}.cp__main[data-v-aa1ed59c]{container-type:size;padding-block-end:var(--c-spacing-2xl)}.cp__header[data-v-aa1ed59c]{color:var(--color-slate-200);background-color:var(--color-slate-950)}.container[data-v-aa1ed59c]{max-width:var(--global-content-width);margin:0 auto;padding-inline:var(--c-spacing-lg)}.container--full[data-v-aa1ed59c]{max-width:none}@media screen and (min-width:1024px){.cp[data-v-aa1ed59c]{grid-template-columns:var(--v0174160f) minmax(0,1fr);grid-template-areas:"header header" "sidebar main";grid-template-rows:auto 1fr;min-height:100vh;position:fixed;inset:0;width:100%;height:100%}.cp__header[data-v-aa1ed59c]{grid-area:header}.cp__sidebar[data-v-aa1ed59c]{grid-area:sidebar}.cp__main[data-v-aa1ed59c]{grid-area:main;overflow:auto}} +.system-info[data-v-f4725d04]{display:grid;grid-template-columns:2rem auto;gap:var(--c-spacing-md);align-items:center;color:currentColor}.system-info__icon[data-v-f4725d04]{aspect-ratio:1}[data-v-f4725d04] svg{fill:currentColor;max-width:100%;height:auto}.nav-indicator[data-v-2115cac3]{--nav-item-indicator-size: .25rem ;display:inline-flex;width:var(--nav-item-indicator-size);border-radius:var(--c-radius-full);aspect-ratio:1;background-color:currentcolor}.nav-indicator[active][data-v-2115cac3]{--nav-item-indicator-size: .375rem }.edition-logo[data-v-f8b4ece7]{-webkit-user-select:none;user-select:none;border:1px solid currentColor;border-radius:3px;display:inline-flex;box-sizing:content-box;font-size:11px;padding-block:6px;padding-inline:7px 5px;line-height:8px;font-weight:600;letter-spacing:1.7px;text-transform:uppercase}.dev-mode[data-v-52fa7a33]{padding:calc(var(--spacing) * 2);text-align:center;background-image:repeating-linear-gradient(-45deg,transparent,transparent 12px,var(--color-yellow-400) 12px,var(--color-yellow-400) 20px);background-color:var(--color-slate-900)}.cp-sidebar[data-v-7f5f0148]{height:100%;width:var(--global-sidebar-width);background-color:var(--c-bg-overlay);display:grid;grid-template-rows:minmax(0,auto) 1fr minmax(0,auto)}.cp-sidebar[data-mode=docked][data-v-7f5f0148]{position:relative;transform:0}.cp-sidebar[data-mode=floating][data-v-7f5f0148]{position:fixed;inset-block-start:0;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;border-radius:0 var(--c-radius-md) var(--c-radius-md) 0;box-shadow:var(--c-shadow-lg);transform:translate(0);max-width:90%;z-index:100;transition:transform .2s cubic-bezier(0,.55,.45,1)}.cp-sidebar[data-visibility=hidden][data-v-7f5f0148]{transform:translate(-100%)}.cp-sidebar__body[data-v-7f5f0148]{padding-block:var(--c-spacing-md);padding-inline:var(--c-spacing-md)}.sidebar-header[data-v-7f5f0148]{padding-block:var(--c-spacing-md);padding-inline:var(--c-spacing-md);display:flex;justify-content:space-between;align-items:center}.cp-sidebar__body[data-v-7f5f0148]{overflow-y:scroll;background:linear-gradient(#fff 30%,#fff0) center top,linear-gradient(#fff0,#fff 70%) center bottom,linear-gradient(to bottom,#0000001a,#0000) center top,linear-gradient(to top,#0000001a,#0000) center bottom;background-repeat:no-repeat;background-size:100% 2.5rem,100% 2.5rem,100% .5rem,100% .5rem;background-attachment:local,local,scroll,scroll}.breadcrumbs[data-v-4d21c399]{display:flex}.breadcrumb-item--active[data-v-4d21c399]{font-weight:700;color:currentColor}.separator[data-v-4d21c399]{padding:0 var(--c-spacing-md)}.cp[data-v-05cadcff]{display:grid}.cp__main[data-v-05cadcff]{container-type:size;padding-block-end:var(--c-spacing-2xl)}.cp__header[data-v-05cadcff]{color:var(--color-slate-200);background-color:var(--color-slate-950)}.container[data-v-05cadcff]{max-width:var(--global-content-width);margin:0 auto;padding-inline:var(--c-spacing-lg)}.container--full[data-v-05cadcff]{max-width:none}@media screen and (min-width:1024px){.cp[data-v-05cadcff]{grid-template-columns:var(--v18fa8ee2) minmax(0,1fr);grid-template-areas:"header header" "sidebar main";grid-template-rows:auto 1fr;min-height:100vh;position:fixed;inset:0;width:100%;height:100%}.cp__header[data-v-05cadcff]{grid-area:header}.cp__sidebar[data-v-05cadcff]{grid-area:sidebar}.cp__main[data-v-05cadcff]{grid-area:main;overflow:auto}} diff --git a/resources/build/assets/SettingsGeneralPage.css b/resources/build/assets/SettingsGeneralPage.css index c9be3087d80..1f328de744b 100644 --- a/resources/build/assets/SettingsGeneralPage.css +++ b/resources/build/assets/SettingsGeneralPage.css @@ -1 +1 @@ -.preview[data-v-e8396b7f]{display:flex;width:var(--c33cc0a6)}.stage[data-v-5eec89a4]{padding:var(--c-spacing-md)}.preview[data-v-5eec89a4]{border:1px solid var(--c-color-neutral-border-subtle)}.preview--icon[data-v-5eec89a4]{aspect-ratio:1;width:32px}.preview--logo[data-v-5eec89a4]{aspect-ratio:16/9;width:288px;height:auto} +.preview[data-v-e8396b7f]{display:flex;width:var(--c33cc0a6)}.stage[data-v-24796a08]{padding:var(--c-spacing-md)}.preview[data-v-24796a08]{border:1px solid var(--c-color-neutral-border-subtle)}.preview--icon[data-v-24796a08]{aspect-ratio:1;width:32px}.preview--logo[data-v-24796a08]{aspect-ratio:16/9;width:288px;height:auto} diff --git a/resources/build/cp3.js b/resources/build/cp3.js index 70253b7226e..025f5891237 100644 --- a/resources/build/cp3.js +++ b/resources/build/cp3.js @@ -1,7 +1,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./bg-BG2.js","./bg3.js","./cs-CZ2.js","./cs3.js","./de-DE2.js","./de3.js","./en-AU2.js","./en3.js","./en-GB2.js","./en-US2.js","./es-ES2.js","./es3.js","./fr-FR2.js","./fr3.js","./fr-BE2.js","./hu-HU2.js","./hu3.js","./it-IT2.js","./it3.js","./nl-BE2.js","./nl3.js","./nl-NL2.js","./pl-PL2.js","./pl3.js","./ro-RO2.js","./ro3.js","./ru-RU2.js","./ru3.js","./sk-SK2.js","./sk3.js","./tr-TR.js","./tr.js","./uk-UA2.js","./uk3.js","./bg-BG.js","./bg2.js","./cs-CZ.js","./cs2.js","./de-DE.js","./de2.js","./en-AU.js","./en2.js","./en-GB.js","./en-US.js","./es-ES.js","./es2.js","./fr-FR.js","./fr2.js","./fr-BE.js","./hu-HU.js","./hu2.js","./it-IT.js","./it2.js","./nl-BE.js","./nl2.js","./nl-NL.js","./pl-PL.js","./pl2.js","./ro-RO.js","./ro2.js","./ru-RU.js","./ru2.js","./sk-SK.js","./sk2.js","./uk-UA.js","./uk2.js","./Install.js","./assets/Install.css","./SettingsGeneralPage.js","./AppLayout.js","./assets/AppLayout.css","./CalloutReadOnly.vue_vue_type_script_setup_true_lang.js","./assets/SettingsGeneralPage.css","./SettingsIndexPage.js","./assets/SettingsIndexPage.css","./SettingsSectionsIndexPage.js","./SettingsSitesEdit.js","./DeleteSiteModal.vue_vue_type_script_setup_true_lang.js","./assets/DeleteSiteModal.css","./SettingsSitesIndex.js","./IndexLayout.js","./assets/IndexLayout.css","./assets/SettingsSitesIndex.css","./Updater.js","./assets/Updater.css","./UtilitiesShowPage.js"])))=>i.map(i=>d[i]); -var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.querySelector("[data-webawesome]");if(t?.hasAttribute("data-webawesome")){const n=new URL(t.getAttribute("data-webawesome")??"",window.location.href).pathname;Jy(n)}else{const r=[...document.getElementsByTagName("script")].find(i=>i.src.endsWith("webawesome.js")||i.src.endsWith("webawesome.loader.js")||i.src.endsWith("webawesome.ssr-loader.js"));if(r){const i=String(r.getAttribute("src"));Jy(i.split("/").slice(0,-1).join("/"))}}}return eg.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}function $O(e){tg=e}function RO(){if(!tg){const e=document.querySelector("[data-fa-kit-code]");e&&$O(e.getAttribute("data-fa-kit-code")||"")}return tg}var Xr="7.0.1";function FO(e,t,n){const r=RO(),i=r.length>0;let s="solid";return t==="notdog"?(n==="solid"&&(s="solid"),n==="duo-solid"&&(s="duo-solid"),`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/notdog-${s}/${e}.svg?token=${encodeURIComponent(r)}`):t==="chisel"?`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/chisel-regular/${e}.svg?token=${encodeURIComponent(r)}`:t==="etch"?`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/etch-solid/${e}.svg?token=${encodeURIComponent(r)}`:t==="jelly"?(n==="regular"&&(s="regular"),n==="duo-regular"&&(s="duo-regular"),n==="fill-regular"&&(s="fill-regular"),`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/jelly-${s}/${e}.svg?token=${encodeURIComponent(r)}`):t==="slab"?((n==="solid"||n==="regular")&&(s="regular"),n==="press-regular"&&(s="press-regular"),`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/slab-${s}/${e}.svg?token=${encodeURIComponent(r)}`):t==="thumbprint"?`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/thumbprint-light/${e}.svg?token=${encodeURIComponent(r)}`:t==="whiteboard"?`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/whiteboard-semibold/${e}.svg?token=${encodeURIComponent(r)}`:(t==="classic"&&(n==="thin"&&(s="thin"),n==="light"&&(s="light"),n==="regular"&&(s="regular"),n==="solid"&&(s="solid")),t==="sharp"&&(n==="thin"&&(s="sharp-thin"),n==="light"&&(s="sharp-light"),n==="regular"&&(s="sharp-regular"),n==="solid"&&(s="sharp-solid")),t==="duotone"&&(n==="thin"&&(s="duotone-thin"),n==="light"&&(s="duotone-light"),n==="regular"&&(s="duotone-regular"),n==="solid"&&(s="duotone")),t==="sharp-duotone"&&(n==="thin"&&(s="sharp-duotone-thin"),n==="light"&&(s="sharp-duotone-light"),n==="regular"&&(s="sharp-duotone-regular"),n==="solid"&&(s="sharp-duotone-solid")),t==="brands"&&(s="brands"),i?`https://ka-p.fontawesome.com/releases/v${Xr}/svgs/${s}/${e}.svg?token=${encodeURIComponent(r)}`:`https://ka-f.fontawesome.com/releases/v${Xr}/svgs/${s}/${e}.svg`)}var IO={name:"default",resolver:(e,t="classic",n="solid")=>FO(e,t,n),mutator:(e,t)=>{if(t?.family&&!e.hasAttribute("data-duotone-initialized")){const{family:n,variant:r}=t;if(n==="duotone"||n==="sharp-duotone"||n==="notdog"&&r==="duo-solid"||n==="jelly"&&r==="duo-regular"||n==="thumbprint"){const i=[...e.querySelectorAll("path")],s=i.find(a=>!a.hasAttribute("opacity")),o=i.find(a=>a.hasAttribute("opacity"));if(!s||!o)return;if(s.setAttribute("data-duotone-primary",""),o.setAttribute("data-duotone-secondary",""),t.swapOpacity&&s&&o){const a=o.getAttribute("opacity")||"0.4";s.style.setProperty("--path-opacity",a),o.style.setProperty("--path-opacity","1")}e.setAttribute("data-duotone-initialized","")}}}},NO=IO;new MutationObserver(e=>{for(const{addedNodes:t}of e)for(const n of t)n.nodeType===Node.ELEMENT_NODE&&MO(n)});async function MO(e){const t=e instanceof Element?e.tagName.toLowerCase():"",n=t?.startsWith("wa-"),r=[...e.querySelectorAll(":not(:defined)")].map(o=>o.tagName.toLowerCase()).filter(o=>o.startsWith("wa-"));n&&!customElements.get(t)&&r.push(t);const i=[...new Set(r)],s=await Promise.allSettled(i.map(o=>DO(o)));for(const o of s)o.status==="rejected"&&console.warn(o.reason);await new Promise(requestAnimationFrame),e.dispatchEvent(new CustomEvent("wa-discovery-complete",{bubbles:!1,cancelable:!1,composed:!0}))}function DO(e){if(customElements.get(e))return Promise.resolve();const t=e.replace(/^wa-/i,""),n=PO(`components/${t}/${t}.js`);return new Promise((r,i)=>{import(n).then(()=>r()).catch(()=>i(new Error(`Unable to autoload <${e}> from ${n}`)))})}const ng=new Set,da=new Map;let $s,Tv="ltr",Ov="en";const I1=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(I1){const e=new MutationObserver(M1);Tv=document.documentElement.dir||"ltr",Ov=document.documentElement.lang||navigator.language,e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function N1(...e){e.map(t=>{const n=t.$code.toLowerCase();da.has(n)?da.set(n,Object.assign(Object.assign({},da.get(n)),t)):da.set(n,t),$s||($s=t)}),M1()}function M1(){I1&&(Tv=document.documentElement.dir||"ltr",Ov=document.documentElement.lang||navigator.language),[...ng.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}let LO=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){ng.add(this.host)}hostDisconnected(){ng.delete(this.host)}dir(){return`${this.host.dir||Tv}`.toLowerCase()}lang(){return`${this.host.lang||Ov}`.toLowerCase()}getTranslationData(t){var n,r;const i=new Intl.Locale(t.replace(/_/g,"-")),s=i?.language.toLowerCase(),o=(r=(n=i?.region)===null||n===void 0?void 0:n.toLowerCase())!==null&&r!==void 0?r:"",a=da.get(`${s}-${o}`),l=da.get(s);return{locale:i,language:s,region:o,primary:a,secondary:l}}exists(t,n){var r;const{primary:i,secondary:s}=this.getTranslationData((r=n.lang)!==null&&r!==void 0?r:this.lang());return n=Object.assign({includeFallback:!1},n),!!(i&&i[t]||s&&s[t]||n.includeFallback&&$s&&$s[t])}term(t,...n){const{primary:r,secondary:i}=this.getTranslationData(this.lang());let s;if(r&&r[t])s=r[t];else if(i&&i[t])s=i[t];else if($s&&$s[t])s=$s[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof s=="function"?s(...n):s}date(t,n){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),n).format(t)}number(t,n){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),n).format(t)}relativeTime(t,n,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(t,n)}};var D1={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,pauseAnimation:"Pause animation",playAnimation:"Play animation",previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollableRegion:"Scrollable region",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format",zoomIn:"Zoom in",zoomOut:"Zoom out"};N1(D1);var VO=D1;var qa=class extends LO{};N1(VO);function BO(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var zf={solid:{check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',circle:'',eyedropper:'',"grip-vertical":'',indeterminate:'',minus:'',pause:'',play:'',star:'',user:'',xmark:''},regular:{"circle-question":'',"circle-xmark":'',copy:'',eye:'',"eye-slash":'',star:''}},UO={name:"system",resolver:(e,t="classic",n="solid")=>{let i=zf[n][e]??zf.regular[e]??zf.regular["circle-question"];return i?BO(i):""}},HO=UO;var jO="classic",_d=[NO,HO],wd=[];function zO(e){wd.push(e)}function qO(e){wd=wd.filter(t=>t!==e)}function qf(e){return _d.find(t=>t.name===e)}function WO(e,t){KO(e),_d.push({name:e,resolver:t.resolver,mutator:t.mutator,spriteSheet:t.spriteSheet}),wd.forEach(n=>{n.library===e&&n.setIcon()})}function KO(e){_d=_d.filter(t=>t.name!==e)}function GO(){return jO}var JO=Object.defineProperty,YO=Object.getOwnPropertyDescriptor,L1=e=>{throw TypeError(e)},z=(e,t,n,r)=>{for(var i=r>1?void 0:r?YO(t,n):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&JO(t,n,i),i},V1=(e,t,n)=>t.has(e)||L1("Cannot "+n),XO=(e,t,n)=>(V1(e,t,"read from private field"),t.get(e)),QO=(e,t,n)=>t.has(e)?L1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ZO=(e,t,n,r)=>(V1(e,t,"write to private field"),t.set(e,n),n);const eP={alert:"triangle-exclamation",asc:"arrow-down-short-wide",asset:"image",assets:"image",circleuarr:"circle-arrow-up",collapse:"down-left-and-up-right-to-center",condition:"diamond",darr:"arrow-down",date:"calendar",desc:"arrow-down-wide-short",disabled:"circle-dashed",done:"circle-check",downangle:"angle-down",draft:"scribble",edit:"pencil",enabled:"circle",expand:"up-right-and-down-left-from-center",external:"arrow-up-right-from-square",field:"pen-to-square",help:"circle-question",home:"house",info:"circle-info",insecure:"unlock",larr:"arrow-left",layout:"table-layout",leftangle:"angle-left",listrtl:"list-flip",location:"location-dot",mail:"envelope",menu:"bars",move:"grip-dots",newstamp:"certificate",paperplane:"paper-plane",plugin:"plug",rarr:"arrow-right",refresh:"arrows-rotate",remove:"xmark",rightangle:"angle-right",rotate:"rotate-left",routes:"signs-post",search:"magnifying-glass",secure:"lock",settings:"gear",shareleft:"share-flip",shuteye:"eye-slash","sidebar-left":"sidebar","sidebar-right":"sidebar-flip","sidebar-start":"sidebar","sidebar-end":"sidebar-flip",structure:"list-tree",structurertl:"list-tree-flip",template:"file-code",time:"clock",tool:"wrench",uarr:"arrow-up",upangle:"angle-up",view:"eye",wand:"wand-magic-sparkles"};function tP(e,t="classic",n="regular"){let r="solid",i=n,s=e.endsWith(".svg")?e.split(".svg")[0]:e;if(e.includes("/")){const[o,...a]=e.split("/");i=o??i,s=a.join("/")}return i==="thin"?r="thin":i==="light"?r="light":i==="regular"?r="regular":i==="solid"&&(r="solid"),t==="brands"&&(r="brands"),i==="custom-icons"&&(r="custom-icons"),s=eP[s]??s,`/vendor/craft/icons/${r}/${s}.svg`}function nP(){WO("default",{resolver:(e,t="classic",n="solid")=>tP(e,t,n),mutator:e=>e.setAttribute("fill","currentColor")})}var B1=class extends HTMLElement{constructor(...e){super(...e),this.cookieName=null,this.state="collapsed",this.expanded=!1,this.handleOpen=()=>{this.trigger?.setAttribute("aria-expanded","true"),this.expanded=!0,this.dispatchEvent(new CustomEvent("open")),this.target&&(this.target.dataset.state="expanded"),this.cookieName&&window.Craft?.setCookie(this.cookieName,"expanded")},this.handleClose=()=>{this.trigger?.setAttribute("aria-expanded","false"),this.expanded=!1,this.dispatchEvent(new CustomEvent("close")),this.target&&(this.target.dataset.state="collapsed"),this.cookieName&&window.Craft?.setCookie(this.cookieName,"collapsed")}}get trigger(){return this.querySelector('button[type="button"]')}get target(){if(!this.trigger)return console.warn("No trigger found for disclosure."),null;const e=this.trigger.getAttribute("aria-controls");return e?document.getElementById(e):(console.warn("No target selector found for disclosure."),null)}connectedCallback(){if(!this.trigger){console.error("craft-disclosure elements must include a button",this);return}if(!this.target){console.error(`No target with id ${this.trigger.getAttribute("aria-controls")} found for disclosure. `,this.trigger);return}this.cookieName=this.getAttribute("cookie-name"),this.state=this.getAttribute("state")??"expanded",this.trigger.setAttribute("aria-expanded",this.state==="expanded"?"true":"false"),this.trigger.addEventListener("click",this.toggle.bind(this)),this.state==="expanded"?this.open():this.close()}disconnectedCallback(){this.open(),this.trigger?.removeEventListener("click",this.toggle.bind(this))}attributeChangedCallback(e,t,n){e==="state"&&(n==="expanded"?this.handleOpen():this.handleClose())}toggle(){this.expanded?this.close():this.open()}open(){this.setAttribute("state","expanded")}close(){this.setAttribute("state","collapsed")}};B1.observedAttributes=["state"];customElements.get("craft-disclosure")||customElements.define("craft-disclosure",B1);function se(e,t,n,r){var i=arguments.length,s=i<3?t:r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}const Yu=globalThis,Pv=Yu.ShadowRoot&&(Yu.ShadyCSS===void 0||Yu.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$v=Symbol(),Yy=new WeakMap;let U1=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==$v)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(Pv&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=Yy.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Yy.set(n,t))}return t}toString(){return this.cssText}};const H1=e=>new U1(typeof e=="string"?e:e+"",void 0,$v),ue=(e,...t)=>{const n=e.length===1?e[0]:t.reduce(((r,i,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1]),e[0]);return new U1(n,e,$v)},Rv=(e,t)=>{if(Pv)e.adoptedStyleSheets=t.map((n=>n instanceof CSSStyleSheet?n:n.styleSheet));else for(const n of t){const r=document.createElement("style"),i=Yu.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},Xy=Pv?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return H1(n)})(e):e;const{is:rP,defineProperty:iP,getOwnPropertyDescriptor:sP,getOwnPropertyNames:oP,getOwnPropertySymbols:aP,getPrototypeOf:lP}=Object,yh=globalThis,Qy=yh.trustedTypes,cP=Qy?Qy.emptyScript:"",uP=yh.reactiveElementPolyfillSupport,Fl=(e,t)=>e,Sd={toAttribute(e,t){switch(t){case Boolean:e=e?cP:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},Fv=(e,t)=>!rP(e,t),Zy={attribute:!0,type:String,converter:Sd,reflect:!1,useDefault:!1,hasChanged:Fv};Symbol.metadata??=Symbol("metadata"),yh.litPropertyMetadata??=new WeakMap;let ia=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=Zy){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&iP(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:s}=sP(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get:i,set(o){const a=i?.call(this);s?.call(this,o),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Zy}static _$Ei(){if(this.hasOwnProperty(Fl("elementProperties")))return;const t=lP(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Fl("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Fl("properties"))){const n=this.properties,r=[...oP(n),...aP(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(Xy(i))}else t!==void 0&&n.push(Xy(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Rv(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$ET(t,n){const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const s=(r.converter?.toAttribute!==void 0?r.converter:Sd).toAttribute(n,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,n){const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const s=r.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Sd;this._$Em=i;const a=o.fromAttribute(n,s.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){const i=this.constructor,s=this[t];if(r??=i.getPropertyOptions(t),!((r.hasChanged??Fv)(s,n)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,n,{useDefault:r,reflect:i,wrapped:s},o){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??n??this[t]),s!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(n=void 0),this._$AL.set(t,n)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,s]of r){const{wrapped:o}=s,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,s,a)}}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(n)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(n)}willUpdate(t){}_$AE(t){this._$EO?.forEach((n=>n.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((n=>this._$ET(n,this[n]))),this._$EM()}updated(t){}firstUpdated(t){}};ia.elementStyles=[],ia.shadowRootOptions={mode:"open"},ia[Fl("elementProperties")]=new Map,ia[Fl("finalized")]=new Map,uP?.({ReactiveElement:ia}),(yh.reactiveElementVersions??=[]).push("2.1.1");const Iv=globalThis,Ed=Iv.trustedTypes,e_=Ed?Ed.createPolicy("lit-html",{createHTML:e=>e}):void 0,j1="$lit$",Xi=`lit$${Math.random().toFixed(9).slice(2)}$`,z1="?"+Xi,dP=`<${z1}>`,Js=document,tc=()=>Js.createComment(""),nc=e=>e===null||typeof e!="object"&&typeof e!="function",Nv=Array.isArray,hP=e=>Nv(e)||typeof e?.[Symbol.iterator]=="function",Wf=`[ -\f\r]`,ll=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,t_=/-->/g,n_=/>/g,Es=RegExp(`>|${Wf}(?:([^\\s"'>=/]+)(${Wf}*=${Wf}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),r_=/'/g,i_=/"/g,q1=/^(?:script|style|textarea|title)$/i,fP=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),J=fP(1),_r=Symbol.for("lit-noChange"),Ae=Symbol.for("lit-nothing"),s_=new WeakMap,Rs=Js.createTreeWalker(Js,129);function W1(e,t){if(!Nv(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return e_!==void 0?e_.createHTML(t):t}const pP=(e,t)=>{const n=e.length-1,r=[];let i,s=t===2?"":t===3?"":"",o=ll;for(let a=0;a"?(o=i??ll,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?Es:u[3]==='"'?i_:r_):o===i_||o===r_?o=Es:o===t_||o===n_?o=ll:(o=Es,i=void 0);const f=o===Es&&e[a+1].startsWith("/>")?" ":"";s+=o===ll?l+dP:d>=0?(r.push(c),l.slice(0,d)+j1+l.slice(d)+Xi+f):l+Xi+(d===-2?a:f)}return[W1(e,s+(e[n]||"")+(t===2?"":t===3?"":"")),r]};let rg=class K1{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let s=0,o=0;const a=t.length-1,l=this.parts,[c,u]=pP(t,n);if(this.el=K1.createElement(c,r),Rs.currentNode=this.el.content,n===2||n===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=Rs.nextNode())!==null&&l.length0){i.textContent=Ed?Ed.emptyScript:"";for(let f=0;f2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Ae}_$AI(t,n=this,r,i){const s=this.strings;let o=!1;if(s===void 0)t=_a(this,t,n,0),o=!nc(t)||t!==this._$AH&&t!==_r,o&&(this._$AH=t);else{const a=t;let l,c;for(t=s[0],l=0;l{const r=n?.renderBefore??t;let i=r._$litPart$;if(i===void 0){const s=n?.renderBefore??null;r._$litPart$=i=new Wa(t.insertBefore(tc(),s),s,void 0,n??{})}return i._$AI(e),i};const Mv=globalThis;let Me=class extends ia{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ig(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _r}};Me._$litElement$=!0,Me.finalized=!0,Mv.litElementHydrateSupport?.({LitElement:Me});const SP=Mv.litElementPolyfillSupport;SP?.({LitElement:Me});(Mv.litElementVersions??=[]).push("4.2.1");const kr=e=>(t,n)=>{n!==void 0?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};const EP={attribute:!0,type:String,converter:Sd,reflect:!1,hasChanged:Fv},CP=(e=EP,t,n)=>{const{kind:r,metadata:i}=n;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),r==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(n.name,e),r==="accessor"){const{name:o}=n;return{set(a){const l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,e)},init(a){return a!==void 0&&this.C(o,void 0,e,a),a}}}if(r==="setter"){const{name:o}=n;return function(a){const l=this[o];t.call(this,a),this.requestUpdate(o,l,e)}}throw Error("Unsupported decorator location: "+r)};function V(e){return(t,n)=>typeof n=="object"?CP(e,t,n):((r,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,r),o?Object.getOwnPropertyDescriptor(i,s):void 0})(e,t,n)}function On(e){return V({...e,state:!0,attribute:!1})}const G1=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,n),n);function pt(e,t){return(n,r,i)=>{const s=o=>o.renderRoot?.querySelector(e)??null;return G1(n,r,{get(){return s(this)}})}}function wh(e){return(t,n)=>{const{slot:r,selector:i}=e??{},s="slot"+(r?`[name=${r}]`:":not([name])");return G1(t,n,{get(){const o=this.renderRoot?.querySelector(s),a=o?.assignedElements(e)??[];return i===void 0?a:a.filter((l=>l.matches(i)))}})}}const Sh={ATTRIBUTE:1,CHILD:2},Eh=e=>(...t)=>({_$litDirective$:e,values:t});let Ch=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};const Gt=Eh(class extends Ch{constructor(e){if(super(e),e.type!==Sh.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in t)t[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(t)}const n=e.element.classList;for(const r of this.st)r in t||(n.remove(r),this.st.delete(r));for(const r in t){const i=!!t[r];i===this.st.has(r)||this.nt?.has(r)||(i?(n.add(r),this.st.add(r)):(n.remove(r),this.st.delete(r)))}return _r}});var xP=ue` +var lg="",cg="";function n_(e){lg=e}function W$(e=""){if(!lg){const t=document.querySelector("[data-webawesome]");if(t?.hasAttribute("data-webawesome")){const n=new URL(t.getAttribute("data-webawesome")??"",window.location.href).pathname;n_(n)}else{const r=[...document.getElementsByTagName("script")].find(i=>i.src.endsWith("webawesome.js")||i.src.endsWith("webawesome.loader.js")||i.src.endsWith("webawesome.ssr-loader.js"));if(r){const i=String(r.getAttribute("src"));n_(i.split("/").slice(0,-1).join("/"))}}}return lg.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}function K$(e){cg=e}function G$(){if(!cg){const e=document.querySelector("[data-fa-kit-code]");e&&K$(e.getAttribute("data-fa-kit-code")||"")}return cg}var ei="7.0.1";function J$(e,t,n){const r=G$(),i=r.length>0;let s="solid";return t==="notdog"?(n==="solid"&&(s="solid"),n==="duo-solid"&&(s="duo-solid"),`https://ka-p.fontawesome.com/releases/v${ei}/svgs/notdog-${s}/${e}.svg?token=${encodeURIComponent(r)}`):t==="chisel"?`https://ka-p.fontawesome.com/releases/v${ei}/svgs/chisel-regular/${e}.svg?token=${encodeURIComponent(r)}`:t==="etch"?`https://ka-p.fontawesome.com/releases/v${ei}/svgs/etch-solid/${e}.svg?token=${encodeURIComponent(r)}`:t==="jelly"?(n==="regular"&&(s="regular"),n==="duo-regular"&&(s="duo-regular"),n==="fill-regular"&&(s="fill-regular"),`https://ka-p.fontawesome.com/releases/v${ei}/svgs/jelly-${s}/${e}.svg?token=${encodeURIComponent(r)}`):t==="slab"?((n==="solid"||n==="regular")&&(s="regular"),n==="press-regular"&&(s="press-regular"),`https://ka-p.fontawesome.com/releases/v${ei}/svgs/slab-${s}/${e}.svg?token=${encodeURIComponent(r)}`):t==="thumbprint"?`https://ka-p.fontawesome.com/releases/v${ei}/svgs/thumbprint-light/${e}.svg?token=${encodeURIComponent(r)}`:t==="whiteboard"?`https://ka-p.fontawesome.com/releases/v${ei}/svgs/whiteboard-semibold/${e}.svg?token=${encodeURIComponent(r)}`:(t==="classic"&&(n==="thin"&&(s="thin"),n==="light"&&(s="light"),n==="regular"&&(s="regular"),n==="solid"&&(s="solid")),t==="sharp"&&(n==="thin"&&(s="sharp-thin"),n==="light"&&(s="sharp-light"),n==="regular"&&(s="sharp-regular"),n==="solid"&&(s="sharp-solid")),t==="duotone"&&(n==="thin"&&(s="duotone-thin"),n==="light"&&(s="duotone-light"),n==="regular"&&(s="duotone-regular"),n==="solid"&&(s="duotone")),t==="sharp-duotone"&&(n==="thin"&&(s="sharp-duotone-thin"),n==="light"&&(s="sharp-duotone-light"),n==="regular"&&(s="sharp-duotone-regular"),n==="solid"&&(s="sharp-duotone-solid")),t==="brands"&&(s="brands"),i?`https://ka-p.fontawesome.com/releases/v${ei}/svgs/${s}/${e}.svg?token=${encodeURIComponent(r)}`:`https://ka-f.fontawesome.com/releases/v${ei}/svgs/${s}/${e}.svg`)}var Y$={name:"default",resolver:(e,t="classic",n="solid")=>J$(e,t,n),mutator:(e,t)=>{if(t?.family&&!e.hasAttribute("data-duotone-initialized")){const{family:n,variant:r}=t;if(n==="duotone"||n==="sharp-duotone"||n==="notdog"&&r==="duo-solid"||n==="jelly"&&r==="duo-regular"||n==="thumbprint"){const i=[...e.querySelectorAll("path")],s=i.find(a=>!a.hasAttribute("opacity")),o=i.find(a=>a.hasAttribute("opacity"));if(!s||!o)return;if(s.setAttribute("data-duotone-primary",""),o.setAttribute("data-duotone-secondary",""),t.swapOpacity&&s&&o){const a=o.getAttribute("opacity")||"0.4";s.style.setProperty("--path-opacity",a),o.style.setProperty("--path-opacity","1")}e.setAttribute("data-duotone-initialized","")}}}},X$=Y$;new MutationObserver(e=>{for(const{addedNodes:t}of e)for(const n of t)n.nodeType===Node.ELEMENT_NODE&&Q$(n)});async function Q$(e){const t=e instanceof Element?e.tagName.toLowerCase():"",n=t?.startsWith("wa-"),r=[...e.querySelectorAll(":not(:defined)")].map(o=>o.tagName.toLowerCase()).filter(o=>o.startsWith("wa-"));n&&!customElements.get(t)&&r.push(t);const i=[...new Set(r)],s=await Promise.allSettled(i.map(o=>Z$(o)));for(const o of s)o.status==="rejected"&&console.warn(o.reason);await new Promise(requestAnimationFrame),e.dispatchEvent(new CustomEvent("wa-discovery-complete",{bubbles:!1,cancelable:!1,composed:!0}))}function Z$(e){if(customElements.get(e))return Promise.resolve();const t=e.replace(/^wa-/i,""),n=W$(`components/${t}/${t}.js`);return new Promise((r,i)=>{import(n).then(()=>r()).catch(()=>i(new Error(`Unable to autoload <${e}> from ${n}`)))})}const ug=new Set,va=new Map;let Ds,Dv="ltr",Lv="en";const ZE=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(ZE){const e=new MutationObserver(t1);Dv=document.documentElement.dir||"ltr",Lv=document.documentElement.lang||navigator.language,e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function e1(...e){e.map(t=>{const n=t.$code.toLowerCase();va.has(n)?va.set(n,Object.assign(Object.assign({},va.get(n)),t)):va.set(n,t),Ds||(Ds=t)}),t1()}function t1(){ZE&&(Dv=document.documentElement.dir||"ltr",Lv=document.documentElement.lang||navigator.language),[...ug.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}let eO=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){ug.add(this.host)}hostDisconnected(){ug.delete(this.host)}dir(){return`${this.host.dir||Dv}`.toLowerCase()}lang(){return`${this.host.lang||Lv}`.toLowerCase()}getTranslationData(t){var n,r;const i=new Intl.Locale(t.replace(/_/g,"-")),s=i?.language.toLowerCase(),o=(r=(n=i?.region)===null||n===void 0?void 0:n.toLowerCase())!==null&&r!==void 0?r:"",a=va.get(`${s}-${o}`),l=va.get(s);return{locale:i,language:s,region:o,primary:a,secondary:l}}exists(t,n){var r;const{primary:i,secondary:s}=this.getTranslationData((r=n.lang)!==null&&r!==void 0?r:this.lang());return n=Object.assign({includeFallback:!1},n),!!(i&&i[t]||s&&s[t]||n.includeFallback&&Ds&&Ds[t])}term(t,...n){const{primary:r,secondary:i}=this.getTranslationData(this.lang());let s;if(r&&r[t])s=r[t];else if(i&&i[t])s=i[t];else if(Ds&&Ds[t])s=Ds[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof s=="function"?s(...n):s}date(t,n){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),n).format(t)}number(t,n){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),n).format(t)}relativeTime(t,n,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(t,n)}};var n1={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,pauseAnimation:"Pause animation",playAnimation:"Play animation",previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollableRegion:"Scrollable region",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format",zoomIn:"Zoom in",zoomOut:"Zoom out"};e1(n1);var tO=n1;var Xa=class extends eO{};e1(tO);function nO(e){return`data:image/svg+xml,${encodeURIComponent(e)}`}var Yf={solid:{check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',circle:'',eyedropper:'',"grip-vertical":'',indeterminate:'',minus:'',pause:'',play:'',star:'',user:'',xmark:''},regular:{"circle-question":'',"circle-xmark":'',copy:'',eye:'',"eye-slash":'',star:''}},rO={name:"system",resolver:(e,t="classic",n="solid")=>{let i=Yf[n][e]??Yf.regular[e]??Yf.regular["circle-question"];return i?nO(i):""}},iO=rO;var sO="classic",Pd=[X$,iO],Rd=[];function oO(e){Rd.push(e)}function aO(e){Rd=Rd.filter(t=>t!==e)}function Xf(e){return Pd.find(t=>t.name===e)}function lO(e,t){cO(e),Pd.push({name:e,resolver:t.resolver,mutator:t.mutator,spriteSheet:t.spriteSheet}),Rd.forEach(n=>{n.library===e&&n.setIcon()})}function cO(e){Pd=Pd.filter(t=>t.name!==e)}function uO(){return sO}var dO=Object.defineProperty,hO=Object.getOwnPropertyDescriptor,r1=e=>{throw TypeError(e)},z=(e,t,n,r)=>{for(var i=r>1?void 0:r?hO(t,n):t,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&dO(t,n,i),i},i1=(e,t,n)=>t.has(e)||r1("Cannot "+n),fO=(e,t,n)=>(i1(e,t,"read from private field"),t.get(e)),pO=(e,t,n)=>t.has(e)?r1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),mO=(e,t,n,r)=>(i1(e,t,"write to private field"),t.set(e,n),n);const gO={alert:"triangle-exclamation",asc:"arrow-down-short-wide",asset:"image",assets:"image",circleuarr:"circle-arrow-up",collapse:"down-left-and-up-right-to-center",condition:"diamond",darr:"arrow-down",date:"calendar",desc:"arrow-down-wide-short",disabled:"circle-dashed",done:"circle-check",downangle:"angle-down",draft:"scribble",edit:"pencil",enabled:"circle",expand:"up-right-and-down-left-from-center",external:"arrow-up-right-from-square",field:"pen-to-square",help:"circle-question",home:"house",info:"circle-info",insecure:"unlock",larr:"arrow-left",layout:"table-layout",leftangle:"angle-left",listrtl:"list-flip",location:"location-dot",mail:"envelope",menu:"bars",move:"grip-dots",newstamp:"certificate",paperplane:"paper-plane",plugin:"plug",rarr:"arrow-right",refresh:"arrows-rotate",remove:"xmark",rightangle:"angle-right",rotate:"rotate-left",routes:"signs-post",search:"magnifying-glass",secure:"lock",settings:"gear",shareleft:"share-flip",shuteye:"eye-slash","sidebar-left":"sidebar","sidebar-right":"sidebar-flip","sidebar-start":"sidebar","sidebar-end":"sidebar-flip",structure:"list-tree",structurertl:"list-tree-flip",template:"file-code",time:"clock",tool:"wrench",uarr:"arrow-up",upangle:"angle-up",view:"eye",wand:"wand-magic-sparkles"};function vO(e,t="classic",n="regular"){let r="solid",i=n,s=e.endsWith(".svg")?e.split(".svg")[0]:e;if(e.includes("/")){let[o,...a]=e.split("/");i=o??i,s=a.join("/")}return i==="thin"?r="thin":i==="light"?r="light":i==="regular"?r="regular":i==="solid"&&(r="solid"),t==="brands"&&(r="brands"),i==="custom-icons"&&(r="custom-icons"),s=gO[s]??s,`/vendor/craft/icons/${r}/${s}.svg`}function bO(){lO("default",{resolver:(e,t="classic",n="solid")=>vO(e,t,n),mutator:e=>e.setAttribute("fill","currentColor")})}var r_=class extends HTMLElement{constructor(...t){super(...t),this.cookieName=null,this.state="collapsed",this.expanded=!1,this.handleOpen=()=>{this.trigger?.setAttribute("aria-expanded","true"),this.expanded=!0,this.dispatchEvent(new CustomEvent("open")),this.target&&(this.target.dataset.state="expanded"),this.cookieName&&window.Craft?.setCookie(this.cookieName,"expanded")},this.handleClose=()=>{this.trigger?.setAttribute("aria-expanded","false"),this.expanded=!1,this.dispatchEvent(new CustomEvent("close")),this.target&&(this.target.dataset.state="collapsed"),this.cookieName&&window.Craft?.setCookie(this.cookieName,"collapsed")}}get trigger(){return this.querySelector('button[type="button"]')}get target(){if(!this.trigger)return console.warn("No trigger found for disclosure."),null;let t=this.trigger.getAttribute("aria-controls");return t?document.getElementById(t):(console.warn("No target selector found for disclosure."),null)}connectedCallback(){if(!this.trigger){console.error("craft-disclosure elements must include a button",this);return}if(!this.target){console.error(`No target with id ${this.trigger.getAttribute("aria-controls")} found for disclosure. `,this.trigger);return}this.cookieName=this.getAttribute("cookie-name"),this.state=this.getAttribute("state")??"expanded",this.trigger.setAttribute("aria-expanded",this.state==="expanded"?"true":"false"),this.trigger.addEventListener("click",this.toggle.bind(this)),this.state==="expanded"?this.open():this.close()}disconnectedCallback(){this.open(),this.trigger?.removeEventListener("click",this.toggle.bind(this))}attributeChangedCallback(t,n,r){t==="state"&&(r==="expanded"?this.handleOpen():this.handleClose())}toggle(){this.expanded?this.close():this.open()}open(){this.setAttribute("state","expanded")}close(){this.setAttribute("state","collapsed")}};r_.observedAttributes=["state"],customElements.get("craft-disclosure")||customElements.define("craft-disclosure",r_);function se(e,t,n,r){var i=arguments.length,s=i<3?t:r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}const sd=globalThis,Vv=sd.ShadowRoot&&(sd.ShadyCSS===void 0||sd.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Bv=Symbol(),i_=new WeakMap;let s1=class{constructor(t,n,r){if(this._$cssResult$=!0,r!==Bv)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(Vv&&t===void 0){const r=n!==void 0&&n.length===1;r&&(t=i_.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&i_.set(n,t))}return t}toString(){return this.cssText}};const o1=e=>new s1(typeof e=="string"?e:e+"",void 0,Bv),ue=(e,...t)=>{const n=e.length===1?e[0]:t.reduce(((r,i,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[s+1]),e[0]);return new s1(n,e,Bv)},Uv=(e,t)=>{if(Vv)e.adoptedStyleSheets=t.map((n=>n instanceof CSSStyleSheet?n:n.styleSheet));else for(const n of t){const r=document.createElement("style"),i=sd.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,e.appendChild(r)}},s_=Vv?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const r of t.cssRules)n+=r.cssText;return o1(n)})(e):e;const{is:yO,defineProperty:_O,getOwnPropertyDescriptor:wO,getOwnPropertyNames:SO,getOwnPropertySymbols:EO,getPrototypeOf:CO}=Object,Oh=globalThis,o_=Oh.trustedTypes,xO=o_?o_.emptyScript:"",AO=Oh.reactiveElementPolyfillSupport,Ul=(e,t)=>e,Fd={toAttribute(e,t){switch(t){case Boolean:e=e?xO:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},jv=(e,t)=>!yO(e,t),a_={attribute:!0,type:String,converter:Fd,reflect:!1,useDefault:!1,hasChanged:jv};Symbol.metadata??=Symbol("metadata"),Oh.litPropertyMetadata??=new WeakMap;let ua=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,n=a_){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(t,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,n);i!==void 0&&_O(this.prototype,t,i)}}static getPropertyDescriptor(t,n,r){const{get:i,set:s}=wO(this.prototype,t)??{get(){return this[n]},set(o){this[n]=o}};return{get:i,set(o){const a=i?.call(this);s?.call(this,o),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??a_}static _$Ei(){if(this.hasOwnProperty(Ul("elementProperties")))return;const t=CO(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ul("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ul("properties"))){const n=this.properties,r=[...SO(n),...EO(n)];for(const i of r)this.createProperty(i,n[i])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)n.unshift(s_(i))}else t!==void 0&&n.push(s_(t));return n}static _$Eu(t,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Uv(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,n,r){this._$AK(t,r)}_$ET(t,n){const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const s=(r.converter?.toAttribute!==void 0?r.converter:Fd).toAttribute(n,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,n){const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const s=r.getPropertyOptions(i),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Fd;this._$Em=i;const a=o.fromAttribute(n,s.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(t,n,r){if(t!==void 0){const i=this.constructor,s=this[t];if(r??=i.getPropertyOptions(t),!((r.hasChanged??jv)(s,n)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,r))))return;this.C(t,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,n,{useDefault:r,reflect:i,wrapped:s},o){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??n??this[t]),s!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(n=void 0),this._$AL.set(t,n)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,s]of r){const{wrapped:o}=s,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,s,a)}}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(n)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(n)}willUpdate(t){}_$AE(t){this._$EO?.forEach((n=>n.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((n=>this._$ET(n,this[n]))),this._$EM()}updated(t){}firstUpdated(t){}};ua.elementStyles=[],ua.shadowRootOptions={mode:"open"},ua[Ul("elementProperties")]=new Map,ua[Ul("finalized")]=new Map,AO?.({ReactiveElement:ua}),(Oh.reactiveElementVersions??=[]).push("2.1.1");const Hv=globalThis,Id=Hv.trustedTypes,l_=Id?Id.createPolicy("lit-html",{createHTML:e=>e}):void 0,a1="$lit$",is=`lit$${Math.random().toFixed(9).slice(2)}$`,l1="?"+is,kO=`<${l1}>`,to=document,cc=()=>to.createComment(""),uc=e=>e===null||typeof e!="object"&&typeof e!="function",zv=Array.isArray,TO=e=>zv(e)||typeof e?.[Symbol.iterator]=="function",Qf=`[ +\f\r]`,dl=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c_=/-->/g,u_=/>/g,Ts=RegExp(`>|${Qf}(?:([^\\s"'>=/]+)(${Qf}*=${Qf}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),d_=/'/g,h_=/"/g,c1=/^(?:script|style|textarea|title)$/i,$O=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),J=$O(1),xr=Symbol.for("lit-noChange"),Ae=Symbol.for("lit-nothing"),f_=new WeakMap,Ls=to.createTreeWalker(to,129);function u1(e,t){if(!zv(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return l_!==void 0?l_.createHTML(t):t}const OO=(e,t)=>{const n=e.length-1,r=[];let i,s=t===2?"":t===3?"":"",o=dl;for(let a=0;a"?(o=i??dl,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?Ts:u[3]==='"'?h_:d_):o===h_||o===d_?o=Ts:o===c_||o===u_?o=dl:(o=Ts,i=void 0);const f=o===Ts&&e[a+1].startsWith("/>")?" ":"";s+=o===dl?l+kO:d>=0?(r.push(c),l.slice(0,d)+a1+l.slice(d)+is+f):l+is+(d===-2?a:f)}return[u1(e,s+(e[n]||"")+(t===2?"":t===3?"":"")),r]};let dg=class d1{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let s=0,o=0;const a=t.length-1,l=this.parts,[c,u]=OO(t,n);if(this.el=d1.createElement(c,r),Ls.currentNode=this.el.content,n===2||n===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=Ls.nextNode())!==null&&l.length0){i.textContent=Id?Id.emptyScript:"";for(let f=0;f2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Ae}_$AI(t,n=this,r,i){const s=this.strings;let o=!1;if(s===void 0)t=Aa(this,t,n,0),o=!uc(t)||t!==this._$AH&&t!==xr,o&&(this._$AH=t);else{const a=t;let l,c;for(t=s[0],l=0;l{const r=n?.renderBefore??t;let i=r._$litPart$;if(i===void 0){const s=n?.renderBefore??null;r._$litPart$=i=new Ph(t.insertBefore(cc(),s),s,void 0,n??{})}return i._$AI(e),i};const qv=globalThis;let Me=class extends ua{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=hg(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xr}};Me._$litElement$=!0,Me.finalized=!0,qv.litElementHydrateSupport?.({LitElement:Me});const LO=qv.litElementPolyfillSupport;LO?.({LitElement:Me});(qv.litElementVersions??=[]).push("4.2.1");const Rr=e=>(t,n)=>{n!==void 0?n.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)};const VO={attribute:!0,type:String,converter:Fd,reflect:!1,hasChanged:jv},BO=(e=VO,t,n)=>{const{kind:r,metadata:i}=n;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),r==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(n.name,e),r==="accessor"){const{name:o}=n;return{set(a){const l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,e)},init(a){return a!==void 0&&this.C(o,void 0,e,a),a}}}if(r==="setter"){const{name:o}=n;return function(a){const l=this[o];t.call(this,a),this.requestUpdate(o,l,e)}}throw Error("Unsupported decorator location: "+r)};function V(e){return(t,n)=>typeof n=="object"?BO(e,t,n):((r,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,r),o?Object.getOwnPropertyDescriptor(i,s):void 0})(e,t,n)}function yn(e){return V({...e,state:!0,attribute:!1})}const f1=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,n),n);function pt(e,t){return(n,r,i)=>{const s=o=>o.renderRoot?.querySelector(e)??null;return f1(n,r,{get(){return s(this)}})}}function od(e){return(t,n)=>{const{slot:r,selector:i}=e??{},s="slot"+(r?`[name=${r}]`:":not([name])");return f1(t,n,{get(){const o=this.renderRoot?.querySelector(s),a=o?.assignedElements(e)??[];return i===void 0?a:a.filter((l=>l.matches(i)))}})}}const Fh={ATTRIBUTE:1,CHILD:2},Ih=e=>(...t)=>({_$litDirective$:e,values:t});let Nh=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,r){this._$Ct=t,this._$AM=n,this._$Ci=r}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}};const Jt=Ih(class extends Nh{constructor(e){if(super(e),e.type!==Fh.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((r=>r!==""))));for(const r in t)t[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(t)}const n=e.element.classList;for(const r of this.st)r in t||(n.remove(r),this.st.delete(r));for(const r in t){const i=!!t[r];i===this.st.has(r)||this.nt?.has(r)||(i?(n.add(r),this.st.add(r)):(n.remove(r),this.st.delete(r)))}return xr}});var UO=ue` :host { --_size: var(--size, 24px); } @@ -47,15 +47,15 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q border-block-end-color: currentcolor; opacity: 0.8; } -`,xh=class extends Me{constructor(...e){super(...e),this.visible=!0}show(){this.visible=!0,this.dispatchEvent(new CustomEvent("show"))}hide(){this.visible=!1,this.dispatchEvent(new CustomEvent("hide"))}focus(){this.wrapper?.focus()}render(){return J` +`,_u=class extends Me{constructor(...t){super(...t),this.visible=!0}show(){this.visible=!0,this.dispatchEvent(new CustomEvent("show"))}hide(){this.visible=!1,this.dispatchEvent(new CustomEvent("hide"))}focus(){this.wrapper?.focus()}render(){return J`
- `}};xh.styles=[xP];se([V({reflect:!0})],xh.prototype,"visible",void 0);se([pt(".wrapper")],xh.prototype,"wrapper",void 0);customElements.get("craft-spinner")||customElements.define("craft-spinner",xh);var AP=class extends Event{constructor(){super("wa-reposition",{bubbles:!0,cancelable:!1,composed:!0})}};var kP=`:host { + `}};_u.styles=[UO],se([V({reflect:!0})],_u.prototype,"visible",void 0),se([pt(".wrapper")],_u.prototype,"wrapper",void 0),customElements.get("craft-spinner")||customElements.define("craft-spinner",_u);var jO=class extends Event{constructor(){super("wa-reposition",{bubbles:!0,cancelable:!1,composed:!0})}};var HO=`:host { box-sizing: border-box !important; } @@ -68,7 +68,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q [hidden] { display: none !important; } -`,Xu,Pn=class extends Me{constructor(){super(),QO(this,Xu,!1),this.initialReflectedProperties=new Map,this.didSSR=!!this.shadowRoot,this.customStates={set:(t,n)=>{if(this.internals?.states)try{n?this.internals.states.add(t):this.internals.states.delete(t)}catch(r){if(String(r).includes("must start with '--'"))console.error("Your browser implements an outdated version of CustomStateSet. Consider using a polyfill");else throw r}},has:t=>{if(!this.internals?.states)return!1;try{return this.internals.states.has(t)}catch{return!1}}};try{this.internals=this.attachInternals()}catch{console.error("Element internals are not supported in your browser. Consider using a polyfill")}this.customStates.set("wa-defined",!0);let e=this.constructor;for(let[t,n]of e.elementProperties)n.default==="inherit"&&n.initial!==void 0&&typeof t=="string"&&this.customStates.set(`initial-${t}-${n.initial}`,!0)}static get styles(){const e=Array.isArray(this.css)?this.css:this.css?[this.css]:[];return[kP,...e].map(t=>typeof t=="string"?H1(t):t)}attributeChangedCallback(e,t,n){XO(this,Xu)||(this.constructor.elementProperties.forEach((r,i)=>{r.reflect&&this[i]!=null&&this.initialReflectedProperties.set(i,this[i])}),ZO(this,Xu,!0)),super.attributeChangedCallback(e,t,n)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,n)=>{e.has(n)&&this[n]==null&&(this[n]=t)})}firstUpdated(e){super.firstUpdated(e),this.didSSR&&this.shadowRoot?.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})}update(e){try{super.update(e)}catch(t){if(this.didSSR&&!this.hasUpdated){const n=new Event("lit-hydration-error",{bubbles:!0,composed:!0,cancelable:!1});n.error=t,this.dispatchEvent(n)}throw t}}relayNativeEvent(e,t){e.stopImmediatePropagation(),this.dispatchEvent(new e.constructor(e.type,{...e,...t}))}};Xu=new WeakMap;z([V()],Pn.prototype,"dir",2);z([V()],Pn.prototype,"lang",2);z([V({type:Boolean,reflect:!0,attribute:"did-ssr"})],Pn.prototype,"didSSR",2);const ls=Math.min,Dn=Math.max,Cd=Math.round,gu=Math.floor,Ur=e=>({x:e,y:e}),TP={left:"right",right:"left",bottom:"top",top:"bottom"},OP={start:"end",end:"start"};function sg(e,t,n){return Dn(e,ls(t,n))}function Ka(e,t){return typeof e=="function"?e(t):e}function cs(e){return e.split("-")[0]}function Ga(e){return e.split("-")[1]}function J1(e){return e==="x"?"y":"x"}function Dv(e){return e==="y"?"height":"width"}const PP=new Set(["top","bottom"]);function ui(e){return PP.has(cs(e))?"y":"x"}function Lv(e){return J1(ui(e))}function $P(e,t,n){n===void 0&&(n=!1);const r=Ga(e),i=Lv(e),s=Dv(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=xd(o)),[o,xd(o)]}function RP(e){const t=xd(e);return[og(e),t,og(t)]}function og(e){return e.replace(/start|end/g,t=>OP[t])}const o_=["left","right"],a_=["right","left"],FP=["top","bottom"],IP=["bottom","top"];function NP(e,t,n){switch(e){case"top":case"bottom":return n?t?a_:o_:t?o_:a_;case"left":case"right":return t?FP:IP;default:return[]}}function MP(e,t,n,r){const i=Ga(e);let s=NP(cs(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(og)))),s}function xd(e){return e.replace(/left|right|bottom|top/g,t=>TP[t])}function DP(e){return{top:0,right:0,bottom:0,left:0,...e}}function Y1(e){return typeof e!="number"?DP(e):{top:e,right:e,bottom:e,left:e}}function Ad(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function l_(e,t,n){let{reference:r,floating:i}=e;const s=ui(t),o=Lv(t),a=Dv(o),l=cs(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-i.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Ga(t)){case"start":f[o]-=p*(n&&c?-1:1);break;case"end":f[o]+=p*(n&&c?-1:1);break}return f}const LP=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=l_(c,r,l),p=r,f={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Ka(e,t)||{};if(c==null)return{};const d=Y1(u),p={x:n,y:r},f=Lv(i),h=Dv(f),m=await o.getDimensions(c),g=f==="y",b=g?"top":"left",_=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[f]-p[f]-s.floating[h],S=p[f]-s.reference[f],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=C?C[v]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=a.floating[v]||s.floating[h]);const O=w/2-S/2,x=E/2-m[h]/2-1,k=ls(d[b],x),P=ls(d[_],x),A=k,y=E-m[h]-P,I=E/2-m[h]/2+O,H=sg(A,I,y),M=!l.arrow&&Ga(i)!=null&&I!==H&&s.reference[h]/2-(II<=0)){var P,A;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,H=E[I];if(H&&(!(d==="alignment"?_!==ui(H):!1)||k.every($=>ui($.placement)===_?$.overflows[0]>0:!0)))return{data:{index:I,overflows:k},reset:{placement:H}};let M=(A=k.filter(W=>W.overflows[0]<=0).sort((W,$)=>W.overflows[1]-$.overflows[1])[0])==null?void 0:A.placement;if(!M)switch(f){case"bestFit":{var y;const W=(y=k.filter($=>{if(C){const le=ui($.placement);return le===_||le==="y"}return!0}).map($=>[$.placement,$.overflows.filter(le=>le>0).reduce((le,De)=>le+De,0)]).sort(($,le)=>$[1]-le[1])[0])==null?void 0:y[0];W&&(M=W);break}case"initialPlacement":M=a;break}if(i!==M)return{reset:{placement:M}}}return{}}}},UP=new Set(["left","top"]);async function HP(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=cs(n),a=Ga(n),l=ui(n)==="y",c=UP.has(o)?-1:1,u=s&&l?-1:1,d=Ka(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const jP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await HP(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},zP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:_}=g;return{x:b,y:_}}},...l}=Ka(e,t),c={x:n,y:r},u=await Vv(t,l),d=ui(cs(i)),p=J1(d);let f=c[p],h=c[d];if(s){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",_=f+u[g],v=f-u[b];f=sg(_,f,v)}if(o){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",_=h+u[g],v=h-u[b];h=sg(_,h,v)}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[d]:o}}}}}},qP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Ka(e,t),u=await Vv(t,c),d=cs(i),p=Ga(i),f=ui(i)==="y",{width:h,height:m}=s.floating;let g,b;d==="top"||d==="bottom"?(g=d,b=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,g=p==="end"?"top":"bottom");const _=m-u.top-u.bottom,v=h-u.left-u.right,w=ls(m-u[g],_),S=ls(h-u[b],v),C=!t.middlewareData.shift;let E=w,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=_),C&&!p){const k=Dn(u.left,0),P=Dn(u.right,0),A=Dn(u.top,0),y=Dn(u.bottom,0);f?O=h-2*(k!==0||P!==0?k+P:Dn(u.left,u.right)):E=m-2*(A!==0||y!==0?A+y:Dn(u.top,u.bottom))}await l({...t,availableWidth:O,availableHeight:E});const x=await o.getDimensions(a.floating);return h!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function Ah(){return typeof window<"u"}function Ja(e){return X1(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gr(e){var t;return(t=(X1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function X1(e){return Ah()?e instanceof Node||e instanceof Bn(e).Node:!1}function wr(e){return Ah()?e instanceof Element||e instanceof Bn(e).Element:!1}function zr(e){return Ah()?e instanceof HTMLElement||e instanceof Bn(e).HTMLElement:!1}function c_(e){return!Ah()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot}const WP=new Set(["inline","contents"]);function Pc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Sr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!WP.has(i)}const KP=new Set(["table","td","th"]);function GP(e){return KP.has(Ja(e))}const JP=[":popover-open",":modal"];function kh(e){return JP.some(t=>{try{return e.matches(t)}catch{return!1}})}const YP=["transform","translate","scale","rotate","perspective"],XP=["transform","translate","scale","rotate","perspective","filter"],QP=["paint","layout","strict","content"];function Th(e){const t=Bv(),n=wr(e)?Sr(e):e;return YP.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||XP.some(r=>(n.willChange||"").includes(r))||QP.some(r=>(n.contain||"").includes(r))}function ZP(e){let t=us(e);for(;zr(t)&&!wa(t);){if(Th(t))return t;if(kh(t))return null;t=us(t)}return null}function Bv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const e$=new Set(["html","body","#document"]);function wa(e){return e$.has(Ja(e))}function Sr(e){return Bn(e).getComputedStyle(e)}function Oh(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function us(e){if(Ja(e)==="html")return e;const t=e.assignedSlot||e.parentNode||c_(e)&&e.host||Gr(e);return c_(t)?t.host:t}function Q1(e){const t=us(e);return wa(t)?e.ownerDocument?e.ownerDocument.body:e.body:zr(t)&&Pc(t)?t:Q1(t)}function Sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Q1(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Bn(i);if(s){const a=ag(o);return t.concat(o,o.visualViewport||[],Pc(i)?i:[],a&&n?Sa(a):[])}return t.concat(i,Sa(i,[],n))}function ag(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Z1(e){const t=Sr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=zr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Cd(n)!==s||Cd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function Uv(e){return wr(e)?e:e.contextElement}function pa(e){const t=Uv(e);if(!zr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Z1(t);let o=(s?Cd(n.width):n.width)/r,a=(s?Cd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const t$=Ur(0);function eE(e){const t=Bn(e);return!Bv()||!t.visualViewport?t$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function n$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bn(e)?!1:t}function Ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Uv(e);let o=Ur(1);t&&(r?wr(r)&&(o=pa(r)):o=pa(e));const a=n$(s,n,r)?eE(s):Ur(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const p=Bn(s),f=r&&wr(r)?Bn(r):r;let h=p,m=ag(h);for(;m&&r&&f!==h;){const g=pa(m),b=m.getBoundingClientRect(),_=Sr(m),v=b.left+(m.clientLeft+parseFloat(_.paddingLeft))*g.x,w=b.top+(m.clientTop+parseFloat(_.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=v,c+=w,h=Bn(m),m=ag(h)}}return Ad({width:u,height:d,x:l,y:c})}function Ph(e,t){const n=Oh(e).scrollLeft;return t?t.left+n:Ys(Gr(e)).left+n}function tE(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ph(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function r$(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Gr(r),a=t?kh(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ur(1);const u=Ur(0),d=zr(r);if((d||!d&&!s)&&((Ja(r)!=="body"||Pc(o))&&(l=Oh(r)),zr(r))){const f=Ys(r);c=pa(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=o&&!d&&!s?tE(o,l):Ur(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function i$(e){return Array.from(e.getClientRects())}function s$(e){const t=Gr(e),n=Oh(e),r=e.ownerDocument.body,i=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ph(e);const a=-n.scrollTop;return Sr(r).direction==="rtl"&&(o+=Dn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const u_=25;function o$(e,t){const n=Bn(e),r=Gr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Bv();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Ph(r);if(c<=0){const u=r.ownerDocument,d=u.body,p=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-f);h<=u_&&(s-=h)}else c<=u_&&(s+=c);return{width:s,height:o,x:a,y:l}}const a$=new Set(["absolute","fixed"]);function l$(e,t){const n=Ys(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=zr(e)?pa(e):Ur(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function d_(e,t,n){let r;if(t==="viewport")r=o$(e,n);else if(t==="document")r=s$(Gr(e));else if(wr(t))r=l$(t,n);else{const i=eE(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ad(r)}function nE(e,t){const n=us(e);return n===t||!wr(n)||wa(n)?!1:Sr(n).position==="fixed"||nE(n,t)}function c$(e,t){const n=t.get(e);if(n)return n;let r=Sa(e,[],!1).filter(a=>wr(a)&&Ja(a)!=="body"),i=null;const s=Sr(e).position==="fixed";let o=s?us(e):e;for(;wr(o)&&!wa(o);){const a=Sr(o),l=Th(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&a$.has(i.position)||Pc(o)&&!l&&nE(e,o))?r=r.filter(u=>u!==o):i=a,o=us(o)}return t.set(e,r),r}function u$(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?kh(t)?[]:c$(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=d_(t,u,i);return c.top=Dn(d.top,c.top),c.right=ls(d.right,c.right),c.bottom=ls(d.bottom,c.bottom),c.left=Dn(d.left,c.left),c},d_(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function d$(e){const{width:t,height:n}=Z1(e);return{width:t,height:n}}function h$(e,t,n){const r=zr(t),i=Gr(t),s=n==="fixed",o=Ys(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ur(0);function c(){l.x=Ph(i)}if(r||!r&&!s)if((Ja(t)!=="body"||Pc(i))&&(a=Oh(t)),r){const f=Ys(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?tE(i,a):Ur(0),d=o.left+a.scrollLeft-l.x-u.x,p=o.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:o.width,height:o.height}}function Kf(e){return Sr(e).position==="static"}function h_(e,t){if(!zr(e)||Sr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Gr(e)===n&&(n=n.ownerDocument.body),n}function rE(e,t){const n=Bn(e);if(kh(e))return n;if(!zr(e)){let i=us(e);for(;i&&!wa(i);){if(wr(i)&&!Kf(i))return i;i=us(i)}return n}let r=h_(e,t);for(;r&&GP(r)&&Kf(r);)r=h_(r,t);return r&&wa(r)&&Kf(r)&&!Th(r)?n:r||ZP(e)||n}const f$=async function(e){const t=this.getOffsetParent||rE,n=this.getDimensions,r=await n(e.floating);return{reference:h$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function p$(e){return Sr(e).direction==="rtl"}const Qu={convertOffsetParentRelativeRectToViewportRelativeRect:r$,getDocumentElement:Gr,getClippingRect:u$,getOffsetParent:rE,getElementRects:f$,getClientRects:i$,getDimensions:d$,getScale:pa,isElement:wr,isRTL:p$};function iE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function m$(e,t){let n=null,r;const i=Gr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(a||t(),!p||!f)return;const h=gu(d),m=gu(i.clientWidth-(u+p)),g=gu(i.clientHeight-(d+f)),b=gu(u),v={rootMargin:-h+"px "+-m+"px "+-g+"px "+-b+"px",threshold:Dn(0,ls(1,l))||1};let w=!0;function S(C){const E=C[0].intersectionRatio;if(E!==l){if(!w)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!iE(c,e.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(S,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return o(!0),s}function sE(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Uv(e),u=i||s?[...c?Sa(c):[],...Sa(t)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=c&&a?m$(c,n):null;let p=-1,f=null;o&&(f=new ResizeObserver(b=>{let[_]=b;_&&_.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=f)==null||v.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,m=l?Ys(e):null;l&&g();function g(){const b=Ys(e);m&&!iE(m,b)&&n(),m=b,h=requestAnimationFrame(g)}return n(),()=>{var b;u.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),d?.(),(b=f)==null||b.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const oE=jP,aE=zP,lE=BP,f_=qP,g$=VP,cE=(e,t,n)=>{const r=new Map,i={platform:Qu,...n},s={...i.platform,_c:r};return LP(e,t,{...i,platform:s})};function v$(e){return b$(e)}function Gf(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function b$(e){for(let t=e;t;t=Gf(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=Gf(e);t;t=Gf(t)){if(!(t instanceof Element))continue;const n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||Th(n)||t.tagName==="BODY"))return t}return null}var y$=`:host { +`,ad,Rn=class extends Me{constructor(){super(),pO(this,ad,!1),this.initialReflectedProperties=new Map,this.didSSR=!!this.shadowRoot,this.customStates={set:(t,n)=>{if(this.internals?.states)try{n?this.internals.states.add(t):this.internals.states.delete(t)}catch(r){if(String(r).includes("must start with '--'"))console.error("Your browser implements an outdated version of CustomStateSet. Consider using a polyfill");else throw r}},has:t=>{if(!this.internals?.states)return!1;try{return this.internals.states.has(t)}catch{return!1}}};try{this.internals=this.attachInternals()}catch{console.error("Element internals are not supported in your browser. Consider using a polyfill")}this.customStates.set("wa-defined",!0);let e=this.constructor;for(let[t,n]of e.elementProperties)n.default==="inherit"&&n.initial!==void 0&&typeof t=="string"&&this.customStates.set(`initial-${t}-${n.initial}`,!0)}static get styles(){const e=Array.isArray(this.css)?this.css:this.css?[this.css]:[];return[HO,...e].map(t=>typeof t=="string"?o1(t):t)}attributeChangedCallback(e,t,n){fO(this,ad)||(this.constructor.elementProperties.forEach((r,i)=>{r.reflect&&this[i]!=null&&this.initialReflectedProperties.set(i,this[i])}),mO(this,ad,!0)),super.attributeChangedCallback(e,t,n)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,n)=>{e.has(n)&&this[n]==null&&(this[n]=t)})}firstUpdated(e){super.firstUpdated(e),this.didSSR&&this.shadowRoot?.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})}update(e){try{super.update(e)}catch(t){if(this.didSSR&&!this.hasUpdated){const n=new Event("lit-hydration-error",{bubbles:!0,composed:!0,cancelable:!1});n.error=t,this.dispatchEvent(n)}throw t}}relayNativeEvent(e,t){e.stopImmediatePropagation(),this.dispatchEvent(new e.constructor(e.type,{...e,...t}))}};ad=new WeakMap;z([V()],Rn.prototype,"dir",2);z([V()],Rn.prototype,"lang",2);z([V({type:Boolean,reflect:!0,attribute:"did-ssr"})],Rn.prototype,"didSSR",2);const ms=Math.min,Vn=Math.max,Nd=Math.round,wu=Math.floor,zr=e=>({x:e,y:e}),zO={left:"right",right:"left",bottom:"top",top:"bottom"},qO={start:"end",end:"start"};function fg(e,t,n){return Vn(e,ms(t,n))}function Qa(e,t){return typeof e=="function"?e(t):e}function gs(e){return e.split("-")[0]}function Za(e){return e.split("-")[1]}function p1(e){return e==="x"?"y":"x"}function Wv(e){return e==="y"?"height":"width"}const WO=new Set(["top","bottom"]);function mi(e){return WO.has(gs(e))?"y":"x"}function Kv(e){return p1(mi(e))}function KO(e,t,n){n===void 0&&(n=!1);const r=Za(e),i=Kv(e),s=Wv(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Md(o)),[o,Md(o)]}function GO(e){const t=Md(e);return[pg(e),t,pg(t)]}function pg(e){return e.replace(/start|end/g,t=>qO[t])}const p_=["left","right"],m_=["right","left"],JO=["top","bottom"],YO=["bottom","top"];function XO(e,t,n){switch(e){case"top":case"bottom":return n?t?m_:p_:t?p_:m_;case"left":case"right":return t?JO:YO;default:return[]}}function QO(e,t,n,r){const i=Za(e);let s=XO(gs(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(pg)))),s}function Md(e){return e.replace(/left|right|bottom|top/g,t=>zO[t])}function ZO(e){return{top:0,right:0,bottom:0,left:0,...e}}function m1(e){return typeof e!="number"?ZO(e):{top:e,right:e,bottom:e,left:e}}function Dd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function g_(e,t,n){let{reference:r,floating:i}=e;const s=mi(t),o=Kv(t),a=Wv(o),l=gs(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-i.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Za(t)){case"start":f[o]-=p*(n&&c?-1:1);break;case"end":f[o]+=p*(n&&c?-1:1);break}return f}const eP=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=g_(c,r,l),p=r,f={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Qa(e,t)||{};if(c==null)return{};const d=m1(u),p={x:n,y:r},f=Kv(i),h=Wv(f),m=await o.getDimensions(c),g=f==="y",v=g?"top":"left",_=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=s.reference[h]+s.reference[f]-p[f]-s.floating[h],S=p[f]-s.reference[f],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=C?C[b]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=a.floating[b]||s.floating[h]);const T=w/2-S/2,x=E/2-m[h]/2-1,k=ms(d[v],x),O=ms(d[_],x),A=k,y=E-m[h]-O,F=E/2-m[h]/2+T,j=fg(A,F,y),M=!l.arrow&&Za(i)!=null&&F!==j&&s.reference[h]/2-(FF<=0)){var O,A;const F=(((O=s.flip)==null?void 0:O.index)||0)+1,j=E[F];if(j&&(!(d==="alignment"?_!==mi(j):!1)||k.every(P=>mi(P.placement)===_?P.overflows[0]>0:!0)))return{data:{index:F,overflows:k},reset:{placement:j}};let M=(A=k.filter(q=>q.overflows[0]<=0).sort((q,P)=>q.overflows[1]-P.overflows[1])[0])==null?void 0:A.placement;if(!M)switch(f){case"bestFit":{var y;const q=(y=k.filter(P=>{if(C){const le=mi(P.placement);return le===_||le==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(le=>le>0).reduce((le,De)=>le+De,0)]).sort((P,le)=>P[1]-le[1])[0])==null?void 0:y[0];q&&(M=q);break}case"initialPlacement":M=a;break}if(i!==M)return{reset:{placement:M}}}return{}}}},rP=new Set(["left","top"]);async function iP(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gs(n),a=Za(n),l=mi(n)==="y",c=rP.has(o)?-1:1,u=s&&l?-1:1,d=Qa(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const sP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await iP(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},oP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:v,y:_}=g;return{x:v,y:_}}},...l}=Qa(e,t),c={x:n,y:r},u=await Gv(t,l),d=mi(gs(i)),p=p1(d);let f=c[p],h=c[d];if(s){const g=p==="y"?"top":"left",v=p==="y"?"bottom":"right",_=f+u[g],b=f-u[v];f=fg(_,f,b)}if(o){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",_=h+u[g],b=h-u[v];h=fg(_,h,b)}const m=a.fn({...t,[p]:f,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:s,[d]:o}}}}}},aP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Qa(e,t),u=await Gv(t,c),d=gs(i),p=Za(i),f=mi(i)==="y",{width:h,height:m}=s.floating;let g,v;d==="top"||d==="bottom"?(g=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g=p==="end"?"top":"bottom");const _=m-u.top-u.bottom,b=h-u.left-u.right,w=ms(m-u[g],_),S=ms(h-u[v],b),C=!t.middlewareData.shift;let E=w,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=_),C&&!p){const k=Vn(u.left,0),O=Vn(u.right,0),A=Vn(u.top,0),y=Vn(u.bottom,0);f?T=h-2*(k!==0||O!==0?k+O:Vn(u.left,u.right)):E=m-2*(A!==0||y!==0?A+y:Vn(u.top,u.bottom))}await l({...t,availableWidth:T,availableHeight:E});const x=await o.getDimensions(a.floating);return h!==x.width||m!==x.height?{reset:{rects:!0}}:{}}}};function Mh(){return typeof window<"u"}function el(e){return g1(e)?(e.nodeName||"").toLowerCase():"#document"}function jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(g1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function g1(e){return Mh()?e instanceof Node||e instanceof jn(e).Node:!1}function Ar(e){return Mh()?e instanceof Element||e instanceof jn(e).Element:!1}function Kr(e){return Mh()?e instanceof HTMLElement||e instanceof jn(e).HTMLElement:!1}function v_(e){return!Mh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jn(e).ShadowRoot}const lP=new Set(["inline","contents"]);function Bc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=kr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lP.has(i)}const cP=new Set(["table","td","th"]);function uP(e){return cP.has(el(e))}const dP=[":popover-open",":modal"];function Dh(e){return dP.some(t=>{try{return e.matches(t)}catch{return!1}})}const hP=["transform","translate","scale","rotate","perspective"],fP=["transform","translate","scale","rotate","perspective","filter"],pP=["paint","layout","strict","content"];function Lh(e){const t=Jv(),n=Ar(e)?kr(e):e;return hP.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fP.some(r=>(n.willChange||"").includes(r))||pP.some(r=>(n.contain||"").includes(r))}function mP(e){let t=vs(e);for(;Kr(t)&&!ka(t);){if(Lh(t))return t;if(Dh(t))return null;t=vs(t)}return null}function Jv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gP=new Set(["html","body","#document"]);function ka(e){return gP.has(el(e))}function kr(e){return jn(e).getComputedStyle(e)}function Vh(e){return Ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vs(e){if(el(e)==="html")return e;const t=e.assignedSlot||e.parentNode||v_(e)&&e.host||Xr(e);return v_(t)?t.host:t}function v1(e){const t=vs(e);return ka(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&Bc(t)?t:v1(t)}function Ta(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=v1(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=jn(i);if(s){const a=mg(o);return t.concat(o,o.visualViewport||[],Bc(i)?i:[],a&&n?Ta(a):[])}return t.concat(i,Ta(i,[],n))}function mg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function b1(e){const t=kr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Kr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Nd(n)!==s||Nd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function Yv(e){return Ar(e)?e:e.contextElement}function _a(e){const t=Yv(e);if(!Kr(t))return zr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=b1(t);let o=(s?Nd(n.width):n.width)/r,a=(s?Nd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const vP=zr(0);function y1(e){const t=jn(e);return!Jv()||!t.visualViewport?vP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jn(e)?!1:t}function no(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Yv(e);let o=zr(1);t&&(r?Ar(r)&&(o=_a(r)):o=_a(e));const a=bP(s,n,r)?y1(s):zr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const p=jn(s),f=r&&Ar(r)?jn(r):r;let h=p,m=mg(h);for(;m&&r&&f!==h;){const g=_a(m),v=m.getBoundingClientRect(),_=kr(m),b=v.left+(m.clientLeft+parseFloat(_.paddingLeft))*g.x,w=v.top+(m.clientTop+parseFloat(_.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=b,c+=w,h=jn(m),m=mg(h)}}return Dd({width:u,height:d,x:l,y:c})}function Bh(e,t){const n=Vh(e).scrollLeft;return t?t.left+n:no(Xr(e)).left+n}function _1(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bh(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function yP(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Xr(r),a=t?Dh(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=zr(1);const u=zr(0),d=Kr(r);if((d||!d&&!s)&&((el(r)!=="body"||Bc(o))&&(l=Vh(r)),Kr(r))){const f=no(r);c=_a(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const p=o&&!d&&!s?_1(o,l):zr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function _P(e){return Array.from(e.getClientRects())}function wP(e){const t=Xr(e),n=Vh(e),r=e.ownerDocument.body,i=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Bh(e);const a=-n.scrollTop;return kr(r).direction==="rtl"&&(o+=Vn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const b_=25;function SP(e,t){const n=jn(e),r=Xr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Jv();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=Bh(r);if(c<=0){const u=r.ownerDocument,d=u.body,p=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-f);h<=b_&&(s-=h)}else c<=b_&&(s+=c);return{width:s,height:o,x:a,y:l}}const EP=new Set(["absolute","fixed"]);function CP(e,t){const n=no(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Kr(e)?_a(e):zr(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function y_(e,t,n){let r;if(t==="viewport")r=SP(e,n);else if(t==="document")r=wP(Xr(e));else if(Ar(t))r=CP(t,n);else{const i=y1(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Dd(r)}function w1(e,t){const n=vs(e);return n===t||!Ar(n)||ka(n)?!1:kr(n).position==="fixed"||w1(n,t)}function xP(e,t){const n=t.get(e);if(n)return n;let r=Ta(e,[],!1).filter(a=>Ar(a)&&el(a)!=="body"),i=null;const s=kr(e).position==="fixed";let o=s?vs(e):e;for(;Ar(o)&&!ka(o);){const a=kr(o),l=Lh(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&EP.has(i.position)||Bc(o)&&!l&&w1(e,o))?r=r.filter(u=>u!==o):i=a,o=vs(o)}return t.set(e,r),r}function AP(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Dh(t)?[]:xP(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=y_(t,u,i);return c.top=Vn(d.top,c.top),c.right=ms(d.right,c.right),c.bottom=ms(d.bottom,c.bottom),c.left=Vn(d.left,c.left),c},y_(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kP(e){const{width:t,height:n}=b1(e);return{width:t,height:n}}function TP(e,t,n){const r=Kr(t),i=Xr(t),s=n==="fixed",o=no(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=zr(0);function c(){l.x=Bh(i)}if(r||!r&&!s)if((el(t)!=="body"||Bc(i))&&(a=Vh(t)),r){const f=no(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?_1(i,a):zr(0),d=o.left+a.scrollLeft-l.x-u.x,p=o.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:o.width,height:o.height}}function Zf(e){return kr(e).position==="static"}function __(e,t){if(!Kr(e)||kr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xr(e)===n&&(n=n.ownerDocument.body),n}function S1(e,t){const n=jn(e);if(Dh(e))return n;if(!Kr(e)){let i=vs(e);for(;i&&!ka(i);){if(Ar(i)&&!Zf(i))return i;i=vs(i)}return n}let r=__(e,t);for(;r&&uP(r)&&Zf(r);)r=__(r,t);return r&&ka(r)&&Zf(r)&&!Lh(r)?n:r||mP(e)||n}const $P=async function(e){const t=this.getOffsetParent||S1,n=this.getDimensions,r=await n(e.floating);return{reference:TP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function OP(e){return kr(e).direction==="rtl"}const ld={convertOffsetParentRelativeRectToViewportRelativeRect:yP,getDocumentElement:Xr,getClippingRect:AP,getOffsetParent:S1,getElementRects:$P,getClientRects:_P,getDimensions:kP,getScale:_a,isElement:Ar,isRTL:OP};function E1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function PP(e,t){let n=null,r;const i=Xr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(a||t(),!p||!f)return;const h=wu(d),m=wu(i.clientWidth-(u+p)),g=wu(i.clientHeight-(d+f)),v=wu(u),b={rootMargin:-h+"px "+-m+"px "+-g+"px "+-v+"px",threshold:Vn(0,ms(1,l))||1};let w=!0;function S(C){const E=C[0].intersectionRatio;if(E!==l){if(!w)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!E1(c,e.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return o(!0),s}function C1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Yv(e),u=i||s?[...c?Ta(c):[],...Ta(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?PP(c,n):null;let p=-1,f=null;o&&(f=new ResizeObserver(v=>{let[_]=v;_&&_.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let h,m=l?no(e):null;l&&g();function g(){const v=no(e);m&&!E1(m,v)&&n(),m=v,h=requestAnimationFrame(g)}return n(),()=>{var v;u.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),d?.(),(v=f)==null||v.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const x1=sP,A1=oP,k1=nP,w_=aP,RP=tP,T1=(e,t,n)=>{const r=new Map,i={platform:ld,...n},s={...i.platform,_c:r};return eP(e,t,{...i,platform:s})};function FP(e){return IP(e)}function ep(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}function IP(e){for(let t=e;t;t=ep(t))if(t instanceof Element&&getComputedStyle(t).display==="none")return null;for(let t=ep(e);t;t=ep(t)){if(!(t instanceof Element))continue;const n=getComputedStyle(t);if(n.display!=="contents"&&(n.position!=="static"||Lh(n)||t.tagName==="BODY"))return t}return null}var NP=`:host { --arrow-color: black; --arrow-size: var(--wa-tooltip-arrow-size); --show-duration: 100ms; @@ -189,23 +189,23 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q scale: 1; } } -`;function p_(e){return e!==null&&typeof e=="object"&&"getBoundingClientRect"in e&&("contextElement"in e?e instanceof Element:!0)}var vu=globalThis?.HTMLElement?.prototype.hasOwnProperty("popover"),Ze=class extends Pn{constructor(){super(...arguments),this.localize=new qa(this),this.active=!1,this.placement="top",this.boundary="viewport",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom");let r=0,i=0,s=0,o=0,a=0,l=0,c=0,u=0;n?e.top{this.reposition()}))}async stop(){return new Promise(e=>{this.popup.hidePopover?.(),this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[oE({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(f_({apply:({rects:r})=>{const i=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=i?`${r.reference.width}px`:"",this.popup.style.height=s?`${r.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height="");let t;vu&&!p_(this.anchor)&&this.boundary==="scroll"&&(t=Sa(this.anchorEl).filter(r=>r instanceof Element)),this.flip&&e.push(lE({boundary:this.flipBoundary||t,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(aE({boundary:this.shiftBoundary||t,padding:this.shiftPadding})),this.autoSize?e.push(f_({boundary:this.autoSizeBoundary||t,padding:this.autoSizePadding,apply:({availableWidth:r,availableHeight:i})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${i}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${r}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(g$({element:this.arrowEl,padding:this.arrowPadding}));const n=vu?r=>Qu.getOffsetParent(r,v$):Qu.getOffsetParent;cE(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:vu?"absolute":"fixed",platform:{...Qu,getOffsetParent:n}}).then(({x:r,y:i,middlewareData:s,placement:o})=>{const a=this.localize.dir()==="rtl",l={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${r}px`,top:`${i}px`}),this.arrow){const c=s.arrow.x,u=s.arrow.y;let d="",p="",f="",h="";if(this.arrowPlacement==="start"){const m=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";d=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",p=a?m:"",h=a?"":m}else if(this.arrowPlacement==="end"){const m=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";p=a?"":m,h=a?m:"",f=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(h=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",d=typeof u=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(h=typeof c=="number"?`${c}px`:"",d=typeof u=="number"?`${u}px`:"");Object.assign(this.arrowEl.style,{top:d,right:p,bottom:f,left:h,[l]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.dispatchEvent(new AP)}render(){return J` +`;function S_(e){return e!==null&&typeof e=="object"&&"getBoundingClientRect"in e&&("contextElement"in e?e instanceof Element:!0)}var Su=globalThis?.HTMLElement?.prototype.hasOwnProperty("popover"),Ze=class extends Rn{constructor(){super(...arguments),this.localize=new Xa(this),this.active=!1,this.placement="top",this.boundary="viewport",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom");let r=0,i=0,s=0,o=0,a=0,l=0,c=0,u=0;n?e.top{this.reposition()}))}async stop(){return new Promise(e=>{this.popup.hidePopover?.(),this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>e())):e()})}reposition(){if(!this.active||!this.anchorEl)return;const e=[x1({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?e.push(w_({apply:({rects:r})=>{const i=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.width=i?`${r.reference.width}px`:"",this.popup.style.height=s?`${r.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height="");let t;Su&&!S_(this.anchor)&&this.boundary==="scroll"&&(t=Ta(this.anchorEl).filter(r=>r instanceof Element)),this.flip&&e.push(k1({boundary:this.flipBoundary||t,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&e.push(A1({boundary:this.shiftBoundary||t,padding:this.shiftPadding})),this.autoSize?e.push(w_({boundary:this.autoSizeBoundary||t,padding:this.autoSizePadding,apply:({availableWidth:r,availableHeight:i})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${i}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${r}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(RP({element:this.arrowEl,padding:this.arrowPadding}));const n=Su?r=>ld.getOffsetParent(r,FP):ld.getOffsetParent;T1(this.anchorEl,this.popup,{placement:this.placement,middleware:e,strategy:Su?"absolute":"fixed",platform:{...ld,getOffsetParent:n}}).then(({x:r,y:i,middlewareData:s,placement:o})=>{const a=this.localize.dir()==="rtl",l={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${r}px`,top:`${i}px`}),this.arrow){const c=s.arrow.x,u=s.arrow.y;let d="",p="",f="",h="";if(this.arrowPlacement==="start"){const m=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";d=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",p=a?m:"",h=a?"":m}else if(this.arrowPlacement==="end"){const m=typeof c=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";p=a?"":m,h=a?m:"",f=typeof u=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(h=typeof c=="number"?"calc(50% - var(--arrow-size-diagonal))":"",d=typeof u=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(h=typeof c=="number"?`${c}px`:"",d=typeof u=="number"?`${u}px`:"");Object.assign(this.arrowEl.style,{top:d,right:p,bottom:f,left:h,[l]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.dispatchEvent(new jO)}render(){return J`
${this.arrow?J``:""}
- `}};Ze.css=y$;z([pt(".popup")],Ze.prototype,"popup",2);z([pt(".arrow")],Ze.prototype,"arrowEl",2);z([V()],Ze.prototype,"anchor",2);z([V({type:Boolean,reflect:!0})],Ze.prototype,"active",2);z([V({reflect:!0})],Ze.prototype,"placement",2);z([V()],Ze.prototype,"boundary",2);z([V({type:Number})],Ze.prototype,"distance",2);z([V({type:Number})],Ze.prototype,"skidding",2);z([V({type:Boolean})],Ze.prototype,"arrow",2);z([V({attribute:"arrow-placement"})],Ze.prototype,"arrowPlacement",2);z([V({attribute:"arrow-padding",type:Number})],Ze.prototype,"arrowPadding",2);z([V({type:Boolean})],Ze.prototype,"flip",2);z([V({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],Ze.prototype,"flipFallbackPlacements",2);z([V({attribute:"flip-fallback-strategy"})],Ze.prototype,"flipFallbackStrategy",2);z([V({type:Object})],Ze.prototype,"flipBoundary",2);z([V({attribute:"flip-padding",type:Number})],Ze.prototype,"flipPadding",2);z([V({type:Boolean})],Ze.prototype,"shift",2);z([V({type:Object})],Ze.prototype,"shiftBoundary",2);z([V({attribute:"shift-padding",type:Number})],Ze.prototype,"shiftPadding",2);z([V({attribute:"auto-size"})],Ze.prototype,"autoSize",2);z([V()],Ze.prototype,"sync",2);z([V({type:Object})],Ze.prototype,"autoSizeBoundary",2);z([V({attribute:"auto-size-padding",type:Number})],Ze.prototype,"autoSizePadding",2);z([V({attribute:"hover-bridge",type:Boolean})],Ze.prototype,"hoverBridge",2);Ze=z([kr("wa-popup")],Ze);var $c=class extends Event{constructor(){super("wa-after-hide",{bubbles:!0,cancelable:!1,composed:!0})}},Rc=class extends Event{constructor(){super("wa-after-show",{bubbles:!0,cancelable:!1,composed:!0})}},Fc=class extends Event{constructor(e){super("wa-hide",{bubbles:!0,cancelable:!0,composed:!0}),this.detail=e}},Ic=class extends Event{constructor(){super("wa-show",{bubbles:!0,cancelable:!0,composed:!0})}};const _$="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let w$=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=_$[n[e]&63];return t};function Hv(e=""){return`${e}${w$()}`}function kd(e,t){return new Promise(n=>{function r(i){i.target===e&&(e.removeEventListener(t,r),n())}e.addEventListener(t,r)})}function nn(e,t){return new Promise(n=>{const r=new AbortController,{signal:i}=r;if(e.classList.contains(t))return;e.classList.remove(t),e.classList.add(t);let s=()=>{e.classList.remove(t),n(),r.abort()};e.addEventListener("animationend",s,{once:!0,signal:i}),e.addEventListener("animationcancel",s,{once:!0,signal:i})})}function Kn(e,t){const n={waitUntilFirstUpdate:!1,...t};return(r,i)=>{const{update:s}=r,o=Array.isArray(e)?e:[e];r.update=function(a){o.forEach(l=>{const c=l;if(a.has(c)){const u=a.get(c),d=this[c];u!==d&&(!n.waitUntilFirstUpdate||this.hasUpdated)&&this[i](u,d)}}),s.call(this,a)}}}var S$=`:host { + `}};Ze.css=NP;z([pt(".popup")],Ze.prototype,"popup",2);z([pt(".arrow")],Ze.prototype,"arrowEl",2);z([V()],Ze.prototype,"anchor",2);z([V({type:Boolean,reflect:!0})],Ze.prototype,"active",2);z([V({reflect:!0})],Ze.prototype,"placement",2);z([V()],Ze.prototype,"boundary",2);z([V({type:Number})],Ze.prototype,"distance",2);z([V({type:Number})],Ze.prototype,"skidding",2);z([V({type:Boolean})],Ze.prototype,"arrow",2);z([V({attribute:"arrow-placement"})],Ze.prototype,"arrowPlacement",2);z([V({attribute:"arrow-padding",type:Number})],Ze.prototype,"arrowPadding",2);z([V({type:Boolean})],Ze.prototype,"flip",2);z([V({attribute:"flip-fallback-placements",converter:{fromAttribute:e=>e.split(" ").map(t=>t.trim()).filter(t=>t!==""),toAttribute:e=>e.join(" ")}})],Ze.prototype,"flipFallbackPlacements",2);z([V({attribute:"flip-fallback-strategy"})],Ze.prototype,"flipFallbackStrategy",2);z([V({type:Object})],Ze.prototype,"flipBoundary",2);z([V({attribute:"flip-padding",type:Number})],Ze.prototype,"flipPadding",2);z([V({type:Boolean})],Ze.prototype,"shift",2);z([V({type:Object})],Ze.prototype,"shiftBoundary",2);z([V({attribute:"shift-padding",type:Number})],Ze.prototype,"shiftPadding",2);z([V({attribute:"auto-size"})],Ze.prototype,"autoSize",2);z([V()],Ze.prototype,"sync",2);z([V({type:Object})],Ze.prototype,"autoSizeBoundary",2);z([V({attribute:"auto-size-padding",type:Number})],Ze.prototype,"autoSizePadding",2);z([V({attribute:"hover-bridge",type:Boolean})],Ze.prototype,"hoverBridge",2);Ze=z([Rr("wa-popup")],Ze);var Uc=class extends Event{constructor(){super("wa-after-hide",{bubbles:!0,cancelable:!1,composed:!0})}},jc=class extends Event{constructor(){super("wa-after-show",{bubbles:!0,cancelable:!1,composed:!0})}},Hc=class extends Event{constructor(e){super("wa-hide",{bubbles:!0,cancelable:!0,composed:!0}),this.detail=e}},zc=class extends Event{constructor(){super("wa-show",{bubbles:!0,cancelable:!0,composed:!0})}};const MP="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let DP=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=MP[n[e]&63];return t};function Xv(e=""){return`${e}${DP()}`}function Ld(e,t){return new Promise(n=>{function r(i){i.target===e&&(e.removeEventListener(t,r),n())}e.addEventListener(t,r)})}function rn(e,t){return new Promise(n=>{const r=new AbortController,{signal:i}=r;if(e.classList.contains(t))return;e.classList.remove(t),e.classList.add(t);let s=()=>{e.classList.remove(t),n(),r.abort()};e.addEventListener("animationend",s,{once:!0,signal:i}),e.addEventListener("animationcancel",s,{once:!0,signal:i})})}function Jn(e,t){const n={waitUntilFirstUpdate:!1,...t};return(r,i)=>{const{update:s}=r,o=Array.isArray(e)?e:[e];r.update=function(a){o.forEach(l=>{const c=l;if(a.has(c)){const u=a.get(c),d=this[c];u!==d&&(!n.waitUntilFirstUpdate||this.hasUpdated)&&this[i](u,d)}}),s.call(this,a)}}}var LP=`:host { --max-width: 30ch; /** These styles are added so we don't interfere in the DOM. */ @@ -261,14 +261,14 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q border-bottom: var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color); border-right: var(--wa-tooltip-border-width) var(--wa-tooltip-border-style) var(--wa-tooltip-border-color); } -`,ft=class extends Pn{constructor(){super(...arguments),this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.showDelay=150,this.hideDelay=0,this.trigger="hover focus",this.withoutArrow=!1,this.for=null,this.anchor=null,this.eventController=new AbortController,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&(e.stopPropagation(),this.hide())},this.handleMouseOver=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseOut=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),this.hideDelay))}}connectedCallback(){super.connectedCallback(),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.open&&(this.open=!1,this.updateComplete.then(()=>{this.open=!0})),this.id||(this.id=Hv("wa-tooltip-")),this.for&&this.anchor?(this.anchor=null,this.handleForChange()):this.for&&this.handleForChange()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.eventController.abort(),this.anchor&&this.removeFromAriaLabelledBy(this.anchor,this.id)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(e){return this.trigger.split(" ").includes(e)}addToAriaLabelledBy(e,t){const r=(e.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean);r.includes(t)||(r.push(t),e.setAttribute("aria-labelledby",r.join(" ")))}removeFromAriaLabelledBy(e,t){const i=(e.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean).filter(s=>s!==t);i.length>0?e.setAttribute("aria-labelledby",i.join(" ")):e.removeAttribute("aria-labelledby")}async handleOpenChange(){if(this.open){if(this.disabled)return;const e=new Ic;if(this.dispatchEvent(e),e.defaultPrevented){this.open=!1;return}document.addEventListener("keydown",this.handleDocumentKeyDown,{signal:this.eventController.signal}),this.body.hidden=!1,this.popup.active=!0,await nn(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new Rc)}else{const e=new Fc;if(this.dispatchEvent(e),e.defaultPrevented){this.open=!1;return}document.removeEventListener("keydown",this.handleDocumentKeyDown),await nn(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.body.hidden=!0,this.dispatchEvent(new $c)}}handleForChange(){const e=this.getRootNode();if(!e)return;const t=this.for?e.getElementById(this.for):null,n=this.anchor;if(t===n)return;const{signal:r}=this.eventController;t&&(this.addToAriaLabelledBy(t,this.id),t.addEventListener("blur",this.handleBlur,{capture:!0,signal:r}),t.addEventListener("focus",this.handleFocus,{capture:!0,signal:r}),t.addEventListener("click",this.handleClick,{signal:r}),t.addEventListener("mouseover",this.handleMouseOver,{signal:r}),t.addEventListener("mouseout",this.handleMouseOut,{signal:r})),n&&(this.removeFromAriaLabelledBy(n,this.id),n.removeEventListener("blur",this.handleBlur,{capture:!0}),n.removeEventListener("focus",this.handleFocus,{capture:!0}),n.removeEventListener("click",this.handleClick),n.removeEventListener("mouseover",this.handleMouseOver),n.removeEventListener("mouseout",this.handleMouseOut)),this.anchor=t}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,kd(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,kd(this,"wa-after-hide")}render(){return J` +`,mt=class extends Rn{constructor(){super(...arguments),this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.showDelay=150,this.hideDelay=0,this.trigger="hover focus",this.withoutArrow=!1,this.for=null,this.anchor=null,this.eventController=new AbortController,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&(e.stopPropagation(),this.hide())},this.handleMouseOver=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),this.showDelay))},this.handleMouseOut=()=>{this.hasTrigger("hover")&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),this.hideDelay))}}connectedCallback(){super.connectedCallback(),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.open&&(this.open=!1,this.updateComplete.then(()=>{this.open=!0})),this.id||(this.id=Xv("wa-tooltip-")),this.for&&this.anchor?(this.anchor=null,this.handleForChange()):this.for&&this.handleForChange()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.eventController.abort(),this.anchor&&this.removeFromAriaLabelledBy(this.anchor,this.id)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(e){return this.trigger.split(" ").includes(e)}addToAriaLabelledBy(e,t){const r=(e.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean);r.includes(t)||(r.push(t),e.setAttribute("aria-labelledby",r.join(" ")))}removeFromAriaLabelledBy(e,t){const i=(e.getAttribute("aria-labelledby")||"").split(/\s+/).filter(Boolean).filter(s=>s!==t);i.length>0?e.setAttribute("aria-labelledby",i.join(" ")):e.removeAttribute("aria-labelledby")}async handleOpenChange(){if(this.open){if(this.disabled)return;const e=new zc;if(this.dispatchEvent(e),e.defaultPrevented){this.open=!1;return}document.addEventListener("keydown",this.handleDocumentKeyDown,{signal:this.eventController.signal}),this.body.hidden=!1,this.popup.active=!0,await rn(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new jc)}else{const e=new Hc;if(this.dispatchEvent(e),e.defaultPrevented){this.open=!1;return}document.removeEventListener("keydown",this.handleDocumentKeyDown),await rn(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.body.hidden=!0,this.dispatchEvent(new Uc)}}handleForChange(){const e=this.getRootNode();if(!e)return;const t=this.for?e.getElementById(this.for):null,n=this.anchor;if(t===n)return;const{signal:r}=this.eventController;t&&(this.addToAriaLabelledBy(t,this.id),t.addEventListener("blur",this.handleBlur,{capture:!0,signal:r}),t.addEventListener("focus",this.handleFocus,{capture:!0,signal:r}),t.addEventListener("click",this.handleClick,{signal:r}),t.addEventListener("mouseover",this.handleMouseOver,{signal:r}),t.addEventListener("mouseout",this.handleMouseOut,{signal:r})),n&&(this.removeFromAriaLabelledBy(n,this.id),n.removeEventListener("blur",this.handleBlur,{capture:!0}),n.removeEventListener("focus",this.handleFocus,{capture:!0}),n.removeEventListener("click",this.handleClick),n.removeEventListener("mouseover",this.handleMouseOver),n.removeEventListener("mouseout",this.handleMouseOut)),this.anchor=t}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Ld(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,Ld(this,"wa-after-hide")}render(){return J`
- `}};ft.css=S$;ft.dependencies={"wa-popup":Ze};z([pt("slot:not([name])")],ft.prototype,"defaultSlot",2);z([pt(".body")],ft.prototype,"body",2);z([pt("wa-popup")],ft.prototype,"popup",2);z([V()],ft.prototype,"placement",2);z([V({type:Boolean,reflect:!0})],ft.prototype,"disabled",2);z([V({type:Number})],ft.prototype,"distance",2);z([V({type:Boolean,reflect:!0})],ft.prototype,"open",2);z([V({type:Number})],ft.prototype,"skidding",2);z([V({attribute:"show-delay",type:Number})],ft.prototype,"showDelay",2);z([V({attribute:"hide-delay",type:Number})],ft.prototype,"hideDelay",2);z([V()],ft.prototype,"trigger",2);z([V({attribute:"without-arrow",type:Boolean,reflect:!0})],ft.prototype,"withoutArrow",2);z([V()],ft.prototype,"for",2);z([On()],ft.prototype,"anchor",2);z([Kn("open",{waitUntilFirstUpdate:!0})],ft.prototype,"handleOpenChange",1);z([Kn("for")],ft.prototype,"handleForChange",1);z([Kn(["distance","placement","skidding"])],ft.prototype,"handleOptionsChange",1);z([Kn("disabled")],ft.prototype,"handleDisabledChange",1);ft=z([kr("wa-tooltip")],ft);var E$=class extends ft{static get styles(){return[ft.styles,ue` + `}};mt.css=LP;mt.dependencies={"wa-popup":Ze};z([pt("slot:not([name])")],mt.prototype,"defaultSlot",2);z([pt(".body")],mt.prototype,"body",2);z([pt("wa-popup")],mt.prototype,"popup",2);z([V()],mt.prototype,"placement",2);z([V({type:Boolean,reflect:!0})],mt.prototype,"disabled",2);z([V({type:Number})],mt.prototype,"distance",2);z([V({type:Boolean,reflect:!0})],mt.prototype,"open",2);z([V({type:Number})],mt.prototype,"skidding",2);z([V({attribute:"show-delay",type:Number})],mt.prototype,"showDelay",2);z([V({attribute:"hide-delay",type:Number})],mt.prototype,"hideDelay",2);z([V()],mt.prototype,"trigger",2);z([V({attribute:"without-arrow",type:Boolean,reflect:!0})],mt.prototype,"withoutArrow",2);z([V()],mt.prototype,"for",2);z([yn()],mt.prototype,"anchor",2);z([Jn("open",{waitUntilFirstUpdate:!0})],mt.prototype,"handleOpenChange",1);z([Jn("for")],mt.prototype,"handleForChange",1);z([Jn(["distance","placement","skidding"])],mt.prototype,"handleOptionsChange",1);z([Jn("disabled")],mt.prototype,"handleDisabledChange",1);mt=z([Rr("wa-tooltip")],mt);var VP=class extends mt{static get styles(){return[mt.styles,ue` :host { --wa-z-index-tooltip: var(--c-tooltip-z-index, 1000); --wa-tooltip-background-color: var( @@ -311,7 +311,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q var(--c-radius-sm) ); } - `]}};customElements.get("c-tooltip")||customElements.define("c-tooltip",E$);var C$=ue` + `]}};customElements.get("c-tooltip")||customElements.define("c-tooltip",VP);var BP=ue` :host(:not(:focus-within)) { position: absolute !important; width: 1px !important; @@ -323,7 +323,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q white-space: nowrap !important; padding: 0 !important; } -`,x$=ue` +`,UP=ue` :host { box-sizing: border-box; } @@ -337,7 +337,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q [hidden] { display: none !important; } -`,uE=Object.defineProperty,m_=Object.getOwnPropertySymbols,A$=Object.prototype.hasOwnProperty,k$=Object.prototype.propertyIsEnumerable,dE=e=>{throw TypeError(e)},g_=(e,t,n)=>t in e?uE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T$=(e,t)=>{for(var n in t||(t={}))A$.call(t,n)&&g_(e,n,t[n]);if(m_)for(var n of m_(t))k$.call(t,n)&&g_(e,n,t[n]);return e},hE=(e,t,n,r)=>{for(var i=void 0,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(t,n,i)||i);return i&&uE(t,n,i),i},fE=(e,t,n)=>t.has(e)||dE("Cannot "+n),O$=(e,t,n)=>(fE(e,t,"read from private field"),t.get(e)),P$=(e,t,n)=>t.has(e)?dE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$$=(e,t,n,r)=>(fE(e,t,"write to private field"),t.set(e,n),n),Zu,Nc=class extends Me{constructor(){super(),P$(this,Zu,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}emit(e,t){const n=new CustomEvent(e,T$({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(n),n}static define(e,t=this,n={}){const r=customElements.get(e);if(!r){try{customElements.define(e,t,n)}catch{customElements.define(e,class extends t{},n)}return}let i=" (unknown version)",s=i;"version"in t&&t.version&&(i=" v"+t.version),"version"in r&&r.version&&(s=" v"+r.version),!(i&&s&&i===s)&&console.warn(`Attempted to register <${e}>${i}, but <${e}>${s} has already been registered.`)}attributeChangedCallback(e,t,n){O$(this,Zu)||(this.constructor.elementProperties.forEach((r,i)=>{r.reflect&&this[i]!=null&&this.initialReflectedProperties.set(i,this[i])}),$$(this,Zu,!0)),super.attributeChangedCallback(e,t,n)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,n)=>{e.has(n)&&this[n]==null&&(this[n]=t)})}};Zu=new WeakMap;Nc.version="2.20.1";Nc.dependencies={};hE([V()],Nc.prototype,"dir");hE([V()],Nc.prototype,"lang");var pE=class extends Nc{render(){return J` `}};pE.styles=[x$,C$];pE.define("sl-visually-hidden");var R$=ue` +`,$1=Object.defineProperty,E_=Object.getOwnPropertySymbols,jP=Object.prototype.hasOwnProperty,HP=Object.prototype.propertyIsEnumerable,O1=e=>{throw TypeError(e)},C_=(e,t,n)=>t in e?$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zP=(e,t)=>{for(var n in t||(t={}))jP.call(t,n)&&C_(e,n,t[n]);if(E_)for(var n of E_(t))HP.call(t,n)&&C_(e,n,t[n]);return e},x_=(e,t,n,r)=>{for(var i=void 0,s=e.length-1,o;s>=0;s--)(o=e[s])&&(i=o(t,n,i)||i);return i&&$1(t,n,i),i},P1=(e,t,n)=>t.has(e)||O1("Cannot "+n),qP=(e,t,n)=>(P1(e,t,"read from private field"),t.get(e)),WP=(e,t,n)=>t.has(e)?O1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),KP=(e,t,n,r)=>(P1(e,t,"write to private field"),t.set(e,n),n),cd,Ol=class extends Me{constructor(){super(),WP(this,cd,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach(([t,n])=>{this.constructor.define(t,n)})}emit(t,n){let r=new CustomEvent(t,zP({bubbles:!0,cancelable:!1,composed:!0,detail:{}},n));return this.dispatchEvent(r),r}static define(t,n=this,r={}){let i=customElements.get(t);if(!i){try{customElements.define(t,n,r)}catch{customElements.define(t,class extends n{},r)}return}let s=" (unknown version)",o=s;"version"in n&&n.version&&(s=" v"+n.version),"version"in i&&i.version&&(o=" v"+i.version),!(s&&o&&s===o)&&console.warn(`Attempted to register <${t}>${s}, but <${t}>${o} has already been registered.`)}attributeChangedCallback(t,n,r){qP(this,cd)||(this.constructor.elementProperties.forEach((i,s)=>{i.reflect&&this[s]!=null&&this.initialReflectedProperties.set(s,this[s])}),KP(this,cd,!0)),super.attributeChangedCallback(t,n,r)}willUpdate(t){super.willUpdate(t),this.initialReflectedProperties.forEach((n,r)=>{t.has(r)&&this[r]==null&&(this[r]=n)})}};cd=new WeakMap,Ol.version="2.20.1",Ol.dependencies={},x_([V()],Ol.prototype,"dir"),x_([V()],Ol.prototype,"lang");var A_=class extends Ol{render(){return J` `}};A_.styles=[UP,BP],A_.define("sl-visually-hidden");var GP=ue` :host { display: inline-block; } @@ -355,7 +355,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q border: none; cursor: pointer; } -`,Mc=class extends Me{constructor(...e){super(...e),this.isCopying=!1,this.value="",this.disabled=!1}async copyValue(){if(!(this.isCopying||this.disabled)){this.isCopying=!0;try{await navigator.clipboard.writeText(this.value),this.dispatchEvent(new CustomEvent("craft-copy",{bubbles:!0,cancelable:!1,composed:!0,detail:{value:this.value}}))}catch{this.dispatchEvent(new CustomEvent("craft-error",{cancelable:!1,composed:!0,bubbles:!0}))}finally{this.isCopying=!1}}}render(){return J` +`,hl=class extends Me{constructor(...t){super(...t),this.isCopying=!1,this.value="",this.disabled=!1}async copyValue(){if(!(this.isCopying||this.disabled)){this.isCopying=!0;try{await navigator.clipboard.writeText(this.value),this.dispatchEvent(new CustomEvent("craft-copy",{bubbles:!0,cancelable:!1,composed:!0,detail:{value:this.value}}))}catch{this.dispatchEvent(new CustomEvent("craft-error",{cancelable:!1,composed:!0,bubbles:!0}))}finally{this.isCopying=!1}}}render(){return J` - `}};Mc.styles=[R$];se([On()],Mc.prototype,"isCopying",void 0);se([V({type:String})],Mc.prototype,"value",void 0);se([V({type:Boolean})],Mc.prototype,"disabled",void 0);customElements.get("craft-copy-button")||customElements.define("craft-copy-button",Mc);var F$=ue` + `}};hl.styles=[GP],se([yn()],hl.prototype,"isCopying",void 0),se([V({type:String})],hl.prototype,"value",void 0),se([V({type:Boolean})],hl.prototype,"disabled",void 0),customElements.get("craft-copy-button")||customElements.define("craft-copy-button",hl);var JP=ue` :host { box-sizing: border-box; } @@ -380,7 +380,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q [hidden] { display: none !important; } -`,I$=ue` +`,YP=ue` :host { --craft-tooltip-font-size: calc(12rem / 16); display: inline-block; @@ -452,12 +452,12 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q width: 100%; height: 100%; } -`;const Ni={"icon.in":{keyframes:[{scale:.25,opacity:.25},{scale:1,opacity:1}],options:{duration:100}},"icon.out":{keyframes:[{scale:1,opacity:1},{scale:.25,opacity:.25}],options:{duration:100}}};var Tr=class extends Me{constructor(){super(),this.status="rest",this.value="",this.disabled=!1,this.feedbackDuration=1e3,this.tooltipLabel="Copy",this.addEventListener("craft-copy",()=>{this.showStatus("success")}),this.addEventListener("craft-error",()=>{this.showStatus("error")})}getId(){return`attribute-${this.value.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`}async showStatus(e){const t=e==="success"?this.successIconEl:this.errorIconEl;this.tooltipLabel=e==="success"?"Copied":"Copy failed",await t.animate(Ni["icon.out"].keyframes,Ni["icon.out"].options),this.copyIconEl.hidden=!0,t.hidden=!1,await t.animate(Ni["icon.in"].keyframes,Ni["icon.in"].options),this.status=e,setTimeout(async()=>{await t.animate(Ni["icon.out"].keyframes,Ni["icon.out"].options),t.hidden=!0,this.copyIconEl.hidden=!1,await this.copyIconEl.animate(Ni["icon.in"].keyframes,Ni["icon.in"].options),this.status="rest",this.tooltipLabel="Copy"},this.feedbackDuration)}render(){return J` +`;const Vi={"icon.in":{keyframes:[{scale:.25,opacity:.25},{scale:1,opacity:1}],options:{duration:100}},"icon.out":{keyframes:[{scale:1,opacity:1},{scale:.25,opacity:.25}],options:{duration:100}}};var pr=class extends Me{constructor(){super(),this.status="rest",this.value="",this.disabled=!1,this.feedbackDuration=1e3,this.tooltipLabel="Copy",this.addEventListener("craft-copy",()=>{this.showStatus("success")}),this.addEventListener("craft-error",()=>{this.showStatus("error")})}getId(){return`attribute-${this.value.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}`}async showStatus(t){let n=t==="success"?this.successIconEl:this.errorIconEl;this.tooltipLabel=t==="success"?"Copied":"Copy failed",await n.animate(Vi["icon.out"].keyframes,Vi["icon.out"].options),this.copyIconEl.hidden=!0,n.hidden=!1,await n.animate(Vi["icon.in"].keyframes,Vi["icon.in"].options),this.status=t,setTimeout(async()=>{await n.animate(Vi["icon.out"].keyframes,Vi["icon.out"].options),n.hidden=!0,this.copyIconEl.hidden=!1,await this.copyIconEl.animate(Vi["icon.in"].keyframes,Vi["icon.in"].options),this.status="rest",this.tooltipLabel="Copy"},this.feedbackDuration)}render(){return J` ${this.tooltipLabel} ${this.value} @@ -479,8 +479,8 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q - `}};Tr.styles=[F$,I$];se([On()],Tr.prototype,"status",void 0);se([pt('slot[name="copy-icon"]')],Tr.prototype,"copyIconEl",void 0);se([pt('slot[name="success-icon"]')],Tr.prototype,"successIconEl",void 0);se([pt('slot[name="error-icon"]')],Tr.prototype,"errorIconEl",void 0);se([pt("craft-copy-button")],Tr.prototype,"copyButtonEl",void 0);se([V({type:String})],Tr.prototype,"value",void 0);se([V({type:Boolean,reflect:!0})],Tr.prototype,"disabled",void 0);se([V({attribute:"feedback-duration",type:Number})],Tr.prototype,"feedbackDuration",void 0);se([V({reflect:!1})],Tr.prototype,"tooltipLabel",void 0);customElements.get("craft-copy-attribute")||customElements.define("craft-copy-attribute",Tr);const mE=new WeakMap;function N$(e,t){let n=t;for(;n;){if(mE.get(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function gt(e){return t=>{if(N$(e,t))return t;const n=e(t);return mE.set(n,e),n}}const M$=e=>class extends e{static get properties(){return{disabled:{type:Boolean,reflect:!0}}}constructor(){super(),this._requestedToBeDisabled=!1,this.__isUserSettingDisabled=!0,this.__restoreDisabledTo=!1,this.disabled=!1}makeRequestToBeDisabled(){this._requestedToBeDisabled===!1&&(this._requestedToBeDisabled=!0,this.__restoreDisabledTo=this.disabled,this.__internalSetDisabled(!0))}retractRequestToBeDisabled(){this._requestedToBeDisabled===!0&&(this._requestedToBeDisabled=!1,this.__internalSetDisabled(this.__restoreDisabledTo))}__internalSetDisabled(t){this.__isUserSettingDisabled=!1,this.disabled=t,this.__isUserSettingDisabled=!0}requestUpdate(t,n,r){super.requestUpdate(t,n,r),t==="disabled"&&(this.__isUserSettingDisabled&&(this.__restoreDisabledTo=this.disabled),this.disabled===!1&&this._requestedToBeDisabled===!0&&this.__internalSetDisabled(!0))}click(){this.disabled||super.click()}},Dc=gt(M$),D$=e=>class extends Dc(e){static get properties(){return{tabIndex:{type:Number,reflect:!0,attribute:"tabindex"}}}constructor(){super(),this.__isUserSettingTabIndex=!0,this.__restoreTabIndexTo=0,this.__internalSetTabIndex(0)}makeRequestToBeDisabled(){super.makeRequestToBeDisabled(),this._requestedToBeDisabled===!1&&this.tabIndex!=null&&(this.__restoreTabIndexTo=this.tabIndex)}retractRequestToBeDisabled(){super.retractRequestToBeDisabled(),this._requestedToBeDisabled===!0&&this.__internalSetTabIndex(this.__restoreTabIndexTo)}static enabledWarnings=super.enabledWarnings?.filter(t=>t!=="change-in-update")||[];__internalSetTabIndex(t){this.__isUserSettingTabIndex=!1,this.tabIndex=t,this.__isUserSettingTabIndex=!0}requestUpdate(t,n,r){super.requestUpdate(t,n,r),t==="disabled"&&(this.disabled?this.__internalSetTabIndex(-1):this.__internalSetTabIndex(this.__restoreTabIndexTo)),t==="tabIndex"&&(this.__isUserSettingTabIndex&&this.tabIndex!=null&&(this.__restoreTabIndexTo=this.tabIndex),this.tabIndex!==-1&&this._requestedToBeDisabled===!0&&this.__internalSetTabIndex(-1))}firstUpdated(t){super.firstUpdated(t),this.disabled&&this.__internalSetTabIndex(-1)}},gE=gt(D$);const{I:L$}=_P,V$=e=>e===null||typeof e!="object"&&typeof e!="function",vE=(e,t)=>e?._$litType$!==void 0,B$=e=>e.strings===void 0,v_=()=>document.createComment(""),cl=(e,t,n)=>{const r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0){const s=r.insertBefore(v_(),i),o=r.insertBefore(v_(),i);n=new L$(s,o,e,e.options)}else{const s=n._$AB.nextSibling,o=n._$AM,a=o!==e;if(a){let l;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(l=e._$AU)!==o._$AU&&n._$AP(l)}if(s!==i||a){let l=n._$AA;for(;l!==s;){const c=l.nextSibling;r.insertBefore(l,i),l=c}}}return n},Cs=(e,t,n=e)=>(e._$AI(t,n),e),U$={},H$=(e,t=U$)=>e._$AH=t,j$=e=>e._$AH,Jf=e=>{e._$AR(),e._$AA.remove()};function z$(e){return e instanceof Node?"node":vE(e)?"template-result":!Array.isArray(e)&&typeof e=="object"&&"template"in e?"slot-rerender-object":null}const q$=e=>class extends e{get slots(){return{}}constructor(){super(),this.__renderMetaPerSlot=new Map,this.__slotsThatNeedRerender=new Set,this.__slotsProvidedByUserOnFirstConnected=new Set,this.__privateSlots=new Set}connectedCallback(){super.connectedCallback(),this._connectSlotMixin()}__rerenderSlot(n){const r=this.slots[n]();this.__renderTemplateInScopedContext({renderAsDirectHostChild:r.renderAsDirectHostChild,template:r.template,slotName:n}),r.afterRender?.()}update(n){super.update(n);for(const r of this.__slotsThatNeedRerender)this.__rerenderSlot(r)}__renderTemplateInScopedContext({template:n,slotName:r,renderAsDirectHostChild:i}){if(!this.__renderMetaPerSlot.has(r)){const p=!!ShadowRoot.prototype.createElement;this.shadowRoot||console.error("[SlotMixin] No shadowRoot was found");const m=(p?this.shadowRoot:document).createElement("div"),g=document.createComment(`_start_slot_${r}_`),b=document.createComment(`_end_slot_${r}_`);m.appendChild(g),m.appendChild(b);const{creationScope:_,host:v}=this.renderOptions;if(ig(n,m,{renderBefore:b,creationScope:_,host:v}),i){const w=Array.from(m.childNodes);this.__appendNodes({nodes:w,renderParent:this,slotName:r})}else m.slot=r,this.appendChild(m);this.__renderMetaPerSlot.set(r,{renderTargetThatRespectsShadowRootScoping:m,renderBefore:b});return}const{renderBefore:o,renderTargetThatRespectsShadowRootScoping:a}=this.__renderMetaPerSlot.get(r),l=i?this:a,{creationScope:c,host:u}=this.renderOptions;ig(n,l,{creationScope:c,host:u,renderBefore:o}),i&&o.previousElementSibling&&!o.previousElementSibling.slot&&(o.previousElementSibling.slot=r)}__appendNodes({nodes:n,renderParent:r=this,slotName:i}){for(const s of n)s instanceof Element&&i&&i!==""&&s.setAttribute("slot",i),r.appendChild(s)}__initSlots(n){for(const r of n){if(this.__slotsProvidedByUserOnFirstConnected.has(r))continue;const i=this.slots[r]();if(i===void 0)continue;switch(this.__isConnectedSlotMixin||this.__privateSlots.add(r),z$(i)){case"template-result":this.__renderTemplateInScopedContext({template:i,renderAsDirectHostChild:!0,slotName:r});break;case"node":this.__appendNodes({nodes:[i],renderParent:this,slotName:r});break;case"slot-rerender-object":this.__slotsThatNeedRerender.add(r),i.firstRenderOnConnected&&this.__rerenderSlot(r);break;default:throw new Error(`Slot "${r}" configured inside "get slots()" (in prototype) of ${this.constructor.name} may return these types: TemplateResult | Node | {template:TemplateResult, afterRender?:function} | undefined. - You provided: ${i}`)}}}_connectSlotMixin(){if(this.__isConnectedSlotMixin)return;const n=Object.keys(this.slots);for(const r of n)(r===""?Array.from(this.children).find(s=>!s.hasAttribute("slot")):Array.from(this.children).find(s=>s.slot===r))&&this.__slotsProvidedByUserOnFirstConnected.add(r);this.__initSlots(n),this.__isConnectedSlotMixin=!0}_isPrivateSlot(n){return this.__privateSlots.has(n)}},Ya=gt(q$);function Yf(e="google-chrome"){const t=globalThis.navigator,n=!!t.userAgentData&&t.userAgentData.brands.some(l=>l.brand==="Chromium");if(e==="chromium")return n;const i=globalThis.navigator?.vendor,s=typeof globalThis.opr<"u",o=globalThis.userAgent?.indexOf("Edge")>-1,a=globalThis.userAgent?.match("CriOS");if(e==="ios")return a;if(e==="google-chrome")return n!==null&&typeof n<"u"&&i==="Google Inc."&&s===!1&&o===!1}const Td={isChrome:Yf(),isIOSChrome:Yf("ios"),isChromium:Yf("chromium"),isFirefox:globalThis.navigator?.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:globalThis.navigator?.appVersion?.indexOf("Mac")!==-1,isIOS:/iPhone|iPad|iPod/i.test(globalThis.navigator?.userAgent),isMacSafari:globalThis.navigator?.vendor&&globalThis.navigator?.vendor.indexOf("Apple")>-1&&globalThis.navigator?.userAgent&&globalThis.navigator?.userAgent.indexOf("CriOS")===-1&&globalThis.navigator?.userAgent.indexOf("FxiOS")===-1&&globalThis.navigator?.appVersion.indexOf("Mac")!==-1};function Lc(e=""){return`${e.length>0?`${e}-`:""}${Math.random().toString(36).substr(2,10)}`}const Xf=e=>e.key===" "||e.key==="Enter",b_=e=>e.key===" ";class W$ extends gE(Me){static get properties(){return{active:{type:Boolean,reflect:!0},type:{type:String,reflect:!0}}}render(){return J`
`}static get styles(){return[ue` + `}};pr.styles=[JP,YP],se([yn()],pr.prototype,"status",void 0),se([pt('slot[name="copy-icon"]')],pr.prototype,"copyIconEl",void 0),se([pt('slot[name="success-icon"]')],pr.prototype,"successIconEl",void 0),se([pt('slot[name="error-icon"]')],pr.prototype,"errorIconEl",void 0),se([pt("craft-copy-button")],pr.prototype,"copyButtonEl",void 0),se([V({type:String})],pr.prototype,"value",void 0),se([V({type:Boolean,reflect:!0})],pr.prototype,"disabled",void 0),se([V({attribute:"feedback-duration",type:Number})],pr.prototype,"feedbackDuration",void 0),se([V({reflect:!1})],pr.prototype,"tooltipLabel",void 0),customElements.get("craft-copy-attribute")||customElements.define("craft-copy-attribute",pr);const R1=new WeakMap;function XP(e,t){let n=t;for(;n;){if(R1.get(n)===e)return!0;n=Object.getPrototypeOf(n)}return!1}function vt(e){return t=>{if(XP(e,t))return t;const n=e(t);return R1.set(n,e),n}}const QP=e=>class extends e{static get properties(){return{disabled:{type:Boolean,reflect:!0}}}constructor(){super(),this._requestedToBeDisabled=!1,this.__isUserSettingDisabled=!0,this.__restoreDisabledTo=!1,this.disabled=!1}makeRequestToBeDisabled(){this._requestedToBeDisabled===!1&&(this._requestedToBeDisabled=!0,this.__restoreDisabledTo=this.disabled,this.__internalSetDisabled(!0))}retractRequestToBeDisabled(){this._requestedToBeDisabled===!0&&(this._requestedToBeDisabled=!1,this.__internalSetDisabled(this.__restoreDisabledTo))}__internalSetDisabled(t){this.__isUserSettingDisabled=!1,this.disabled=t,this.__isUserSettingDisabled=!0}requestUpdate(t,n,r){super.requestUpdate(t,n,r),t==="disabled"&&(this.__isUserSettingDisabled&&(this.__restoreDisabledTo=this.disabled),this.disabled===!1&&this._requestedToBeDisabled===!0&&this.__internalSetDisabled(!0))}click(){this.disabled||super.click()}},qc=vt(QP),ZP=e=>class extends qc(e){static get properties(){return{tabIndex:{type:Number,reflect:!0,attribute:"tabindex"}}}constructor(){super(),this.__isUserSettingTabIndex=!0,this.__restoreTabIndexTo=0,this.__internalSetTabIndex(0)}makeRequestToBeDisabled(){super.makeRequestToBeDisabled(),this._requestedToBeDisabled===!1&&this.tabIndex!=null&&(this.__restoreTabIndexTo=this.tabIndex)}retractRequestToBeDisabled(){super.retractRequestToBeDisabled(),this._requestedToBeDisabled===!0&&this.__internalSetTabIndex(this.__restoreTabIndexTo)}static enabledWarnings=super.enabledWarnings?.filter(t=>t!=="change-in-update")||[];__internalSetTabIndex(t){this.__isUserSettingTabIndex=!1,this.tabIndex=t,this.__isUserSettingTabIndex=!0}requestUpdate(t,n,r){super.requestUpdate(t,n,r),t==="disabled"&&(this.disabled?this.__internalSetTabIndex(-1):this.__internalSetTabIndex(this.__restoreTabIndexTo)),t==="tabIndex"&&(this.__isUserSettingTabIndex&&this.tabIndex!=null&&(this.__restoreTabIndexTo=this.tabIndex),this.tabIndex!==-1&&this._requestedToBeDisabled===!0&&this.__internalSetTabIndex(-1))}firstUpdated(t){super.firstUpdated(t),this.disabled&&this.__internalSetTabIndex(-1)}},F1=vt(ZP);const{I:eR}=MO,tR=e=>e===null||typeof e!="object"&&typeof e!="function",I1=(e,t)=>e?._$litType$!==void 0,nR=e=>e.strings===void 0,k_=()=>document.createComment(""),fl=(e,t,n)=>{const r=e._$AA.parentNode,i=t===void 0?e._$AB:t._$AA;if(n===void 0){const s=r.insertBefore(k_(),i),o=r.insertBefore(k_(),i);n=new eR(s,o,e,e.options)}else{const s=n._$AB.nextSibling,o=n._$AM,a=o!==e;if(a){let l;n._$AQ?.(e),n._$AM=e,n._$AP!==void 0&&(l=e._$AU)!==o._$AU&&n._$AP(l)}if(s!==i||a){let l=n._$AA;for(;l!==s;){const c=l.nextSibling;r.insertBefore(l,i),l=c}}}return n},$s=(e,t,n=e)=>(e._$AI(t,n),e),rR={},iR=(e,t=rR)=>e._$AH=t,sR=e=>e._$AH,tp=e=>{e._$AR(),e._$AA.remove()};function oR(e){return e instanceof Node?"node":I1(e)?"template-result":!Array.isArray(e)&&typeof e=="object"&&"template"in e?"slot-rerender-object":null}const aR=e=>class extends e{get slots(){return{}}constructor(){super(),this.__renderMetaPerSlot=new Map,this.__slotsThatNeedRerender=new Set,this.__slotsProvidedByUserOnFirstConnected=new Set,this.__privateSlots=new Set}connectedCallback(){super.connectedCallback(),this._connectSlotMixin()}__rerenderSlot(n){const r=this.slots[n]();this.__renderTemplateInScopedContext({renderAsDirectHostChild:r.renderAsDirectHostChild,template:r.template,slotName:n}),r.afterRender?.()}update(n){super.update(n);for(const r of this.__slotsThatNeedRerender)this.__rerenderSlot(r)}__renderTemplateInScopedContext({template:n,slotName:r,renderAsDirectHostChild:i}){if(!this.__renderMetaPerSlot.has(r)){const p=!!ShadowRoot.prototype.createElement;this.shadowRoot||console.error("[SlotMixin] No shadowRoot was found");const m=(p?this.shadowRoot:document).createElement("div"),g=document.createComment(`_start_slot_${r}_`),v=document.createComment(`_end_slot_${r}_`);m.appendChild(g),m.appendChild(v);const{creationScope:_,host:b}=this.renderOptions;if(hg(n,m,{renderBefore:v,creationScope:_,host:b}),i){const w=Array.from(m.childNodes);this.__appendNodes({nodes:w,renderParent:this,slotName:r})}else m.slot=r,this.appendChild(m);this.__renderMetaPerSlot.set(r,{renderTargetThatRespectsShadowRootScoping:m,renderBefore:v});return}const{renderBefore:o,renderTargetThatRespectsShadowRootScoping:a}=this.__renderMetaPerSlot.get(r),l=i?this:a,{creationScope:c,host:u}=this.renderOptions;hg(n,l,{creationScope:c,host:u,renderBefore:o}),i&&o.previousElementSibling&&!o.previousElementSibling.slot&&(o.previousElementSibling.slot=r)}__appendNodes({nodes:n,renderParent:r=this,slotName:i}){for(const s of n)s instanceof Element&&i&&i!==""&&s.setAttribute("slot",i),r.appendChild(s)}__initSlots(n){for(const r of n){if(this.__slotsProvidedByUserOnFirstConnected.has(r))continue;const i=this.slots[r]();if(i===void 0)continue;switch(this.__isConnectedSlotMixin||this.__privateSlots.add(r),oR(i)){case"template-result":this.__renderTemplateInScopedContext({template:i,renderAsDirectHostChild:!0,slotName:r});break;case"node":this.__appendNodes({nodes:[i],renderParent:this,slotName:r});break;case"slot-rerender-object":this.__slotsThatNeedRerender.add(r),i.firstRenderOnConnected&&this.__rerenderSlot(r);break;default:throw new Error(`Slot "${r}" configured inside "get slots()" (in prototype) of ${this.constructor.name} may return these types: TemplateResult | Node | {template:TemplateResult, afterRender?:function} | undefined. + You provided: ${i}`)}}}_connectSlotMixin(){if(this.__isConnectedSlotMixin)return;const n=Object.keys(this.slots);for(const r of n)(r===""?Array.from(this.children).find(s=>!s.hasAttribute("slot")):Array.from(this.children).find(s=>s.slot===r))&&this.__slotsProvidedByUserOnFirstConnected.add(r);this.__initSlots(n),this.__isConnectedSlotMixin=!0}_isPrivateSlot(n){return this.__privateSlots.has(n)}},tl=vt(aR);function np(e="google-chrome"){const t=globalThis.navigator,n=!!t.userAgentData&&t.userAgentData.brands.some(l=>l.brand==="Chromium");if(e==="chromium")return n;const i=globalThis.navigator?.vendor,s=typeof globalThis.opr<"u",o=globalThis.userAgent?.indexOf("Edge")>-1,a=globalThis.userAgent?.match("CriOS");if(e==="ios")return a;if(e==="google-chrome")return n!==null&&typeof n<"u"&&i==="Google Inc."&&s===!1&&o===!1}const Vd={isChrome:np(),isIOSChrome:np("ios"),isChromium:np("chromium"),isFirefox:globalThis.navigator?.userAgent.toLowerCase().indexOf("firefox")>-1,isMac:globalThis.navigator?.appVersion?.indexOf("Mac")!==-1,isIOS:/iPhone|iPad|iPod/i.test(globalThis.navigator?.userAgent),isMacSafari:globalThis.navigator?.vendor&&globalThis.navigator?.vendor.indexOf("Apple")>-1&&globalThis.navigator?.userAgent&&globalThis.navigator?.userAgent.indexOf("CriOS")===-1&&globalThis.navigator?.userAgent.indexOf("FxiOS")===-1&&globalThis.navigator?.appVersion.indexOf("Mac")!==-1};function Wc(e=""){return`${e.length>0?`${e}-`:""}${Math.random().toString(36).substr(2,10)}`}const rp=e=>e.key===" "||e.key==="Enter",T_=e=>e.key===" ";class lR extends F1(Me){static get properties(){return{active:{type:Boolean,reflect:!0},type:{type:String,reflect:!0}}}render(){return J`
`}static get styles(){return[ue` :host { position: relative; display: inline-flex; @@ -555,7 +555,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q color: #adadad; fill: #adadad; } - `]}constructor(){super(),this.type="button",this.active=!1,this.__setupEvents()}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","button")}updated(t){super.updated(t),t.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.getAttribute("aria-disabled")!==null&&this.removeAttribute("aria-disabled"))}__setupEvents(){this.addEventListener("mousedown",this.__mousedownHandler),this.addEventListener("keydown",this.__keydownHandler),this.addEventListener("keyup",this.__keyupHandler)}__mousedownHandler(){this.active=!0;const t=()=>{this.active=!1,document.removeEventListener("mouseup",t),this.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t),this.addEventListener("mouseup",t)}__keydownHandler(t){if(this.active||!Xf(t)){b_(t)&&t.preventDefault();return}b_(t)&&t.preventDefault(),this.active=!0;const n=r=>{Xf(r)&&(this.active=!1,document.removeEventListener("keyup",n,!0))};document.addEventListener("keyup",n,!0)}__keyupHandler(t){if(Xf(t)){if(t.target&&t.target!==this)return;this.click()}}}class K$ extends W${constructor(){super(),this.type="reset",this.__setupDelegationInConstructor(),this.__submitAndResetHelperButton=document.createElement("button"),this.__preventEventLeakage=this.__preventEventLeakage.bind(this)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this._setupSubmitAndResetHelperOnConnected()})}disconnectedCallback(){super.disconnectedCallback(),this._teardownSubmitAndResetHelperOnDisconnected()}__preventEventLeakage(t){t.target===this.__submitAndResetHelperButton&&t.stopImmediatePropagation()}_setupSubmitAndResetHelperOnConnected(){this.appendChild(this.__submitAndResetHelperButton),this._form=this.__submitAndResetHelperButton.form,this.removeChild(this.__submitAndResetHelperButton),this._form&&this._form.addEventListener("click",this.__preventEventLeakage)}_teardownSubmitAndResetHelperOnDisconnected(){this._form&&this._form.removeEventListener("click",this.__preventEventLeakage)}async __clickDelegationHandler(t){this._form||await this.updateComplete,(this.type==="submit"||this.type==="reset")&&t.target===this&&this._form&&(this.__submitAndResetHelperButton.type=this.type,this._form.appendChild(this.__submitAndResetHelperButton),this.__submitAndResetHelperButton.click(),this._form.removeChild(this.__submitAndResetHelperButton))}__setupDelegationInConstructor(){this.addEventListener("click",this.__clickDelegationHandler,!0)}}const Mi=new WeakMap;function G$(){const e=document.createElement("button");return e.tabIndex=-1,e.type="submit",e.setAttribute("aria-hidden","true"),e.style.cssText=` + `]}constructor(){super(),this.type="button",this.active=!1,this.__setupEvents()}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","button")}updated(t){super.updated(t),t.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.getAttribute("aria-disabled")!==null&&this.removeAttribute("aria-disabled"))}__setupEvents(){this.addEventListener("mousedown",this.__mousedownHandler),this.addEventListener("keydown",this.__keydownHandler),this.addEventListener("keyup",this.__keyupHandler)}__mousedownHandler(){this.active=!0;const t=()=>{this.active=!1,document.removeEventListener("mouseup",t),this.removeEventListener("mouseup",t)};document.addEventListener("mouseup",t),this.addEventListener("mouseup",t)}__keydownHandler(t){if(this.active||!rp(t)){T_(t)&&t.preventDefault();return}T_(t)&&t.preventDefault(),this.active=!0;const n=r=>{rp(r)&&(this.active=!1,document.removeEventListener("keyup",n,!0))};document.addEventListener("keyup",n,!0)}__keyupHandler(t){if(rp(t)){if(t.target&&t.target!==this)return;this.click()}}}class cR extends lR{constructor(){super(),this.type="reset",this.__setupDelegationInConstructor(),this.__submitAndResetHelperButton=document.createElement("button"),this.__preventEventLeakage=this.__preventEventLeakage.bind(this)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this._setupSubmitAndResetHelperOnConnected()})}disconnectedCallback(){super.disconnectedCallback(),this._teardownSubmitAndResetHelperOnDisconnected()}__preventEventLeakage(t){t.target===this.__submitAndResetHelperButton&&t.stopImmediatePropagation()}_setupSubmitAndResetHelperOnConnected(){this.appendChild(this.__submitAndResetHelperButton),this._form=this.__submitAndResetHelperButton.form,this.removeChild(this.__submitAndResetHelperButton),this._form&&this._form.addEventListener("click",this.__preventEventLeakage)}_teardownSubmitAndResetHelperOnDisconnected(){this._form&&this._form.removeEventListener("click",this.__preventEventLeakage)}async __clickDelegationHandler(t){this._form||await this.updateComplete,(this.type==="submit"||this.type==="reset")&&t.target===this&&this._form&&(this.__submitAndResetHelperButton.type=this.type,this._form.appendChild(this.__submitAndResetHelperButton),this.__submitAndResetHelperButton.click(),this._form.removeChild(this.__submitAndResetHelperButton))}__setupDelegationInConstructor(){this.addEventListener("click",this.__clickDelegationHandler,!0)}}const Bi=new WeakMap;function uR(){const e=document.createElement("button");return e.tabIndex=-1,e.type="submit",e.setAttribute("aria-hidden","true"),e.style.cssText=` position: absolute; top: 0; left: 0; @@ -567,7 +567,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q width: 1px; padding: 0; /* reset default agent styles */ border: 0; /* reset default agent styles */ - `,e}class J$ extends K${get _nativeButtonNode(){return Mi.get(this._form)?.helper||null}constructor(){super(),this.type="submit",this.__implicitSubmitHelperButton=null}_setupSubmitAndResetHelperOnConnected(){if(super._setupSubmitAndResetHelperOnConnected(),!this._form||this.type!=="submit")return;const t=this._form;if(!Mi.get(this._form)){const r=G$(),i=document.createElement("div");i.appendChild(r),Mi.set(this._form,{lionButtons:new Set,helper:r,observer:new MutationObserver(()=>{t.appendChild(i)})}),t.appendChild(i),Mi.get(t)?.observer.observe(i,{childList:!0})}Mi.get(t)?.lionButtons.add(this)}_teardownSubmitAndResetHelperOnDisconnected(){if(super._teardownSubmitAndResetHelperOnDisconnected(),this._form){const t=Mi.get(this._form);t&&(t.lionButtons.delete(this),t.lionButtons.size||(this._form.contains(t.helper)&&t.helper.remove(),Mi.get(this._form)?.observer.disconnect(),Mi.delete(this._form)))}}}var Y$=ue` + `,e}class dR extends cR{get _nativeButtonNode(){return Bi.get(this._form)?.helper||null}constructor(){super(),this.type="submit",this.__implicitSubmitHelperButton=null}_setupSubmitAndResetHelperOnConnected(){if(super._setupSubmitAndResetHelperOnConnected(),!this._form||this.type!=="submit")return;const t=this._form;if(!Bi.get(this._form)){const r=uR(),i=document.createElement("div");i.appendChild(r),Bi.set(this._form,{lionButtons:new Set,helper:r,observer:new MutationObserver(()=>{t.appendChild(i)})}),t.appendChild(i),Bi.get(t)?.observer.observe(i,{childList:!0})}Bi.get(t)?.lionButtons.add(this)}_teardownSubmitAndResetHelperOnDisconnected(){if(super._teardownSubmitAndResetHelperOnDisconnected(),this._form){const t=Bi.get(this._form);t&&(t.lionButtons.delete(this),t.lionButtons.size||(this._form.contains(t.helper)&&t.helper.remove(),Bi.get(this._form)?.observer.disconnect(),Bi.delete(this._form)))}}}var hR=ue` :host { cursor: pointer; font: inherit; @@ -732,11 +732,30 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q craft-button-reset, craft-button-submit { /* Temporarily make it very obvious when these are used */ - outline: 10px solid red; + outline: 10px solid var(--c-button-danger-border); } -`,Xa=class extends J${constructor(...e){super(...e),this.appearance="accent",this.variant="default",this.size="medium",this.loading=!1,this.align="center"}static get styles(){return[...super.styles,Y$]}render(){return J` + + .a11y-error { + position: relative; + outline: 2px solid var(--c-color-danger-border-normal) !important; + background-color: rgba(255, 0, 0, 0.1) !important; + + &:after { + content: '!'; + position: absolute; + display: inline-flex; + font-size: calc(11rem / 16); + padding: 0.125em 0.5em 0.25em; + inset-block-start: -2px; + inset-inline-start: 0; + background: var(--c-color-danger-bg-emphasis); + color: white; + transform: translateX(-100%); + } + } +`,fR=Object.prototype.toString;function pR(e){return typeof e=="function"||fR.call(e)==="[object Function]"}function mR(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var gR=2**53-1;function vR(e){var t=mR(e);return Math.min(Math.max(t,0),gR)}function vr(e,t){var n=Array,r=Object(e);if(e==null)throw TypeError("Array.from requires an array-like object - not null or undefined");for(var i=vR(r.length),s=pR(n)?Object(new n(i)):Array(i),o=0,a;o0&&arguments[0]!==void 0?arguments[0]:[];bR(this,e),wR(this,"items",void 0),this.items=t}return _R(e,[{key:"add",value:function(t){return this.has(t)===!1&&this.items.push(t),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(t){var n=this.items.length;return this.items=this.items.filter(function(r){return r!==t}),n!==this.items.length}},{key:"forEach",value:function(t){var n=this;this.items.forEach(function(r){t(r,r,n)})}},{key:"has",value:function(t){return this.items.indexOf(t)!==-1}},{key:"size",get:function(){return this.items.length}}]),e})(),CR=typeof Set>"u"?Set:ER;function cn(e){return e.localName??e.tagName.toLowerCase()}var xR={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},AR={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function kR(e,t){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(n){var r;return e.hasAttribute(n)&&!((r=AR[t])!=null&&r.has(n))})}function M1(e,t){return kR(e,t)}function TR(e){var t=OR(e);if(t===null||t==="presentation"){var n=$R(e);if(t!=="presentation"||M1(e,n||""))return n}return t}function $R(e){var t=xR[cn(e)];if(t!==void 0)return t;switch(cn(e)){case"a":case"area":case"link":if(e.hasAttribute("href"))return"link";break;case"img":return e.getAttribute("alt")===""&&!M1(e,"img")?"presentation":"img";case"input":var n=e.type;switch(n){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return n;case"range":return"slider";case"email":case"tel":case"text":case"url":return e.hasAttribute("list")?"combobox":"textbox";case"search":return e.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}case"select":return e.hasAttribute("multiple")||e.size>1?"listbox":"combobox"}return null}function OR(e){var t=e.getAttribute("role");if(t!==null){var n=t.trim().split(" ")[0];if(n.length>0)return n}return null}function ft(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function D1(e){return ft(e)&&cn(e)==="caption"}function ud(e){return ft(e)&&cn(e)==="input"}function PR(e){return ft(e)&&cn(e)==="optgroup"}function RR(e){return ft(e)&&cn(e)==="select"}function FR(e){return ft(e)&&cn(e)==="table"}function IR(e){return ft(e)&&cn(e)==="textarea"}function NR(e){var t=(e.ownerDocument===null?e:e.ownerDocument).defaultView;if(t===null)throw TypeError("no window available");return t}function MR(e){return ft(e)&&cn(e)==="fieldset"}function DR(e){return ft(e)&&cn(e)==="legend"}function LR(e){return ft(e)&&cn(e)==="slot"}function VR(e){return ft(e)&&e.ownerSVGElement!==void 0}function BR(e){return ft(e)&&cn(e)==="svg"}function UR(e){return VR(e)&&cn(e)==="title"}function gg(e,t){if(ft(e)&&e.hasAttribute(t)){var n=e.getAttribute(t).split(" "),r=e.getRootNode?e.getRootNode():e.ownerDocument;return n.map(function(i){return r.getElementById(i)}).filter(function(i){return i!==null})}return[]}function gi(e,t){return ft(e)?t.indexOf(TR(e))!==-1:!1}function jR(e){return e.trim().replace(/\s\s+/g," ")}function HR(e,t){if(!ft(e))return!1;if(e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true")return!0;var n=t(e);return n.getPropertyValue("display")==="none"||n.getPropertyValue("visibility")==="hidden"}function zR(e){return gi(e,["button","combobox","listbox","textbox"])||L1(e,"range")}function L1(e,t){if(!ft(e))return!1;if(t==="range")return gi(e,["meter","progressbar","scrollbar","slider","spinbutton"]);throw TypeError(`No knowledge about abstract role '${t}'. This is likely a bug :(`)}function $_(e,t){var n=vr(e.querySelectorAll(t));return gg(e,"aria-owns").forEach(function(r){n.push.apply(n,vr(r.querySelectorAll(t)))}),n}function qR(e){return RR(e)?e.selectedOptions||$_(e,"[selected]"):$_(e,'[aria-selected="true"]')}function WR(e){return gi(e,["none","presentation"])}function KR(e){return D1(e)}function GR(e){return gi(e,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function JR(e){return!1}function YR(e){return ud(e)||IR(e)?e.value:e.textContent||""}function O_(e){var t=e.getPropertyValue("content");return/^["'].*["']$/.test(t)?t.slice(1,-1):""}function V1(e){var t=cn(e);return t==="button"||t==="input"&&e.getAttribute("type")!=="hidden"||t==="meter"||t==="output"||t==="progress"||t==="select"||t==="textarea"}function B1(e){if(V1(e))return e;var t=null;return e.childNodes.forEach(function(n){if(t===null&&ft(n)){var r=B1(n);r!==null&&(t=r)}}),t}function XR(e){if(e.control!==void 0)return e.control;var t=e.getAttribute("for");return t===null?B1(e):e.ownerDocument.getElementById(t)}function QR(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return vr(t);if(!V1(e))return null;var n=e.ownerDocument;return vr(n.querySelectorAll("label")).filter(function(r){return XR(r)===e})}function ZR(e){var t=e.assignedNodes();return t.length===0?vr(e.childNodes):t}function eF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new CR,r=NR(e),i=t.compute,s=i===void 0?"name":i,o=t.computedStyleSupportsPseudoElements,a=o===void 0?t.getComputedStyle!==void 0:o,l=t.getComputedStyle,c=l===void 0?r.getComputedStyle.bind(r):l,u=t.hidden,d=u===void 0?!1:u;function p(v,_){var b="";if(ft(v)&&a&&(b=`${O_(c(v,"::before"))} ${b}`),(LR(v)?ZR(v):vr(v.childNodes).concat(gg(v,"aria-owns"))).forEach(function(S){var C=g(S,{isEmbeddedInLabel:_.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),E=(ft(S)?c(S).getPropertyValue("display"):"inline")==="inline"?"":" ";b+=`${E}${C}${E}`}),ft(v)&&a){var w=O_(c(v,"::after"));b=`${b} ${w}`}return b.trim()}function f(v,_){var b=v.getAttributeNode(_);return b!==null&&!n.has(b)&&b.value.trim()!==""?(n.add(b),b.value):null}function h(v){return ft(v)?f(v,"title"):null}function m(v){if(!ft(v))return null;if(MR(v)){n.add(v);for(var _=vr(v.childNodes),b=0;b<_.length;b+=1){var w=_[b];if(DR(w))return g(w,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(FR(v)){n.add(v);for(var S=vr(v.childNodes),C=0;C0}).join(" ");if(ud(v)&&v.type==="image"){var j=f(v,"alt");if(j!==null)return j;var M=f(v,"title");return M===null?"Submit Query":M}if(gi(v,["button"])){var q=p(v,{isEmbeddedInLabel:!1});if(q!=="")return q}return null}function g(v,_){if(n.has(v))return"";if(!d&&HR(v,c)&&!_.isReferenced)return n.add(v),"";var b=ft(v)?v.getAttributeNode("aria-labelledby"):null,w=b!==null&&!n.has(b)?gg(v,"aria-labelledby"):[];if(s==="name"&&!_.isReferenced&&w.length>0)return n.add(b),w.map(function(O){return g(O,{isEmbeddedInLabel:_.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var S=_.recursion&&zR(v)&&s==="name";if(!S){var C=(ft(v)&&v.getAttribute("aria-label")||"").trim();if(C!==""&&s==="name")return n.add(v),C;if(!WR(v)){var E=m(v);if(E!==null)return n.add(v),E}}if(gi(v,["menu"]))return n.add(v),"";if(S||_.isEmbeddedInLabel||_.isReferenced){if(gi(v,["combobox","listbox"])){n.add(v);var T=qR(v);return T.length===0?ud(v)?v.value:"":vr(T).map(function(O){return g(O,{isEmbeddedInLabel:_.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(L1(v,"range"))return n.add(v),v.hasAttribute("aria-valuetext")?v.getAttribute("aria-valuetext"):v.hasAttribute("aria-valuenow")?v.getAttribute("aria-valuenow"):v.getAttribute("value")||"";if(gi(v,["textbox"]))return n.add(v),YR(v)}if(GR(v)||ft(v)&&_.isReferenced||KR(v)||JR()){var x=p(v,{isEmbeddedInLabel:_.isEmbeddedInLabel});if(x!=="")return n.add(v),x}if(v.nodeType===v.TEXT_NODE)return n.add(v),v.textContent||"";if(_.recursion)return n.add(v),p(v,{isEmbeddedInLabel:_.isEmbeddedInLabel});var k=h(v);return k===null?(n.add(v),""):(n.add(v),k)}return jR(g(e,{isEmbeddedInLabel:!1,isReferenced:s==="description",recursion:!1}))}function tF(e){return gi(e,["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])}function nF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return tF(e)?"":eF(e,t)}var Ui=class extends dR{constructor(...t){super(...t),this.appearance="accent",this.variant="default",this.size="medium",this.loading=!1,this.align="center",this._hasAccessibilityError=!1}static get styles(){return[...super.styles,hR]}async firstUpdated(t){super.firstUpdated(t),await this.updateComplete;let n=this.querySelectorAll("craft-icon, craft-spinner");await Promise.all(Array.from(n).map(r=>r.updateComplete)),this.accessibleName||(this.accessibleName=nF(this)),this._hasAccessibilityError=!this.accessibleName||this.accessibleName.trim()===""}render(){return J`
@@ -744,7 +763,54 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q
${this.loading?J``:Ae} - `}};se([V({reflect:!0})],Xa.prototype,"appearance",void 0);se([V({reflect:!0})],Xa.prototype,"variant",void 0);se([V({reflect:!0})],Xa.prototype,"size",void 0);se([V({reflect:!0,type:Boolean})],Xa.prototype,"loading",void 0);se([V()],Xa.prototype,"align",void 0);customElements.get("craft-button")||customElements.define("craft-button",Xa);var X$=ue` + `}};se([V()],Ui.prototype,"accessibleName",void 0),se([V({reflect:!0})],Ui.prototype,"appearance",void 0),se([V({reflect:!0})],Ui.prototype,"variant",void 0),se([V({reflect:!0})],Ui.prototype,"size",void 0),se([V({reflect:!0,type:Boolean})],Ui.prototype,"loading",void 0),se([V()],Ui.prototype,"align",void 0),se([yn()],Ui.prototype,"_hasAccessibilityError",void 0),customElements.get("craft-button")||customElements.define("craft-button",Ui);var rF=class extends Event{constructor(){super("wa-load",{bubbles:!0,cancelable:!1,composed:!0})}};var iF=class extends Event{constructor(){super("wa-error",{bubbles:!0,cancelable:!1,composed:!0})}},sF=`:host { + --primary-color: currentColor; + --primary-opacity: 1; + --secondary-color: currentColor; + --secondary-opacity: 0.4; + + box-sizing: content-box; + display: inline-flex; + align-items: center; + justify-content: center; + vertical-align: -0.125em; +} + +/* Standard */ +:host(:not([auto-width])) { + width: 1.25em; + height: 1em; +} + +/* Auto-width */ +:host([auto-width]) { + width: auto; + height: 1em; +} + +svg { + height: 1em; + fill: currentColor; + overflow: visible; + + /* Duotone colors with path-specific opacity fallback */ + path[data-duotone-primary] { + color: var(--primary-color); + opacity: var(--path-opacity, var(--primary-opacity)); + } + + path[data-duotone-secondary] { + color: var(--secondary-color); + opacity: var(--path-opacity, var(--secondary-opacity)); + } +} +`,pl=Symbol(),Eu=Symbol(),ip,sp=new Map,un=class extends Rn{constructor(){super(...arguments),this.svg=null,this.autoWidth=!1,this.swapOpacity=!1,this.label="",this.library="default",this.resolveIcon=async(e,t)=>{let n;if(t?.spriteSheet){this.hasUpdated||await this.updateComplete,this.svg=J` + + `,await this.updateComplete;const r=this.shadowRoot.querySelector("[part='svg']");return typeof t.mutator=="function"&&t.mutator(r,this),this.svg}try{if(n=await fetch(e,{mode:"cors"}),!n.ok)return n.status===410?pl:Eu}catch{return Eu}try{const r=document.createElement("div");r.innerHTML=await n.text();const i=r.firstElementChild;if(i?.tagName?.toLowerCase()!=="svg")return pl;ip||(ip=new DOMParser);const o=ip.parseFromString(i.outerHTML,"text/html").body.querySelector("svg");return o?(o.part.add("svg"),document.adoptNode(o)):pl}catch{return pl}}}connectedCallback(){super.connectedCallback(),oO(this)}firstUpdated(e){super.firstUpdated(e),this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),aO(this)}getIconSource(){const e=Xf(this.library),t=this.family||uO();return this.name&&e?{url:e.resolver(this.name,t,this.variant,this.autoWidth),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){const{url:e,fromLibrary:t}=this.getIconSource(),n=t?Xf(this.library):void 0;if(!e){this.svg=null;return}let r=sp.get(e);r||(r=this.resolveIcon(e,n),sp.set(e,r));const i=await r;if(i===Eu&&sp.delete(e),e===this.getIconSource().url){if(I1(i)){this.svg=i;return}switch(i){case Eu:case pl:this.svg=null,this.dispatchEvent(new iF);break;default:this.svg=i.cloneNode(!0),n?.mutator?.(this.svg,this),this.dispatchEvent(new rF)}}}updated(e){super.updated(e);const t=Xf(this.library),n=this.shadowRoot?.querySelector("svg");n&&t?.mutator?.(n,this)}render(){return this.hasUpdated?this.svg:J``}};un.css=sF;z([yn()],un.prototype,"svg",2);z([V({reflect:!0})],un.prototype,"name",2);z([V({reflect:!0})],un.prototype,"family",2);z([V({reflect:!0})],un.prototype,"variant",2);z([V({attribute:"auto-width",type:Boolean,reflect:!0})],un.prototype,"autoWidth",2);z([V({attribute:"swap-opacity",type:Boolean,reflect:!0})],un.prototype,"swapOpacity",2);z([V()],un.prototype,"src",2);z([V()],un.prototype,"label",2);z([V({reflect:!0})],un.prototype,"library",2);z([Jn("label")],un.prototype,"handleLabelChange",1);z([Jn(["family","name","library","variant","src","autoWidth","swapOpacity"])],un.prototype,"setIcon",1);un=z([Rr("wa-icon")],un);var oF=class extends un{static get styles(){return[un.styles,ue` + :host { + font-size: 0.8em; + } + `]}};customElements.get("craft-icon")||customElements.define("craft-icon",oF);var aF=ue` :host { --color-start: red; --color-end: blue; @@ -771,7 +837,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q user-select: none; pointer-events: none; } -`,$h=class extends Me{constructor(...e){super(...e),this.label=null,this._gradientId=null}connectedCallback(){super.connectedCallback(),this._gradientId=`avatar-gradient-${Math.random().toString(36).slice(2,8)}`}text(){return this.label?this.label.split(" ").map(e=>e.charAt(0).toUpperCase()).join(""):"?"}render(){return J` +`,Cu=class extends Me{constructor(...t){super(...t),this.label=null,this._gradientId=null}connectedCallback(){super.connectedCallback(),this._gradientId=`avatar-gradient-${Math.random().toString(36).slice(2,8)}`}text(){return this.label?this.label.split(" ").map(t=>t.charAt(0).toUpperCase()).join(""):"?"}render(){return J` - `}};$h.styles=[X$];se([V()],$h.prototype,"label",void 0);se([On()],$h.prototype,"_gradientId",void 0);customElements.get("craft-avatar")||customElements.define("craft-avatar",$h);const jv=ue` + `}};Cu.styles=[aF],se([V()],Cu.prototype,"label",void 0),se([yn()],Cu.prototype,"_gradientId",void 0),customElements.get("craft-avatar")||customElements.define("craft-avatar",Cu);const Qv=ue` font: inherit; color: var(--c-input-fg, var(--c-fg-text)); position: relative; @@ -821,7 +887,7 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q @media (pointer: none), (pointer: coarse) { font-size: 1rem; } -`,Rh=ue` +`,Uh=ue` :host(:not([label-sr-only])) .form-field__group-one { margin-block-end: var(--c-spacing-sm); } @@ -852,11 +918,11 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q .input-group__after { margin-block-start: var(--c-spacing-sm); } -`,Vc=ue` - ${Rh} +`,Kc=ue` + ${Uh} ::slotted([slot='input']) { - ${jv} + ${Qv} } :host([small]) ::slotted([slot='input']) { @@ -866,13 +932,13 @@ var eg="",tg="";function Jy(e){eg=e}function PO(e=""){if(!eg){const t=document.q :host([center]) ::slotted([slot='input']) { text-align: center; } -`,lg=window,y_=new WeakMap;function Q$(e){lg.applyFocusVisiblePolyfill&&!y_.has(e)&&(lg.applyFocusVisiblePolyfill(e),y_.set(e,void 0))}const Z$=e=>class extends e{static get properties(){return{focused:{type:Boolean,reflect:!0},focusedVisible:{type:Boolean,reflect:!0,attribute:"focused-visible"},autofocus:{type:Boolean,reflect:!0}}}constructor(){super(),this.focused=!1,this.focusedVisible=!1,this.autofocus=!1}firstUpdated(n){super.firstUpdated(n),this.__registerEventsForFocusMixin(),this.__syncAutofocusToFocusableElement()}disconnectedCallback(){super.disconnectedCallback(),this.__teardownEventsForFocusMixin()}updated(n){super.updated(n),n.has("autofocus")&&this.__syncAutofocusToFocusableElement()}__syncAutofocusToFocusableElement(){this._focusableNode&&(this.hasAttribute("autofocus")?this._focusableNode.setAttribute("autofocus",""):this._focusableNode.removeAttribute("autofocus"))}focus(){this._focusableNode?.focus()}blur(){this._focusableNode?.blur()}get _focusableNode(){return this._inputNode||document.createElement("input")}__onFocus(){if(this.focused=!0,typeof lg.applyFocusVisiblePolyfill=="function")this.focusedVisible=this._focusableNode.hasAttribute("data-focus-visible-added");else try{this.focusedVisible=this._focusableNode.matches(":focus-visible")}catch{this.focusedVisible=!1}}__onBlur(){this.focused=!1,this.focusedVisible=!1}__registerEventsForFocusMixin(){Q$(this.getRootNode()),this.__redispatchFocus=n=>{n.stopPropagation(),this.dispatchEvent(new Event("focus"))},this._focusableNode.addEventListener("focus",this.__redispatchFocus),this.__redispatchBlur=n=>{n.stopPropagation(),this.dispatchEvent(new Event("blur"))},this._focusableNode.addEventListener("blur",this.__redispatchBlur),this.__redispatchFocusin=n=>{n.stopPropagation(),this.__onFocus(),this.dispatchEvent(new Event("focusin",{bubbles:!0,composed:!0}))},this._focusableNode.addEventListener("focusin",this.__redispatchFocusin),this.__redispatchFocusout=n=>{n.stopPropagation(),this.__onBlur(),this.dispatchEvent(new Event("focusout",{bubbles:!0,composed:!0}))},this._focusableNode.addEventListener("focusout",this.__redispatchFocusout)}__teardownEventsForFocusMixin(){this._focusableNode&&(this._focusableNode?.removeEventListener("focus",this.__redispatchFocus),this._focusableNode?.removeEventListener("blur",this.__redispatchBlur),this._focusableNode?.removeEventListener("focusin",this.__redispatchFocusin),this._focusableNode?.removeEventListener("focusout",this.__redispatchFocusout))}},zv=gt(Z$);function bE(e,t){return t={exports:{}},e(t,t.exports),t.exports}var xs="long",Di="short",Qf="narrow",ze="numeric",Li="2-digit",Vi={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:ze,day:ze,year:Li},medium:{month:Di,day:ze,year:ze},long:{month:xs,day:ze,year:ze},full:{month:xs,day:ze,year:ze,weekday:xs},default:{month:Di,day:ze,year:ze}},time:{short:{hour:ze,minute:ze},medium:{hour:ze,minute:ze,second:ze},long:{hour:ze,minute:ze,second:ze,timeZoneName:Di},full:{hour:ze,minute:ze,second:ze,timeZoneName:Di},default:{hour:ze,minute:ze,second:ze}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(e){if(e){var t={},n=e.match(/\b[A-Z]{3}\b/i),r=e.replace(/[^¤]/g,"").length;if(!r&&n&&(r=1),r?(t.style="currency",t.currencyDisplay=r===1?"symbol":r===2?"code":"name",t.currency=n?n[0].toUpperCase():"USD"):e.indexOf("%")>=0&&(t.style="percent"),!/[@#0]/.test(e))return t.style?t:void 0;if(t.useGrouping=e.indexOf(",")>=0,/E\+?[@#0]+/i.test(e)||e.indexOf("@")>=0){var i=e.replace(/E\+?[@#0]+|[^@#0]/gi,"");t.minimumSignificantDigits=Math.min(Math.max(i.replace(/[^@0]/g,"").length,1),21),t.maximumSignificantDigits=Math.min(Math.max(i.length,1),21)}else{for(var s=e.replace(/[^#0.]/g,"").split("."),o=s[0],a=o.length-1;o[a]==="0";)--a;t.minimumIntegerDigits=Math.min(Math.max(o.length-1-a,1),21);var l=s[1]||"";for(a=0;l[a]==="0";)++a;for(t.minimumFractionDigits=Math.min(Math.max(a,0),20);l[a]==="#";)++a;t.maximumFractionDigits=Math.min(Math.max(a,0),20)}return t}},parseDatePattern:function(e){if(e){for(var t={},n=0;n0)_=new Intl.PluralRules(f,{type:m});else{var v=eR(f,cg),w=v&&cg[v][m]||c;_={select:w}}return function(S,C){var E=b["="+ +S]||b[_.select(S-g)]||b.other;return E(C)}}function c(){return"other"}function u(p,f){var h=p[2];return function(m,g){var b=h[m]||h.other;return b(g)}}var d={number:s,ordinal:s,spellout:s,duration:o,date:a,time:a,plural:l,selectordinal:l,select:u};t.types=d});Fh.toParts;Fh.types;var yE=bE(function(e,t){var n="{",r="}",i=",",s="#",o="<",a=">",l="",u="'",d="offset:",p=["number","date","time","ordinal","duration","spellout"],f=["plural","select","selectordinal"];t=e.exports=function(I,H){return h({pattern:String(I),index:0,tagsType:H&&H.tagsType||null,tokens:H&&H.tokens||null},"")};function h(y,I){var H=y.pattern,M=H.length,W=[],$=y.index,le=m(y,I);for(le&&W.push(le),le&&y.tokens&&y.tokens.push(["text",H.slice($,y.index)]);y.index=9&&y<=13||y===32||y===133||y===160||y===6158||y>=8192&&y<=8205||y===8232||y===8233||y===8239||y===8287||y===8288||y===12288||y===65279}function b(y){for(var I=y.pattern,H=I.length,M=y.index;y.index=0)le=[M,$,S(y)];else{var ye=y.index,Ye=S(y);b(y),I[y.index]===n&&(y.index=ye,Ye=O(y,$)),le=[M,$,Ye]}if(b(y),I[y.index]!==r)throw k(y,r);return y.tokens&&y.tokens.push(["syntax",r]),++y.index,le}function v(y){var I=y.tagsType;if(!(!I||y.pattern[y.index]!==o)){if(y.pattern.slice(y.index,y.index+l.length)===l)throw k(y,null,"closing tag without matching opening tag");y.tokens&&y.tokens.push(["syntax",o]),++y.index;var H=w(y,!0);if(!H)throw k(y,"placeholder id");if(y.tokens&&y.tokens.push(["id",H]),b(y),y.pattern.slice(y.index,y.index+c.length)===c)return y.tokens&&y.tokens.push(["syntax",c]),y.index+=c.length,[H,I];if(y.pattern[y.index]!==a)throw k(y,a);y.tokens&&y.tokens.push(["syntax",a]),++y.index;var M=h(y,I),W=y.index;if(y.pattern.slice(y.index,y.index+l.length)!==l)throw k(y,l+H+a);y.tokens&&y.tokens.push(["syntax",l]),y.index+=l.length;var $=w(y,!0);if($&&y.tokens&&y.tokens.push(["id",$]),H!==$)throw y.index=W,k(y,l+H+a,l+$+a);if(b(y),y.pattern[y.index]!==a)throw k(y,a);return y.tokens&&y.tokens.push(["syntax",a]),++y.index,[H,I,{children:M}]}}function w(y,I){for(var H=y.pattern,M=H.length,W="";y.index=48&&y<=57}function O(y,I){for(var H=y.pattern,M=H.length,W={};y.index=0)throw k(y,null,null,'"other" sub-message must be specified in '+I);return W}function x(y,I){if(y.pattern[y.index]!==n)throw k(y,n+" to start sub-message");y.tokens&&y.tokens.push(["syntax",n]),++y.index;var H=h(y,I);if(y.pattern[y.index]!==r)throw k(y,r+" to end sub-message");return y.tokens&&y.tokens.push(["syntax",r]),++y.index,H}function k(y,I,H,M){var W=y.pattern,$=W.slice(0,y.index).split(/\r?\n/),le=y.index,De=$.length,ye=$.slice(-1)[0].length;return H=H||(y.index>=W.length?"end of message pattern":w(y)||W[y.index]),M||(M=P(I,H)),M+=" in "+W.replace(/\r?\n/g,` -`),new A(M,I,H,le,De,ye)}function P(y,I){return y?"Expected "+y+" but found "+I:"Unexpected "+I+" found"}function A(y,I,H,M,W,$){Error.call(this,y),this.name="SyntaxError",this.message=y,this.expected=I,this.found=H,this.offset=M,this.line=W,this.column=$}A.prototype=Object.create(Error.prototype),t.SyntaxError=A});yE.SyntaxError;var tR=new RegExp("^("+Object.keys(cg).join("|")+")\\b"),Il=new WeakMap;function Ea(e,t,n){if(!(this instanceof Ea)||Il.has(this))throw new TypeError("calling MessageFormat constructor without new is invalid");var r=yE(e);Il.set(this,{ast:r,format:Fh(r,t,n&&n.types),locale:Ea.supportedLocalesOf(t)[0]||"en",locales:t,options:n})}var nR=Ea;Object.defineProperties(Ea.prototype,{format:{configurable:!0,get:function(){var t=Il.get(this);if(!t)throw new TypeError("MessageFormat.prototype.format called on value that's not an object initialized as a MessageFormat");return t.format}},formatToParts:{configurable:!0,writable:!0,value:function(t){var n=Il.get(this);if(!n)throw new TypeError("MessageFormat.prototype.formatToParts called on value that's not an object initialized as a MessageFormat");var r=n.toParts||(n.toParts=Fh.toParts(n.ast,n.locales,n.options&&n.options.types));return r(t)}},resolvedOptions:{configurable:!0,writable:!0,value:function(){var t=Il.get(this);if(!t)throw new TypeError("MessageFormat.prototype.resolvedOptions called on value that's not an object initialized as a MessageFormat");return{locale:t.locale}}}});typeof Symbol<"u"&&Object.defineProperty(Ea.prototype,Symbol.toStringTag,{value:"Object"});Object.defineProperties(Ea,{supportedLocalesOf:{configurable:!0,writable:!0,value:function(t){return[].concat(Intl.NumberFormat.supportedLocalesOf(t),Intl.DateTimeFormat.supportedLocalesOf(t),Intl.PluralRules?Intl.PluralRules.supportedLocalesOf(t):[],[].concat(t||[]).filter(function(n){return tR.test(n)})).filter(function(n,r,i){return i.indexOf(n)===r})}}});function rR(e){return!!(e&&e.default&&typeof e.default=="object"&&Object.keys(e).length===1)}const Bi=globalThis.document?.documentElement;class iR extends EventTarget{formatNumberOptions={returnIfNaN:"",postProcessors:new Map};formatDateOptions={postProcessors:new Map};#e=!1;#t="";#n=null;__storage={};__namespacePatternsMap=new Map;__namespaceLoadersCache={};__namespaceLoaderPromisesCache={};get locale(){return this.#e?this.#t||"":Bi.lang||""}set locale(t){if(this.#r(t),!this.#e){const i=Bi.lang;this._setHtmlLangAttribute(t),this._onLocaleChanged(t,i);return}const n=this.#t;this.#t=t,this.#n===null&&this._setHtmlLangAttribute(t),this._onLocaleChanged(t,n)}get loadingComplete(){return typeof this.__namespaceLoaderPromisesCache[this.locale]=="object"?Promise.all(Object.values(this.__namespaceLoaderPromisesCache[this.locale])):Promise.resolve()}constructor({allowOverridesForExistingNamespaces:t=!1,autoLoadOnLocaleChange:n=!1,showKeyAsFallback:r=!1,fallbackLocale:i=""}={}){super(),this.__allowOverridesForExistingNamespaces=t,this._autoLoadOnLocaleChange=!!n,this._showKeyAsFallback=r,this._fallbackLocale=i;const s=Bi.getAttribute("data-localize-lang");this.#e=!!s,this.#e&&(this.locale=s,this._setupTranslationToolSupport()),Bi.lang||(Bi.lang=this.locale||"en-GB"),this._setupHtmlLangAttributeObserver()}addData(t,n,r){if(!this.__allowOverridesForExistingNamespaces&&this._isNamespaceInCache(t,n))throw new Error(`Namespace "${n}" has been already added for the locale "${t}".`);this.__storage[t]=this.__storage[t]||{},this.__allowOverridesForExistingNamespaces?this.__storage[t][n]={...this.__storage[t][n],...r}:this.__storage[t][n]=r}setupNamespaceLoader(t,n){this.__namespacePatternsMap.set(t,n)}loadNamespaces(t,{locale:n}={}){return Promise.all(t.map(r=>this.loadNamespace(r,{locale:n})))}loadNamespace(t,{locale:n=this.locale}={locale:this.locale}){const r=typeof t=="object",i=r?Object.keys(t)[0]:t;if(this._isNamespaceInCache(n,i))return Promise.resolve();const s=this._getCachedNamespaceLoaderPromise(n,i);return s||this._loadNamespaceData(n,t,r,i)}msg(t,n,r={}){const i=r.locale?r.locale:this.locale,s=this._getMessageForKeys(t,i);return s?new nR(s,i).format(n):""}teardown(){this._teardownHtmlLangAttributeObserver()}reset(){this.__storage={},this.__namespacePatternsMap=new Map,this.__namespaceLoadersCache={},this.__namespaceLoaderPromisesCache={}}setDatePostProcessorForLocale({locale:t,postProcessor:n}){this.formatDateOptions?.postProcessors.set(t,n)}setNumberPostProcessorForLocale({locale:t,postProcessor:n}){this.formatNumberOptions?.postProcessors.set(t,n)}_setupTranslationToolSupport(){this.#n=Bi.lang||null}_setHtmlLangAttribute(t){this._teardownHtmlLangAttributeObserver(),Bi.lang=t,this._setupHtmlLangAttributeObserver()}_setupHtmlLangAttributeObserver(){this._htmlLangAttributeObserver||(this._htmlLangAttributeObserver=new MutationObserver(t=>{t.forEach(n=>{this.#e?Bi.lang==="auto"?(this.#n=null,this._setHtmlLangAttribute(this.locale)):this.#n=document.documentElement.lang:this._onLocaleChanged(document.documentElement.lang,n.oldValue||"")})})),this._htmlLangAttributeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],attributeOldValue:!0})}_teardownHtmlLangAttributeObserver(){this._htmlLangAttributeObserver&&this._htmlLangAttributeObserver.disconnect()}_isNamespaceInCache(t,n){return!!(this.__storage[t]&&this.__storage[t][n])}_getCachedNamespaceLoaderPromise(t,n){return this.__namespaceLoaderPromisesCache[t]?this.__namespaceLoaderPromisesCache[t][n]:null}_loadNamespaceData(t,n,r,i){const s=this._getNamespaceLoader(n,r,i),o=this._getNamespaceLoaderPromise(s,t,i);return this._cacheNamespaceLoaderPromise(t,i,o),o.then(a=>{if(this.__namespaceLoaderPromisesCache[t]&&this.__namespaceLoaderPromisesCache[t][i]===o){const l=rR(a)?a.default:a;this.addData(t,i,l)}})}_getNamespaceLoader(t,n,r){let i=this.__namespaceLoadersCache[r];if(i||(n?(i=t[r],this.__namespaceLoadersCache[r]=i):(i=this._lookupNamespaceLoader(r),this.__namespaceLoadersCache[r]=i)),!i)throw new Error(`Namespace "${r}" was not properly setup.`);return this.__namespaceLoadersCache[r]=i,i}_getNamespaceLoaderPromise(t,n,r,i=this._fallbackLocale){return t(n,r).catch(()=>{const s=this._getLangFromLocale(n);return t(s,r).catch(()=>{if(i)return this._getNamespaceLoaderPromise(t,i,r,"").catch(()=>{const o=this._getLangFromLocale(i);throw new Error(`Data for namespace "${r}" and current locale "${n}" or fallback locale "${i}" could not be loaded. Make sure you have data either for locale "${n}" (and/or generic language "${s}") or for fallback "${i}" (and/or "${o}").`)});throw new Error(`Data for namespace "${r}" and locale "${n}" could not be loaded. Make sure you have data for locale "${n}" (and/or generic language "${s}").`)})})}_cacheNamespaceLoaderPromise(t,n,r){this.__namespaceLoaderPromisesCache[t]||(this.__namespaceLoaderPromisesCache[t]={}),this.__namespaceLoaderPromisesCache[t][n]=r}_lookupNamespaceLoader(t){for(const[n,r]of this.__namespacePatternsMap){const i=typeof n=="string"&&n===t,s=typeof n=="object"&&n.constructor.name==="RegExp"&&n.test(t);if(i||s)return r}return null}_getLangFromLocale(t){return t.substring(0,2)}_onLocaleChanged(t,n){this.dispatchEvent(new CustomEvent("__localeChanging")),t!==n&&(this._autoLoadOnLocaleChange?(this._loadAllMissing(t,n),this.loadingComplete.then(()=>{this.dispatchEvent(new CustomEvent("localeChanged",{detail:{newLocale:t,oldLocale:n}}))})):this.dispatchEvent(new CustomEvent("localeChanged",{detail:{newLocale:t,oldLocale:n}})))}_loadAllMissing(t,n){const r=this.__storage[n]||{},i=this.__storage[t]||{};Object.keys(r).forEach(s=>{i[s]||this.loadNamespace(s,{locale:t})})}_getMessageForKeys(t,n){if(typeof t=="string")return this._getMessageForKey(t,n);const r=Array.from(t).reverse();let i,s;for(;r.length;)if(i=r.pop(),s=this._getMessageForKey(i,n),s)return s}_getMessageForKey(t,n){if(!t||t.indexOf(":")===-1)throw new Error(`Namespace is missing in the key "${t}". The format for keys is "namespace:name".`);const[r,i]=t.split(":"),s=this.__storage[n],o=s?s[r]:{},l=i.split(".").reduce((c,u)=>typeof c=="object"?c[u]:c,o);return String(l||(this._showKeyAsFallback?t:""))}#r(t){if(!t.includes("-"))throw new Error(` +`,vg=window,P_=new WeakMap;function lF(e){vg.applyFocusVisiblePolyfill&&!P_.has(e)&&(vg.applyFocusVisiblePolyfill(e),P_.set(e,void 0))}const cF=e=>class extends e{static get properties(){return{focused:{type:Boolean,reflect:!0},focusedVisible:{type:Boolean,reflect:!0,attribute:"focused-visible"},autofocus:{type:Boolean,reflect:!0}}}constructor(){super(),this.focused=!1,this.focusedVisible=!1,this.autofocus=!1}firstUpdated(n){super.firstUpdated(n),this.__registerEventsForFocusMixin(),this.__syncAutofocusToFocusableElement()}disconnectedCallback(){super.disconnectedCallback(),this.__teardownEventsForFocusMixin()}updated(n){super.updated(n),n.has("autofocus")&&this.__syncAutofocusToFocusableElement()}__syncAutofocusToFocusableElement(){this._focusableNode&&(this.hasAttribute("autofocus")?this._focusableNode.setAttribute("autofocus",""):this._focusableNode.removeAttribute("autofocus"))}focus(){this._focusableNode?.focus()}blur(){this._focusableNode?.blur()}get _focusableNode(){return this._inputNode||document.createElement("input")}__onFocus(){if(this.focused=!0,typeof vg.applyFocusVisiblePolyfill=="function")this.focusedVisible=this._focusableNode.hasAttribute("data-focus-visible-added");else try{this.focusedVisible=this._focusableNode.matches(":focus-visible")}catch{this.focusedVisible=!1}}__onBlur(){this.focused=!1,this.focusedVisible=!1}__registerEventsForFocusMixin(){lF(this.getRootNode()),this.__redispatchFocus=n=>{n.stopPropagation(),this.dispatchEvent(new Event("focus"))},this._focusableNode.addEventListener("focus",this.__redispatchFocus),this.__redispatchBlur=n=>{n.stopPropagation(),this.dispatchEvent(new Event("blur"))},this._focusableNode.addEventListener("blur",this.__redispatchBlur),this.__redispatchFocusin=n=>{n.stopPropagation(),this.__onFocus(),this.dispatchEvent(new Event("focusin",{bubbles:!0,composed:!0}))},this._focusableNode.addEventListener("focusin",this.__redispatchFocusin),this.__redispatchFocusout=n=>{n.stopPropagation(),this.__onBlur(),this.dispatchEvent(new Event("focusout",{bubbles:!0,composed:!0}))},this._focusableNode.addEventListener("focusout",this.__redispatchFocusout)}__teardownEventsForFocusMixin(){this._focusableNode&&(this._focusableNode?.removeEventListener("focus",this.__redispatchFocus),this._focusableNode?.removeEventListener("blur",this.__redispatchBlur),this._focusableNode?.removeEventListener("focusin",this.__redispatchFocusin),this._focusableNode?.removeEventListener("focusout",this.__redispatchFocusout))}},Zv=vt(cF);function U1(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Os="long",ji="short",op="narrow",ze="numeric",Hi="2-digit",zi={number:{decimal:{style:"decimal"},integer:{style:"decimal",maximumFractionDigits:0},currency:{style:"currency",currency:"USD"},percent:{style:"percent"},default:{style:"decimal"}},date:{short:{month:ze,day:ze,year:Hi},medium:{month:ji,day:ze,year:ze},long:{month:Os,day:ze,year:ze},full:{month:Os,day:ze,year:ze,weekday:Os},default:{month:ji,day:ze,year:ze}},time:{short:{hour:ze,minute:ze},medium:{hour:ze,minute:ze,second:ze},long:{hour:ze,minute:ze,second:ze,timeZoneName:ji},full:{hour:ze,minute:ze,second:ze,timeZoneName:ji},default:{hour:ze,minute:ze,second:ze}},duration:{default:{hours:{minimumIntegerDigits:1,maximumFractionDigits:0},minutes:{minimumIntegerDigits:2,maximumFractionDigits:0},seconds:{minimumIntegerDigits:2,maximumFractionDigits:3}}},parseNumberPattern:function(e){if(e){var t={},n=e.match(/\b[A-Z]{3}\b/i),r=e.replace(/[^¤]/g,"").length;if(!r&&n&&(r=1),r?(t.style="currency",t.currencyDisplay=r===1?"symbol":r===2?"code":"name",t.currency=n?n[0].toUpperCase():"USD"):e.indexOf("%")>=0&&(t.style="percent"),!/[@#0]/.test(e))return t.style?t:void 0;if(t.useGrouping=e.indexOf(",")>=0,/E\+?[@#0]+/i.test(e)||e.indexOf("@")>=0){var i=e.replace(/E\+?[@#0]+|[^@#0]/gi,"");t.minimumSignificantDigits=Math.min(Math.max(i.replace(/[^@0]/g,"").length,1),21),t.maximumSignificantDigits=Math.min(Math.max(i.length,1),21)}else{for(var s=e.replace(/[^#0.]/g,"").split("."),o=s[0],a=o.length-1;o[a]==="0";)--a;t.minimumIntegerDigits=Math.min(Math.max(o.length-1-a,1),21);var l=s[1]||"";for(a=0;l[a]==="0";)++a;for(t.minimumFractionDigits=Math.min(Math.max(a,0),20);l[a]==="#";)++a;t.maximumFractionDigits=Math.min(Math.max(a,0),20)}return t}},parseDatePattern:function(e){if(e){for(var t={},n=0;n0)_=new Intl.PluralRules(f,{type:m});else{var b=uF(f,bg),w=b&&bg[b][m]||c;_={select:w}}return function(S,C){var E=v["="+ +S]||v[_.select(S-g)]||v.other;return E(C)}}function c(){return"other"}function u(p,f){var h=p[2];return function(m,g){var v=h[m]||h.other;return v(g)}}var d={number:s,ordinal:s,spellout:s,duration:o,date:a,time:a,plural:l,selectordinal:l,select:u};t.types=d});jh.toParts;jh.types;var j1=U1(function(e,t){var n="{",r="}",i=",",s="#",o="<",a=">",l="",u="'",d="offset:",p=["number","date","time","ordinal","duration","spellout"],f=["plural","select","selectordinal"];t=e.exports=function(F,j){return h({pattern:String(F),index:0,tagsType:j&&j.tagsType||null,tokens:j&&j.tokens||null},"")};function h(y,F){var j=y.pattern,M=j.length,q=[],P=y.index,le=m(y,F);for(le&&q.push(le),le&&y.tokens&&y.tokens.push(["text",j.slice(P,y.index)]);y.index=9&&y<=13||y===32||y===133||y===160||y===6158||y>=8192&&y<=8205||y===8232||y===8233||y===8239||y===8287||y===8288||y===12288||y===65279}function v(y){for(var F=y.pattern,j=F.length,M=y.index;y.index=0)le=[M,P,S(y)];else{var ye=y.index,Ye=S(y);v(y),F[y.index]===n&&(y.index=ye,Ye=T(y,P)),le=[M,P,Ye]}if(v(y),F[y.index]!==r)throw k(y,r);return y.tokens&&y.tokens.push(["syntax",r]),++y.index,le}function b(y){var F=y.tagsType;if(!(!F||y.pattern[y.index]!==o)){if(y.pattern.slice(y.index,y.index+l.length)===l)throw k(y,null,"closing tag without matching opening tag");y.tokens&&y.tokens.push(["syntax",o]),++y.index;var j=w(y,!0);if(!j)throw k(y,"placeholder id");if(y.tokens&&y.tokens.push(["id",j]),v(y),y.pattern.slice(y.index,y.index+c.length)===c)return y.tokens&&y.tokens.push(["syntax",c]),y.index+=c.length,[j,F];if(y.pattern[y.index]!==a)throw k(y,a);y.tokens&&y.tokens.push(["syntax",a]),++y.index;var M=h(y,F),q=y.index;if(y.pattern.slice(y.index,y.index+l.length)!==l)throw k(y,l+j+a);y.tokens&&y.tokens.push(["syntax",l]),y.index+=l.length;var P=w(y,!0);if(P&&y.tokens&&y.tokens.push(["id",P]),j!==P)throw y.index=q,k(y,l+j+a,l+P+a);if(v(y),y.pattern[y.index]!==a)throw k(y,a);return y.tokens&&y.tokens.push(["syntax",a]),++y.index,[j,F,{children:M}]}}function w(y,F){for(var j=y.pattern,M=j.length,q="";y.index=48&&y<=57}function T(y,F){for(var j=y.pattern,M=j.length,q={};y.index=0)throw k(y,null,null,'"other" sub-message must be specified in '+F);return q}function x(y,F){if(y.pattern[y.index]!==n)throw k(y,n+" to start sub-message");y.tokens&&y.tokens.push(["syntax",n]),++y.index;var j=h(y,F);if(y.pattern[y.index]!==r)throw k(y,r+" to end sub-message");return y.tokens&&y.tokens.push(["syntax",r]),++y.index,j}function k(y,F,j,M){var q=y.pattern,P=q.slice(0,y.index).split(/\r?\n/),le=y.index,De=P.length,ye=P.slice(-1)[0].length;return j=j||(y.index>=q.length?"end of message pattern":w(y)||q[y.index]),M||(M=O(F,j)),M+=" in "+q.replace(/\r?\n/g,` +`),new A(M,F,j,le,De,ye)}function O(y,F){return y?"Expected "+y+" but found "+F:"Unexpected "+F+" found"}function A(y,F,j,M,q,P){Error.call(this,y),this.name="SyntaxError",this.message=y,this.expected=F,this.found=j,this.offset=M,this.line=q,this.column=P}A.prototype=Object.create(Error.prototype),t.SyntaxError=A});j1.SyntaxError;var dF=new RegExp("^("+Object.keys(bg).join("|")+")\\b"),jl=new WeakMap;function $a(e,t,n){if(!(this instanceof $a)||jl.has(this))throw new TypeError("calling MessageFormat constructor without new is invalid");var r=j1(e);jl.set(this,{ast:r,format:jh(r,t,n&&n.types),locale:$a.supportedLocalesOf(t)[0]||"en",locales:t,options:n})}var hF=$a;Object.defineProperties($a.prototype,{format:{configurable:!0,get:function(){var t=jl.get(this);if(!t)throw new TypeError("MessageFormat.prototype.format called on value that's not an object initialized as a MessageFormat");return t.format}},formatToParts:{configurable:!0,writable:!0,value:function(t){var n=jl.get(this);if(!n)throw new TypeError("MessageFormat.prototype.formatToParts called on value that's not an object initialized as a MessageFormat");var r=n.toParts||(n.toParts=jh.toParts(n.ast,n.locales,n.options&&n.options.types));return r(t)}},resolvedOptions:{configurable:!0,writable:!0,value:function(){var t=jl.get(this);if(!t)throw new TypeError("MessageFormat.prototype.resolvedOptions called on value that's not an object initialized as a MessageFormat");return{locale:t.locale}}}});typeof Symbol<"u"&&Object.defineProperty($a.prototype,Symbol.toStringTag,{value:"Object"});Object.defineProperties($a,{supportedLocalesOf:{configurable:!0,writable:!0,value:function(t){return[].concat(Intl.NumberFormat.supportedLocalesOf(t),Intl.DateTimeFormat.supportedLocalesOf(t),Intl.PluralRules?Intl.PluralRules.supportedLocalesOf(t):[],[].concat(t||[]).filter(function(n){return dF.test(n)})).filter(function(n,r,i){return i.indexOf(n)===r})}}});function fF(e){return!!(e&&e.default&&typeof e.default=="object"&&Object.keys(e).length===1)}const qi=globalThis.document?.documentElement;class pF extends EventTarget{formatNumberOptions={returnIfNaN:"",postProcessors:new Map};formatDateOptions={postProcessors:new Map};#e=!1;#t="";#n=null;__storage={};__namespacePatternsMap=new Map;__namespaceLoadersCache={};__namespaceLoaderPromisesCache={};get locale(){return this.#e?this.#t||"":qi.lang||""}set locale(t){if(this.#r(t),!this.#e){const i=qi.lang;this._setHtmlLangAttribute(t),this._onLocaleChanged(t,i);return}const n=this.#t;this.#t=t,this.#n===null&&this._setHtmlLangAttribute(t),this._onLocaleChanged(t,n)}get loadingComplete(){return typeof this.__namespaceLoaderPromisesCache[this.locale]=="object"?Promise.all(Object.values(this.__namespaceLoaderPromisesCache[this.locale])):Promise.resolve()}constructor({allowOverridesForExistingNamespaces:t=!1,autoLoadOnLocaleChange:n=!1,showKeyAsFallback:r=!1,fallbackLocale:i=""}={}){super(),this.__allowOverridesForExistingNamespaces=t,this._autoLoadOnLocaleChange=!!n,this._showKeyAsFallback=r,this._fallbackLocale=i;const s=qi.getAttribute("data-localize-lang");this.#e=!!s,this.#e&&(this.locale=s,this._setupTranslationToolSupport()),qi.lang||(qi.lang=this.locale||"en-GB"),this._setupHtmlLangAttributeObserver()}addData(t,n,r){if(!this.__allowOverridesForExistingNamespaces&&this._isNamespaceInCache(t,n))throw new Error(`Namespace "${n}" has been already added for the locale "${t}".`);this.__storage[t]=this.__storage[t]||{},this.__allowOverridesForExistingNamespaces?this.__storage[t][n]={...this.__storage[t][n],...r}:this.__storage[t][n]=r}setupNamespaceLoader(t,n){this.__namespacePatternsMap.set(t,n)}loadNamespaces(t,{locale:n}={}){return Promise.all(t.map(r=>this.loadNamespace(r,{locale:n})))}loadNamespace(t,{locale:n=this.locale}={locale:this.locale}){const r=typeof t=="object",i=r?Object.keys(t)[0]:t;if(this._isNamespaceInCache(n,i))return Promise.resolve();const s=this._getCachedNamespaceLoaderPromise(n,i);return s||this._loadNamespaceData(n,t,r,i)}msg(t,n,r={}){const i=r.locale?r.locale:this.locale,s=this._getMessageForKeys(t,i);return s?new hF(s,i).format(n):""}teardown(){this._teardownHtmlLangAttributeObserver()}reset(){this.__storage={},this.__namespacePatternsMap=new Map,this.__namespaceLoadersCache={},this.__namespaceLoaderPromisesCache={}}setDatePostProcessorForLocale({locale:t,postProcessor:n}){this.formatDateOptions?.postProcessors.set(t,n)}setNumberPostProcessorForLocale({locale:t,postProcessor:n}){this.formatNumberOptions?.postProcessors.set(t,n)}_setupTranslationToolSupport(){this.#n=qi.lang||null}_setHtmlLangAttribute(t){this._teardownHtmlLangAttributeObserver(),qi.lang=t,this._setupHtmlLangAttributeObserver()}_setupHtmlLangAttributeObserver(){this._htmlLangAttributeObserver||(this._htmlLangAttributeObserver=new MutationObserver(t=>{t.forEach(n=>{this.#e?qi.lang==="auto"?(this.#n=null,this._setHtmlLangAttribute(this.locale)):this.#n=document.documentElement.lang:this._onLocaleChanged(document.documentElement.lang,n.oldValue||"")})})),this._htmlLangAttributeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],attributeOldValue:!0})}_teardownHtmlLangAttributeObserver(){this._htmlLangAttributeObserver&&this._htmlLangAttributeObserver.disconnect()}_isNamespaceInCache(t,n){return!!(this.__storage[t]&&this.__storage[t][n])}_getCachedNamespaceLoaderPromise(t,n){return this.__namespaceLoaderPromisesCache[t]?this.__namespaceLoaderPromisesCache[t][n]:null}_loadNamespaceData(t,n,r,i){const s=this._getNamespaceLoader(n,r,i),o=this._getNamespaceLoaderPromise(s,t,i);return this._cacheNamespaceLoaderPromise(t,i,o),o.then(a=>{if(this.__namespaceLoaderPromisesCache[t]&&this.__namespaceLoaderPromisesCache[t][i]===o){const l=fF(a)?a.default:a;this.addData(t,i,l)}})}_getNamespaceLoader(t,n,r){let i=this.__namespaceLoadersCache[r];if(i||(n?(i=t[r],this.__namespaceLoadersCache[r]=i):(i=this._lookupNamespaceLoader(r),this.__namespaceLoadersCache[r]=i)),!i)throw new Error(`Namespace "${r}" was not properly setup.`);return this.__namespaceLoadersCache[r]=i,i}_getNamespaceLoaderPromise(t,n,r,i=this._fallbackLocale){return t(n,r).catch(()=>{const s=this._getLangFromLocale(n);return t(s,r).catch(()=>{if(i)return this._getNamespaceLoaderPromise(t,i,r,"").catch(()=>{const o=this._getLangFromLocale(i);throw new Error(`Data for namespace "${r}" and current locale "${n}" or fallback locale "${i}" could not be loaded. Make sure you have data either for locale "${n}" (and/or generic language "${s}") or for fallback "${i}" (and/or "${o}").`)});throw new Error(`Data for namespace "${r}" and locale "${n}" could not be loaded. Make sure you have data for locale "${n}" (and/or generic language "${s}").`)})})}_cacheNamespaceLoaderPromise(t,n,r){this.__namespaceLoaderPromisesCache[t]||(this.__namespaceLoaderPromisesCache[t]={}),this.__namespaceLoaderPromisesCache[t][n]=r}_lookupNamespaceLoader(t){for(const[n,r]of this.__namespacePatternsMap){const i=typeof n=="string"&&n===t,s=typeof n=="object"&&n.constructor.name==="RegExp"&&n.test(t);if(i||s)return r}return null}_getLangFromLocale(t){return t.substring(0,2)}_onLocaleChanged(t,n){this.dispatchEvent(new CustomEvent("__localeChanging")),t!==n&&(this._autoLoadOnLocaleChange?(this._loadAllMissing(t,n),this.loadingComplete.then(()=>{this.dispatchEvent(new CustomEvent("localeChanged",{detail:{newLocale:t,oldLocale:n}}))})):this.dispatchEvent(new CustomEvent("localeChanged",{detail:{newLocale:t,oldLocale:n}})))}_loadAllMissing(t,n){const r=this.__storage[n]||{},i=this.__storage[t]||{};Object.keys(r).forEach(s=>{i[s]||this.loadNamespace(s,{locale:t})})}_getMessageForKeys(t,n){if(typeof t=="string")return this._getMessageForKey(t,n);const r=Array.from(t).reverse();let i,s;for(;r.length;)if(i=r.pop(),s=this._getMessageForKey(i,n),s)return s}_getMessageForKey(t,n){if(!t||t.indexOf(":")===-1)throw new Error(`Namespace is missing in the key "${t}". The format for keys is "namespace:name".`);const[r,i]=t.split(":"),s=this.__storage[n],o=s?s[r]:{},l=i.split(".").reduce((c,u)=>typeof c=="object"?c[u]:c,o);return String(l||(this._showKeyAsFallback?t:""))}#r(t){if(!t.includes("-"))throw new Error(` Locale was set to ${t}. Language only locales are not allowed, please use the full language locale e.g. 'en-GB' instead of 'en'. See https://github.com/ing-bank/lion/issues/187 for more information. - `)}get _supportExternalTranslationTools(){return this.#e}set _supportExternalTranslationTools(t){this.#e=t}get _langAttrSetByTranslationTool(){return this.#t}set _langAttrSetByTranslationTool(t){this.#t=t}}const Zf=Symbol.for("lion::SingletonManagerClassStorage"),ep=globalThis||window;class sR{constructor(){this._map=ep[Zf]?ep[Zf]:ep[Zf]=new Map}set(t,n){this.has(t)||this._map.set(t,n)}get(t){return this._map.get(t)}has(t){return this._map.has(t)}}const ed=new sR;function Od(){if(ed.has("@lion/ui::localize::0.x"))return ed.get("@lion/ui::localize::0.x");const e=new iR({autoLoadOnLocaleChange:!0,fallbackLocale:"en-GB"});return ed.set("@lion/ui::localize::0.x",e),e}const Nl=(e,t)=>{const n=e._$AN;if(n===void 0)return!1;for(const r of n)r._$AO?.(t,!1),Nl(r,t);return!0},Pd=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},_E=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),lR(t)}};function oR(e){this._$AN!==void 0?(Pd(this),this._$AM=e,_E(this)):this._$AM=e}function aR(e,t=!1,n=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let s=n;s{e.type==Sh.CHILD&&(e._$AP??=aR,e._$AQ??=oR)};class cR extends Ch{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,n,r){super._$AT(t,n,r),_E(this),this.isConnected=t._$AU}_$AO(t,n=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),n&&(Nl(this,t),Pd(this))}setValue(t){if(B$(this._$Ct))this._$Ct._$AI(t,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=t,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}let uR=class{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}},dR=class{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??=new Promise((t=>this.Z=t))}resume(){this.Z?.(),this.Y=this.Z=void 0}};const __=e=>!V$(e)&&typeof e.then=="function",w_=1073741823;let hR=class extends cR{constructor(){super(...arguments),this._$Cwt=w_,this._$Cbt=[],this._$CK=new uR(this),this._$CX=new dR}render(...t){return t.find((n=>!__(n)))??_r}update(t,n){const r=this._$Cbt;let i=r.length;this._$Cbt=n;const s=this._$CK,o=this._$CX;this.isConnected||this.disconnected();for(let a=0;athis._$Cwt);a++){const l=n[a];if(!__(l))return this._$Cwt=a,l;a{for(;o.get();)await o.get();const u=s.deref();if(u!==void 0){const d=u._$Cbt.indexOf(l);d>-1&&dclass extends e{static get localizeNamespaces(){return[]}static get waitForLocalizeNamespaces(){return!0}constructor(){super(),this._localizeManager=Od(),this.__boundLocalizeOnLocaleChanged=(...n)=>{const r=Array.from(n)[0];this.__localizeOnLocaleChanged(r)},this.__boundLocalizeOnLocaleChanging=()=>{this.__localizeOnLocaleChanging()},this.__localizeStartLoadingNamespaces(),this.localizeNamespacesLoaded&&this.localizeNamespacesLoaded.then(()=>{this.__localizeMessageSync=!0})}async scheduleUpdate(){Object.getPrototypeOf(this).constructor.waitForLocalizeNamespaces&&await this.localizeNamespacesLoaded,super.scheduleUpdate()}connectedCallback(){super.connectedCallback(),this.localizeNamespacesLoaded&&this.localizeNamespacesLoaded.then(()=>this.onLocaleReady()),this._localizeManager.addEventListener("__localeChanging",this.__boundLocalizeOnLocaleChanging),this._localizeManager.addEventListener("localeChanged",this.__boundLocalizeOnLocaleChanged)}disconnectedCallback(){super.disconnectedCallback(),this._localizeManager.removeEventListener("__localeChanging",this.__boundLocalizeOnLocaleChanging),this._localizeManager.removeEventListener("localeChanged",this.__boundLocalizeOnLocaleChanged)}msgLit(n,r,i){return this.__localizeMessageSync?this._localizeManager.msg(n,r,i):this.localizeNamespacesLoaded?fR(this.localizeNamespacesLoaded.then(()=>this._localizeManager.msg(n,r,i)),Ae):""}__getUniqueNamespaces(){const n=[],r=new Set;return Object.getPrototypeOf(this).constructor.localizeNamespaces.forEach(r.add.bind(r)),r.forEach(i=>{n.push(i)}),n}__localizeStartLoadingNamespaces(){this.localizeNamespacesLoaded=this._localizeManager.loadNamespaces(this.__getUniqueNamespaces())}__localizeOnLocaleChanging(){this.__localizeStartLoadingNamespaces()}__localizeOnLocaleChanged(n){this.onLocaleChanged(n.detail.newLocale,n.detail.oldLocale)}onLocaleReady(){this.onLocaleUpdated()}onLocaleChanged(n,r){this.onLocaleUpdated(),this.requestUpdate()}onLocaleUpdated(){}},Ih=gt(pR),ug="3.0.0",S_=window.scopedElementsVersions||(window.scopedElementsVersions=[]);S_.includes(ug)||S_.push(ug);const mR=e=>class extends e{static scopedElements;static get scopedElementsVersion(){return ug}static __registry;get registry(){return this.constructor.__registry}set registry(n){this.constructor.__registry=n}attachShadow(n){const{scopedElements:r}=this.constructor;if(!this.registry||this.registry===this.constructor.__registry&&!Object.prototype.hasOwnProperty.call(this.constructor,"__registry")){this.registry=new CustomElementRegistry;for(const[s,o]of Object.entries(r??{}))this.registry.define(s,o)}return super.attachShadow({...n,customElements:this.registry,registry:this.registry})}},gR=gt(mR),vR=e=>class extends gR(e){createRenderRoot(){const{shadowRootOptions:n,elementStyles:r}=this.constructor,i=this.attachShadow(n);return this.renderOptions.creationScope=i,Rv(i,r),this.renderOptions.renderBefore??=i.firstChild,i}},bR=gt(vR);function bu(){return!!(globalThis.ShadowRoot?.prototype.createElement&&globalThis.ShadowRoot?.prototype.importNode)}const yR=e=>class extends bR(e){constructor(){super()}createScopedElement(n){return(bu()?this.shadowRoot:document).createElement(n)}defineScopedElement(n,r){const i=this.registry.get(n),s=i&&i!==r;return!bu()&&s&&console.error([`You are trying to re-register the "${n}" custom element with a different class via ScopedElementsMixin.`,"This is only possible with a CustomElementRegistry.","Your browser does not support this feature so you will need to load a polyfill for it.",'Load "@webcomponents/scoped-custom-element-registry" before you register ANY web component to the global customElements registry.','e.g. add "